-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#316 - Switch to using plain pyproject.toml
- Manage dependencies in requirements files - Use pip-tools to manage dependencies - Remove poetry
- Loading branch information
Showing
13 changed files
with
351 additions
and
1,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,44 @@ | ||
.PHONY: docs tests | ||
PYTHON_FILES = cassis tests | ||
|
||
clean: | ||
rm -Rf build dkpro_cassis.egg-info dist | ||
|
||
# Dependencies | ||
pin: | ||
rm requirements.txt requirements-dev.txt requirements-doc.txt | ||
pip-compile -o requirements.txt pyproject.toml | ||
pip-compile --extra dev -o requirements-dev.txt pyproject.toml | ||
pip-compile --extra doc -o requirements-doc.txt pyproject.toml | ||
|
||
dependencies: | ||
poetry install | ||
pip install pip-tools | ||
pip-sync requirements.txt requirements-dev.txt | ||
|
||
# Tests | ||
unit-tests: | ||
poetry run py.test --cov=cassis --cov-branch --cov-fail-under=90 tests | ||
python -m pytest --cov=cassis --cov-branch --cov-fail-under=90 tests | ||
|
||
tests: unit-tests integ-tests | ||
|
||
coverage: | ||
poetry run py.test --cov=cassis --cov-branch --cov-fail-under=90 --cov-report=xml:coverage.xml -m "not performance" tests | ||
python -m pytest --cov=cassis --cov-branch --cov-fail-under=90 --cov-report=xml:coverage.xml -m "not performance" tests | ||
|
||
# Static analysis/linting | ||
format: | ||
poetry run ruff format $(PYTHON_FILES) | ||
ruff format $(PYTHON_FILES) | ||
|
||
lint: | ||
# stop the build if there are Python syntax errors or undefined names | ||
poetry run ruff check --select=E9,F63,F7,F82 --output-format=full $(PYTHON_FILES) | ||
ruff check --select=E9,F63,F7,F82 --output-format=full $(PYTHON_FILES) | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
poetry run ruff check --exit-zero $(PYTHON_FILES) | ||
ruff check --exit-zero $(PYTHON_FILES) | ||
|
||
# Docs | ||
docs: | ||
cd docs && make html | ||
|
||
# Building and publishing | ||
build: unit-tests lint | ||
poetry build | ||
|
||
publish: build | ||
poetry publish | ||
|
||
# CI | ||
|
||
ci-publish: | ||
poetry publish --build --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --no-interaction | ||
|
||
ci-bump-version: | ||
poetry run bump2version patch | ||
python -m build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
pytest~=7.2 | ||
tox~=3.24 | ||
lxml-asserts~=0.1 | ||
pytest-lazy-fixture~=0.6 | ||
pytest-cov~=3.0 | ||
codecov~=2.1 | ||
rstcheck~=3.3 | ||
docutils~=0.20,!=0.21.* | ||
ruff~=0.4.3 | ||
pip-tools~=7.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.9 | ||
# by the following command: | ||
# | ||
# pip-compile --extra=dev --output-file=requirements-dev.txt pyproject.toml | ||
# | ||
attrs==23.2.0 | ||
# via dkpro-cassis (pyproject.toml) | ||
build==1.2.1 | ||
# via pip-tools | ||
certifi==2024.2.2 | ||
# via requests | ||
charset-normalizer==3.3.2 | ||
# via requests | ||
click==8.1.7 | ||
# via pip-tools | ||
codecov==2.1.13 | ||
# via dkpro-cassis (pyproject.toml) | ||
coverage[toml]==7.5.1 | ||
# via | ||
# codecov | ||
# pytest-cov | ||
deprecation==2.1.0 | ||
# via dkpro-cassis (pyproject.toml) | ||
distlib==0.3.8 | ||
# via virtualenv | ||
docutils==0.20.1 | ||
# via | ||
# dkpro-cassis (pyproject.toml) | ||
# rstcheck | ||
exceptiongroup==1.2.1 | ||
# via pytest | ||
filelock==3.14.0 | ||
# via | ||
# tox | ||
# virtualenv | ||
idna==3.7 | ||
# via requests | ||
importlib-metadata==7.1.0 | ||
# via build | ||
importlib-resources==5.13.0 | ||
# via dkpro-cassis (pyproject.toml) | ||
iniconfig==2.0.0 | ||
# via pytest | ||
lxml==4.9.4 | ||
# via | ||
# dkpro-cassis (pyproject.toml) | ||
# lxml-asserts | ||
lxml-asserts==0.1.2 | ||
# via dkpro-cassis (pyproject.toml) | ||
more-itertools==8.14.0 | ||
# via dkpro-cassis (pyproject.toml) | ||
packaging==24.0 | ||
# via | ||
# build | ||
# deprecation | ||
# pytest | ||
# tox | ||
pip-tools==7.4.1 | ||
# via dkpro-cassis (pyproject.toml) | ||
platformdirs==4.2.1 | ||
# via virtualenv | ||
pluggy==1.5.0 | ||
# via | ||
# pytest | ||
# tox | ||
py==1.11.0 | ||
# via tox | ||
pyproject-hooks==1.1.0 | ||
# via | ||
# build | ||
# pip-tools | ||
pytest==7.4.4 | ||
# via | ||
# dkpro-cassis (pyproject.toml) | ||
# pytest-cov | ||
# pytest-lazy-fixture | ||
pytest-cov==3.0.0 | ||
# via dkpro-cassis (pyproject.toml) | ||
pytest-lazy-fixture==0.6.3 | ||
# via dkpro-cassis (pyproject.toml) | ||
requests==2.31.0 | ||
# via codecov | ||
rstcheck==3.5.0 | ||
# via dkpro-cassis (pyproject.toml) | ||
ruff==0.4.3 | ||
# via dkpro-cassis (pyproject.toml) | ||
six==1.16.0 | ||
# via tox | ||
sortedcontainers==2.4.0 | ||
# via dkpro-cassis (pyproject.toml) | ||
tomli==2.0.1 | ||
# via | ||
# build | ||
# coverage | ||
# pip-tools | ||
# pytest | ||
# tox | ||
toposort==1.10 | ||
# via dkpro-cassis (pyproject.toml) | ||
tox==3.28.0 | ||
# via dkpro-cassis (pyproject.toml) | ||
urllib3==2.2.1 | ||
# via requests | ||
virtualenv==20.26.1 | ||
# via tox | ||
wheel==0.43.0 | ||
# via pip-tools | ||
zipp==3.18.1 | ||
# via | ||
# importlib-metadata | ||
# importlib-resources | ||
|
||
# The following packages are considered to be unsafe in a requirements file: | ||
# pip | ||
# setuptools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sphinx | ||
sphinx-autodoc-typehints | ||
sphinx-rtd-theme | ||
docutils~=0.20,!=0.21.* |
Oops, something went wrong.