From 79e4bb94d501d30735c17c4bae22f83715325f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20M=C3=BCller?= Date: Wed, 10 Mar 2021 11:05:25 +0100 Subject: [PATCH] setup: setup.py test is deprecated --- appveyor.yml => .appveyor.yml | 2 +- .github/workflows/check.yml | 2 +- CHANGELOG | 1 + README.rst | 16 +++++++--------- setup.cfg | 3 --- setup.py | 2 -- 6 files changed, 10 insertions(+), 16 deletions(-) rename appveyor.yml => .appveyor.yml (97%) diff --git a/appveyor.yml b/.appveyor.yml similarity index 97% rename from appveyor.yml rename to .appveyor.yml index bc081ec3..e4347afb 100644 --- a/appveyor.yml +++ b/.appveyor.yml @@ -47,7 +47,7 @@ test_script: - appveyor-retry pip install pytest - appveyor-retry pip install coverage - appveyor-retry pip install codecov - - coverage run --source=dclab ./setup.py test + - coverage run --source=dclab -m pytest tests - coverage report -m # Allow codecov to fail - codecov || exit 0 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 566c014f..e76690ec 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -32,7 +32,7 @@ jobs: pip freeze - name: Test with pytest run: | - coverage run --source=dclab setup.py test + coverage run --source=dclab -m pytest tests - name: Lint with flake8 run: | flake8 . diff --git a/CHANGELOG b/CHANGELOG index 873c29b3..2d4c713b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ 0.33.0 - feat: introduce user-defined temporary features (point 2 in #98) + - setup: remove deprecated setup.py test 0.32.5 - fix: add check for zero-flow rate in dclab-verify-dataset - setup: added new file CREDITS for docs and only use maintainer diff --git a/README.rst b/README.rst index 5d5ee460..eba399c3 100644 --- a/README.rst +++ b/README.rst @@ -41,15 +41,12 @@ once you are done making your changes. Please make sure to edit the `Changelog `__. -**Very important:** Please always try to use +**Very important:** Please always try to use :: -:: git pull --rebase -instead of - -:: +instead of:: git pull @@ -58,7 +55,10 @@ to prevent confusions in the commit history. Tests ~~~~~ dclab is tested using pytest. If you have the time, please write test -methods for your code and put them in the ``tests`` directory. +methods for your code and put them in the ``tests`` directory. To run +the tests, install `pytest` and run:: + + pytest tests Incrementing version @@ -66,9 +66,7 @@ Incrementing version Dclab currently gets its version from the latest git tag. If you think that a new version should be published, create a tag on the master branch (if you have the necessary -permissions to do so): - -:: +permissions to do so):: git tag -a "0.1.3" git push --tags origin diff --git a/setup.cfg b/setup.cfg index c831c977..0c9e0fc1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,2 @@ -[aliases] -test = pytest - [metadata] license_file = LICENSE diff --git a/setup.py b/setup.py index 2c6e9e0d..6ef5fcc4 100644 --- a/setup.py +++ b/setup.py @@ -65,9 +65,7 @@ ), ], # not to be confused with definitions in pyproject.toml [build-system] - setup_requires=["pytest-runner"], python_requires=">=3.6", - tests_require=["pytest", "urllib3"] + extras_require["all"], extras_require=extras_require, entry_points={ "console_scripts": [