Skip to content

Commit 45a84ad

Browse files
committed
Update CONTRIBUTING docs and PR template
The example for creating a virtual environment is updated to use venv, which is bundled with modern python. Removed using flake8 in the PR template because we no longer use flake8 and because ruff is run as part of CI.
1 parent 9e102e2 commit 45a84ad

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
- [ ] closes #xxxx
22
- [ ] tests added / passed
33
- [ ] docs reflect changes
4-
- [ ] passes ``flake8 impactlab_tools tests docs``
54
- [ ] whatsnew entry

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ __pycache__/
88

99
# Distribution / packaging
1010
.Python
11-
env/
1211
build/
1312
develop-eggs/
1413
dist/
@@ -25,6 +24,16 @@ var/
2524
*.egg
2625
*_deploy_key*
2726

27+
# Environments
28+
.env
29+
.venv
30+
env/
31+
venv/
32+
ENV/
33+
env.bak/
34+
venv.bak/
35+
36+
2837
# PyInstaller
2938
# Usually these files are written by a python script from a template
3039
# before PyInstaller builds the exe, so as to inject date/other infos into it.

CONTRIBUTING.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ code.
6969
Setting up your development environment
7070
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7171

72-
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper
73-
installed, this is how you set up your fork for local development::
72+
Install your local copy into a virtual environment. For example, using venv,
73+
this is how you set up your fork for local development::
7474

75-
$ mkvirtualenv impactlab-tools
7675
$ cd impactlab-tools/
77-
$ python setup.py develop
76+
$ python3 -m venv .venv
77+
$ source .venv/bin/activate
78+
$ python3 -m pip install -r requirements.txt
79+
$ python3 -m pip install -e .
7880

7981
Developing your feature
8082
~~~~~~~~~~~~~~~~~~~~~~~
@@ -115,13 +117,13 @@ When making any changes to the impactlab-tools codebase, follow the following st
115117
tests you just wrote. Run tests frequently to make sure you are maintaining
116118
compatibility with the rest of the package::
117119

118-
$ python setup.py test
119-
$ flake8 impactlab-tools tests docs
120+
$ python3 -m pytest
121+
$ python3 -m ruff check .
120122

121123
You can run only the tests you wrote using pytest's expression matching
122124
syntax, e.g.::
123125

124-
$ pytest -k test_my_new_feature
126+
$ python3 -m pytest -k test_my_new_feature
125127

126128
7. When you are passing all of your tests, run the full test suite.
127129

whatsnew.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Unreleased
77
----------
88

99
- Minor code style update.
10+
- Update CONTRIBUTING docs to use ``venv`` in the example for creating virtual environments. This tool is bundled with Python by default.
1011

1112
v0.6.0 (May 31, 2024)
1213
---------------------

0 commit comments

Comments
 (0)