@@ -26,8 +26,8 @@ We now want to run our code to see what it does -
2626let us do that from the command line.
2727For the most part of the course we will run our code
2828and interact with Git from the command line.
29- While we will develop and debug our code using the PyCharm IDE
30- and it is possible to use Git from PyCharm too,
29+ While we will develop and debug our code using an IDE
30+ and it is possible to use Git from the IDE too,
3131typing commands in the command line allows you to familiarise yourself and learn it well.
3232A bonus is that this knowledge is transferable to running code in other programming languages
3333and is independent from any IDE you may use in the future.
@@ -142,7 +142,7 @@ and it may be a matter of personal preference which one you go for.
142142In this course, we will use ` venv ` to create and manage our virtual environment
143143(which is the preferred way for Python 3.3+).
144144The upside is that ` venv ` virtual environments created from the command line are
145- also recognised and picked up automatically by PyCharm IDE ,
145+ also recognised and picked up automatically by the IDEs we will use in this course ,
146146as we will see in the next episode.
147147
148148### Managing External Packages
@@ -203,7 +203,7 @@ using `venv` and manage packages using `pip`.
203203
204204:::::::::::::::::::::::::::::::::::::::::: prereq
205205
206- ## Making Sure You Can Invoke Python
206+ ### Making Sure You Can Invoke Python
207207
208208You can test your Python installation from the command line with:
209209
@@ -494,20 +494,14 @@ Once again, we can use `pip` to install our local package:
494494python3 -m pip install --editable .
495495```
496496
497- ::::::::::::::::::::::::::::::::::::::::: spoiler
498-
499- ### This command fails for me
500-
501- If your ` pip ` installation is older than version 21.3, then this command will probably fail for you.
502- This is because these older versions of ` pip ` do not support ` pyproject.toml ` as the package metadata.
503- Given these versions of ` pip ` are now over 4 years old, we strongly recommend that you update ` pip ` if you can:
497+ If the above command fails for you - your ` pip ` installation is older than version 21.3.
498+ Such older versions of ` pip ` do not support ` pyproject.toml ` as the package metadata.
499+ Given these versions of ` pip ` are now over 4 years old, we strongly recommend that you update ` pip ` if you can with:
504500
505501``` bash
506502python3 -m pip install --upgrade pip
507503```
508504
509- :::::::::::::::::::::::::::::::::::::::::
510-
511505This is similar syntax to above, with two important differences:
512506
5135071 . The ` --editable ` or ` -e ` flag indicates that the package we are specifying should be an "editable" install.
@@ -517,7 +511,6 @@ This is similar syntax to above, with two important differences:
517511 The ` pyproject.toml ` file located in this directory then handles the rest.
518512
519513
520-
521514If we reissue the ` pip list ` command we should now see our local package with the name ` python-intermediate-inflammation ` in the output:
522515
523516``` output
@@ -646,8 +639,13 @@ In the above command, we tell the command line two things:
646639As we can see, the Python interpreter ran our script, which threw an error -
647640` inflammation-analysis.py: error: the following arguments are required: infiles ` .
648641It looks like the script expects a list of input files to process,
649- so this is expected behaviour since we do not supply any.
650- We will fix this error in a moment.
642+ so this is expected behaviour since we do not supply any.
643+
644+ We should run our code as follows, passing one (or more) data file(s) as input:
645+
646+ ``` bash
647+ (venv) $ python3 inflammation-analysis.py data/inflammation-01.csv
648+ ```
651649
652650## Optional Exercises
653651
0 commit comments