Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit e061628

Browse files
committed
replace "pipenv" and "master"
1 parent 6cc3e60 commit e061628

File tree

11 files changed

+35
-50
lines changed

11 files changed

+35
-50
lines changed

.github/workflows/code.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ jobs:
113113
- name: Run tests
114114
run: pytest tests
115115

116-
- name: Create requirements_dev.txt
117-
run: |
118-
pip freeze --exclude-editable > requirements_dev.txt
119-
120116
- name: Upload coverage to Codecov
121117
uses: codecov/codecov-action@v2
122118
with:

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
"type": "shell",
88
"label": "Tests with coverage",
9-
"command": "pipenv run tests",
9+
"command": "tox -e tests",
1010
"options": {
1111
"cwd": "${workspaceRoot}"
1212
},

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ on your workstation as follows::
3939
$ git clone git://github.com/epics-containers/python3-pip-skeleton.git
4040
$ cd python3-pip-skeleton
4141
$ virtualenv .venv
42-
$ source .venv/bin/activate
42+
$ s
4343
$ pip install -e .[dev]
4444
$ tox -p
4545

README.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ Releases https://github.com/epics-containers/python3-pip-skeleton/releases
1717

1818
It integrates the following tools:
1919

20-
- Pipenv for version management
21-
- Pre-commit with black, flake8, isort and mypy for static analysis
22-
- Pytest for code and coverage
20+
- pip and setuptools_scm for version management
21+
- Pre-commit with black, flake8 and isort for static analysis
22+
- Pytest for tests and code [email protected]:dls-controls/dls-python3-skeleton.gitcoverage
2323
- Sphinx for tutorials, how-to guides, explanations and reference documentation
2424
- GitHub Actions for code and docs CI and deployment to PyPI and GitHub Pages
25+
- tox -p: runs pre-commit, pytest, mypy and make docs
26+
- which verifies all the things that CI does
2527
- If you use VSCode, it will run black, flake8, isort and mypy on save
2628

2729
The ``skeleton`` branch of this module contains the source code that can be

docs/explanations/why-pre-commit.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ under pytest that had a plugin, and isort under flake8:
2828
}
2929
}
3030

31-
This had the advantage that a ``pipenv run tests`` run in CI would catch and
31+
This had the advantage that a ``pytest tests`` run in CI would catch and
3232
report all test failures, but made each run take longer than it needed to. Also,
3333
flake8 states that it `does not have a public, stable, Python API
3434
<https://flake8.pycqa.org/en/latest/user/python-api.html>`_ so did not
@@ -56,7 +56,7 @@ for those using other editors and for CI another solution was needed. Enter
5656
commit`` time on just the files that have changed, as well as on all tracked
5757
files by CI. All that is needed is a one time install of the git commit hook::
5858

59-
$ pipenv run pre-commit install
59+
$ pre-commit install
6060

6161
The graph now looks like:
6262

docs/explanations/why-src.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ This is tested in CI in the following way:
1919
- ``wheel`` job creates a wheel, then installs it in an isolated environment and
2020
runs the cli. This checks ``install_requirements`` are sufficient to run the
2121
cli.
22-
- ``test`` job with ``pipenv: deploy`` does an `editable install`_ of the
22+
- ``test`` job with ``lock: true`` does an `editable install`_ of the
2323
package. This is the mode that is used at development time, as modifications
2424
to sources can be tested without reinstalling.
25-
- ``test`` job with ``pipenv: skip-lock`` does a regular install, which
25+
- ``test`` job with ``lock: false`` does a regular install, which
2626
checks that all files needed for the tests are packaged with the distribution.
2727

2828
.. _editable install: https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs

docs/how-to/existing.rst

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ This will:
1616
- Push that merge branch back to the existing repo
1717
- Merge with the currently checked out branch, leaving you to fix the conflicts
1818

19-
.. note::
20-
21-
If you installed the commandline tool in a virtualenv, be sure to run
22-
``deactivate`` when you have finished running it, otherwise ``pipenv
23-
install`` will use your virtualenv rather than making its own
2419

2520
Example merge
2621
-------------
@@ -84,18 +79,15 @@ First of the boilerplate files were removed::
8479
rm 'docs/images/dls-logo.svg'
8580
rm 'src/scanspec/hello.py'
8681

87-
Then the merge conflicts were fixed, and the pipenv dependencies updated::
82+
Then the merge conflicts were fixed, and the dependencies updated::
8883

89-
$ pipenv --rm
90-
$ rm Pipfile.lock
91-
$ pipenv install --dev
84+
$ pip install -e .[dev]
9285

9386
The tests and docs were then run and checked::
9487

95-
$ pipenv run tests
96-
$ pipenv run docs
88+
$ tox -p
9789

98-
Finally the results were committed, pushed, merged to master::
90+
Finally the results were committed, pushed, merged to main::
9991

10092
$ git commit
10193
$ git push github adopt-skeleton

docs/tutorials/installation.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ Installation
33

44
.. note::
55

6-
For installation inside DLS, please see the internal documentation on
7-
``dls-python3`` and ``pipenv``. Although these instructions will work
8-
inside DLS, they are intended for external use.
9-
106
If you want to contribute to the library itself, please follow
117
the `../reference/contributing` instructions.
128

docs/tutorials/new.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,34 @@ This will:
1313
- Create a new repo at the requested path, forked from the skeleton repo
1414
- Create a single commit that modifies the skeleton with the repo and package name
1515

16-
.. note::
17-
18-
If you installed the commandline tool in a virtualenv, be sure to run
19-
``deactivate`` when you have finished running it, otherwise ``pipenv
20-
install`` will use your virtualenv rather than making its own
2116

2217
Getting started with your new repo
2318
----------------------------------
2419

25-
Your new repo has a workflow based on pipenv. The first thing to do is to use
26-
pipenv to install packages in a virtual environment::
20+
Your new repo has a workflow based on pip. The first thing to do is to use
21+
pip to install packages in a virtual environment::
2722

28-
pipenv install --dev
23+
virtual .venv
24+
source .venv/bin/activate
25+
pip install -e .[dev]
2926

30-
You can then use the ``pipenv run`` command to run shell commands within this
31-
virtual environment. For instance::
27+
You can then run any entry points declared in setup.cfg e.g.::
3228

33-
pipenv run python
29+
python3-pip-skeleton --version
3430

3531
will run the python interpreter with access to all the packages you need to
3632
develop your repo.
3733

3834
Running the tests
3935
-----------------
4036

41-
There are also some extra convenience scripts that ``pipenv run`` knows about::
37+
There are also some extra convenience scripts provided via tox::
38+
39+
tox -p
4240

43-
pipenv run tests
41+
Will run in parallel all of the checks that CI performs.
4442

45-
will run ``pytest`` to find all the unit tests and run them. The first time you
43+
It will run ``pytest`` to find all the unit tests and run them. The first time you
4644
run this, there will be some failing tests::
4745

4846
============================================================================ short test summary info ============================================================================
@@ -71,7 +69,7 @@ Building the docs
7169

7270
There is also a convenience script for building the docs::
7371

74-
pipenv run docs
72+
tox -e docs
7573

7674
You can then view the docs output with a web browse::
7775

@@ -84,7 +82,7 @@ To push the resulting repo to GitHub, first create an empty repo from the GitHub
8482
website, then run the following::
8583

8684
git remote add $(cat .gitremotes)
87-
git push -u github master
85+
git push -u github main
8886

8987
This will then run the continuous integration (CI) jobs, which run the tests and
9088
build the docs using the commands above.

src/python3_pip_skeleton/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,6 @@ def main(args=None):
266266
args.func(args)
267267

268268

269-
# test with: pipenv run python -m python3_pip_skeleton
269+
# test with: python -m python3_pip_skeleton
270270
if __name__ == "__main__":
271271
main()

0 commit comments

Comments
 (0)