Skip to content

Commit 9c4db4c

Browse files
authored
Merge pull request #473 from carpentries-incubator/vs-code
The use of VS Code as an IDE option
2 parents 12b4a35 + c086340 commit 9c4db4c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+594
-660
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ site/*
1818
/*.Rcheck/
1919
# RStudio files
2020
.Rproj.user/
21+
*.Rproj
2122
# produced vignettes
2223
vignettes/*.html
2324
vignettes/*.pdf

config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ learners:
111111
- object-oriented-programming.md
112112
- persistence.md
113113
- databases.md
114-
- vscode.md
115114
- reference.md
116115

117116
# Information for Instructors

episodes/00-setting-the-scene.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ All exercises contain solutions but, wherever possible, try and work out a solut
193193
## Outdated Screenshots
194194

195195
Throughout this lesson we will make use and show content
196-
from Graphical User Interface (GUI) tools (PyCharm and GitHub).
196+
from Graphical User Interface (GUI) tools such as Integrated Development Environments (IDEs) and GitHub.
197197
These are evolving tools and platforms, always adding new features and new visual elements.
198198
Screenshots in the lesson may then become out-of-sync,
199199
refer to or show content that no longer exists or is different to what you see on your machine.

episodes/10-section1-intro.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ as this knowledge can be ported to other programming languages
9898
and command line tools you may use in the future
9999
(but is applicable to the integrated versions too).
100100

101-
We will use [PyCharm](https://www.jetbrains.com/pycharm/) in this course -
102-
a free, open source IDE.
101+
You have a choice of using [PyCharm](https://www.jetbrains.com/pycharm/) or [Visual Studio Code (VS Code)](https://code.visualstudio.com/) in this course.
103102

104103
### Git \& GitHub
105104

episodes/11-software-project.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ as we have seen already it contains several files with patients' daily inflammat
348348
We will revisit the software architecture and MVC topics once again in later episodes
349349
when we talk in more detail about [software architecture and design](32-software-architecture-design.md).
350350
We now proceed to set up our virtual development environment
351-
and start working with the code using a more convenient graphical tool -
352-
[IDE PyCharm](https://www.jetbrains.com/pycharm/).
351+
and start working with the code using a more convenient graphical tool - an Integrated Development Environment (IDE).
353352

354353

355354

episodes/12-virtual-environments.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ We now want to run our code to see what it does -
2626
let us do that from the command line.
2727
For the most part of the course we will run our code
2828
and 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,
3131
typing commands in the command line allows you to familiarise yourself and learn it well.
3232
A bonus is that this knowledge is transferable to running code in other programming languages
3333
and 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.
142142
In this course, we will use `venv` to create and manage our virtual environment
143143
(which is the preferred way for Python 3.3+).
144144
The 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,
146146
as 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

208208
You 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:
494494
python3 -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
506502
python3 -m pip install --upgrade pip
507503
```
508504

509-
:::::::::::::::::::::::::::::::::::::::::
510-
511505
This is similar syntax to above, with two important differences:
512506

513507
1. 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-
521514
If 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:
646639
As we can see, the Python interpreter ran our script, which threw an error -
647640
`inflammation-analysis.py: error: the following arguments are required: infiles`.
648641
It 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

Comments
 (0)