Skip to content

Commit

Permalink
Removed support for test command in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
volkm committed Aug 13, 2024
1 parent e2c6a14 commit 1a08a3e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Build optional stormpy libraries
run: docker exec ci bash -c "cd /opt/stormpy; pip3 install -e '.${{ matrix.configuration.optionalLibs }}'"
- name: Run tests
run: docker exec ci bash -c "cd /opt/stormpy; python setup.py test ${{ matrix.configuration.testOpt }}"
run: docker exec ci bash -c "cd /opt/stormpy; pip install -e '.[test]'; pytest ${{ matrix.configuration.testOpt }}"


stableTest:
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
fi
- name: Run tests
if: steps.build_stormpy.outputs.run_tests == 'true'
run: docker exec ci bash -c "cd /opt/stormpy; python setup.py test"
run: docker exec ci bash -c "cd /opt/stormpy; pip install -e '.[test]'; pytest"


deploy:
Expand All @@ -99,7 +99,7 @@ jobs:
- name: Run Docker
run: docker run -d -it --name ci movesrwth/stormpy:${{ matrix.buildType.dockerTag }}
- name: Run tests
run: docker exec ci bash -c "cd /opt/stormpy; python setup.py test"
run: docker exec ci bash -c "cd /opt/stormpy; pip install -e '.[test]'; pytest"

- name: Login into docker
# Only login if using master on original repo (and not for pull requests or forks)
Expand Down
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[tool.black]
line-length = 160
target-version = [
"py37",
"py38",
"py39",
"py310",
"py311",
]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--doctest-glob='*.rst' --nbval"
testpaths = [
"tests",
"examples",
"doc",
]
python_files = [
"test*.py",
"examples/*.py",
]
python_functions = [
"*_test",
"test_*",
"example_*",
]
8 changes: 0 additions & 8 deletions setup.cfg

This file was deleted.

3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,12 @@ def finalize_options(self):
zip_safe=False,
install_requires=['pycarl>=2.2.0'],
setup_requires=['pycarl>=2.2.0', # required to check pybind version used for pycarl
'pytest-runner',
'packaging'
],
tests_require=['pytest', 'nbval', 'numpy'],
extras_require={
"numpy": ["numpy"],
"plot": ["matplotlib","numpy","scipy"],
"test": ["pytest", "nbval", "numpy"],
"doc": ["Sphinx", "sphinx-bootstrap-theme", "nbsphinx", "ipython", "ipykernel"], # also requires pandoc to be installed
},
python_requires='>=3.7', # required by packaging
Expand Down

0 comments on commit 1a08a3e

Please sign in to comment.