Skip to content

Commit 8fd501f

Browse files
committed
Updates to the Contributing section
- no need to clarify we're using python3 - using `source` to activate the virtual environment in Mac/Linux (as per https://docs.python.org/3/library/venv.html#how-venvs-work) - Since testutils is a local module, we need to ensure it is discoverable when running the tests - we achieve this by setting the PYTHONPATH environment variable
1 parent fb32f46 commit 8fd501f

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ It's recommended to create a new virtual environment to install the SDK. You can
4444

4545
```bash
4646
# Create the virtual environment
47-
python3 -m venv venv
47+
python -m venv venv
4848

4949
# Activate the virtual environment in Mac/Linux
50-
. ./venv/bin/activate
50+
source venv/bin/activate
5151

5252
# Or on Windows Command Prompt
5353
venv\Scripts\activate
@@ -1458,7 +1458,20 @@ We don't currently support asyncio in the Python SDK.
14581458

14591459
We :heart: contributions! But if you plan to work on something big or controversial, please contact us by raising an issue first!
14601460

1461-
We recommend working on `vonage-python-sdk` with a [virtualenv][virtualenv]. The following command will install all the Python dependencies you need to run the tests:
1461+
We recommend working on `vonage-python-sdk` within a virtual environment - belowe we're using the [venv](https://docs.python.org/3/library/venv.html)] module:
1462+
1463+
```bash
1464+
# Create the virtual environment
1465+
python -m venv venv
1466+
1467+
# Activate the virtual environment in Mac/Linux
1468+
source venv/bin/activate
1469+
1470+
# Or on Windows Command Prompt
1471+
venv\Scripts\activate
1472+
```
1473+
1474+
The following command will install all the Python dependencies you need to run the tests:
14621475

14631476
```bash
14641477
pip install -r requirements.txt
@@ -1467,7 +1480,7 @@ pip install -r requirements.txt
14671480
The tests are all written with pytest. You run them with:
14681481

14691482
```bash
1470-
pytest -v
1483+
PYTHONPATH=. pytest -v
14711484
```
14721485

14731486
We use [Black](https://black.readthedocs.io/en/stable/index.html) for code formatting, with our config in the `pyproject.toml` file. To ensure a PR follows the right format, you can set up and use our pre-commit settings with

0 commit comments

Comments
 (0)