Skip to content

Commit 2b6d126

Browse files
authored
Add virtual environment creation instructions to README
1 parent 3394da5 commit 2b6d126

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
# Assignment: functions
22

3-
Install `pytest`:
4-
```
5-
pip install pytest
6-
```
7-
8-
We'll use `pytest` to test the Python functions we write below.
9-
10-
In your home directory, make a folder called `Development`, if it doesn't exist. This is where we will keep all of the code for the class. Next, make sure that you are inside that folder, by checking the output of the following command:
11-
12-
```shell
13-
pwd
14-
```
15-
16-
If `pwd` shows that you are in a different directory, run `cd ~/Development` and check with `pwd` again.
17-
183
## How to clone this repo
194

20-
Next, clone this repository by clicking the green button in the upper right corner, selecting `SSH` and copying the string that looks like `git@github.com:code4policy/<REPO-NAME>.git` (`<REPO-NAME>` will be the name of your repository). Then, in the terminal run the following:
5+
Clone this repository by clicking the green button in the upper right corner, selecting `SSH` and copying the string that looks like `git@github.com:code4policy/<REPO-NAME>.git` (`<REPO-NAME>` will be the name of your repository). Then, in the terminal run the following:
216

227
```
238
git clone git@github.com:code4policy/<REPO-NAME>.git
@@ -27,7 +12,15 @@ Note that by default, git will clone the repository into a folder with name `<RE
2712

2813
## Python
2914

30-
1. create a new branch in your git repo called "calculator"
15+
We'll use the `pytest` Python library to test the functions we write below. Let's install `pytest` in a Python virtual environment:
16+
17+
```
18+
python3 -m venv virtualenv # create a python virtual environment
19+
source ./virtualenv/bin/activate # activate the virtual environment
20+
pip install pytest # install the pytest package
21+
```
22+
23+
1. create a new branch in your git repo called `calculator`
3124

3225
2. inside that branch create a new file called `calculator.py`
3326

0 commit comments

Comments
 (0)