Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test minimum versions and decrease the lower bounds for dependencies to earliest versions that pass #4

Merged
merged 1 commit into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ jobs:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
# This is used for injecting additional tests for a specific python
# version and OS.
suffix: [""]
include:
- python-version: "3.7"
os: ubuntu-latest
extensive-tests: true
TOXENV_SUFFIX: "-docs"
- python-version: "3.7"
os: ubuntu-latest
extensive-tests: true
suffix: "-min"
TOXENV_SUFFIX: "-min"
- python-version: "3.8"
os: ubuntu-latest
TOX_EXTRA_COMMAND: "- isort --check-only --diff ."
Expand Down Expand Up @@ -80,23 +88,24 @@ jobs:
task \
TOX_EXTRA_COMMAND="${{ matrix.TOX_EXTRA_COMMAND }}" \
OS=${{ matrix.os }} \
MATRIX_SUFFIX=${{ matrix.suffix }} \
EXTENSIVE=${{ matrix.extensive-tests || 'false' }} \
TOX_PYTHON_VERSION=${{ matrix.python-version }} \
TOXENV_SUFFIX=${{ matrix.TOXENV_SUFFIX }} \
TOX_JUNIT_XML_PREFIX=${{ matrix.python-version }}-${{ matrix.os }}- \
TOX_JUNIT_XML_PREFIX=${{ matrix.python-version }}-${{ matrix.os }}${{matrix.suffix}}- \
gha:validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
if: ${{ (success() || failure()) }}
with:
name: ${{ matrix.python-version }}-${{ matrix.os }}-mypy-junit-xml
path: test_reports/${{ matrix.python-version }}-${{ matrix.os }}-mypy-junit.xml
name: ${{ matrix.python-version }}-${{ matrix.os }}${{matrix.suffix}}-mypy-junit-xml
path: test_reports/${{ matrix.python-version }}-${{ matrix.os }}${{matrix.suffix}}-mypy-junit.xml
- uses: actions/upload-artifact@v3
if: ${{ (success() || failure()) }}
with:
name: ${{ matrix.python-version }}-${{ matrix.os }}-pytest-junit-xml
path: test_reports/${{ matrix.python-version }}-${{ matrix.os }}-pytest-junit.xml
name: ${{ matrix.python-version }}-${{ matrix.os }}${{matrix.suffix}}-pytest-junit-xml
path: test_reports/${{ matrix.python-version }}-${{ matrix.os }}${{matrix.suffix}}-pytest-junit.xml
extra-tasks:
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ tasks:
desc: GitHub Actions Validation Workflow
env:
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: "{{.OS}}-{{.TOX_PYTHON_VERSION}}"
COVERALLS_FLAG_NAME: "{{.OS}}-{{.TOX_PYTHON_VERSION}}{{.MATRIX_SUFFIX}}"
COVERALLS_SERVICE_NAME: '{{.COVERALLS_SERVICE_NAME | default (env "COVERALLS_SERVICE_NAME") | default "github"}}'
cmds:
- task: install:system-deps
Expand Down
9 changes: 9 additions & 0 deletions devtools/constraints-min.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file selects minimum versions to ensure that the test suite passes on
# these versions.
isodate==0.6.0
pyparsing==2.1.0
importlib-metadata==4.0.0
berkeleydb==18.1.2
networkx==2.0
html5lib==1.0.1
lxml==4.3.0
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ rdfgraphisomorphism = 'rdflib.tools.graphisomorphism:main'

[tool.poetry.dependencies]
python = "^3.7"
isodate = "^0.6.1"
pyparsing = "^3.0.9"
importlib_metadata = {version = "^4.2.0", python = ">=3.7,<3.8"}
berkeleydb = {version = "^18.1.5", optional = true}
networkx = {version = "^2.6.2", optional = true}
html5lib = {version = "^1.1", optional = true}
lxml = {version = "^4.9.2", optional = true}
isodate = "^0.6.0"
pyparsing = ">=2.1.0,<4"
importlib-metadata = {version = "^4.0.0", python = ">=3.7,<3.8"}
berkeleydb = {version = "^18.1.0", optional = true}
networkx = {version = "^2.0.0", optional = true}
html5lib = {version = "^1.0", optional = true}
lxml = {version = "^4.3.0", optional = true}

[tool.poetry.group.dev.dependencies]
black = "22.12.0"
Expand Down
6 changes: 3 additions & 3 deletions test/test_sparql/test_prefixed_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def blank_graph() -> Graph:
["pname_ns", "pname", "expected_result"],
itertools.chain(
[
("eg", "invalid/PN_PREFIX", pyparsing.exceptions.ParseException),
("eg", "invalid/PN_PREFIX", pyparsing.ParseException),
("", "eg:a", Exception),
("", ":invalid PN_LOCAL", pyparsing.exceptions.ParseException),
("", ":invalid/PN_LOCAL", pyparsing.exceptions.ParseException),
("", ":invalid PN_LOCAL", pyparsing.ParseException),
("", ":invalid/PN_LOCAL", pyparsing.ParseException),
("", ":a:b:c", PNAME_PREFIX["a:b:c"]),
("", ":", URIRef(f"{PNAME_PREFIX}")),
("", ":a", PNAME_PREFIX.a),
Expand Down
20 changes: 20 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://tox.wiki/en/latest/user_guide.html
# https://tox.wiki/en/latest/config.html
[tox]
envlist =
Expand Down Expand Up @@ -56,6 +57,25 @@ commands_pre =
commands =
poetry run sphinx-build -T -W -b html -d {envdir}/doctree docs docs/_build/html

[testenv:py37-extensive-min]
base = void
deps =
pytest==7.*
pytest-cov==4.*
setenv =
BERKELEYDB_DIR = /usr
COVERAGE_FILE = {env:COVERAGE_FILE:{toxinidir}/.coverage.{envname}}
PIP_CONSTRAINT = devtools/constraints-min.txt
extras =
berkeleydb
networkx
lxml
html
commands =
{envpython} --version
pip freeze
{posargs:{envpython} -m pytest -ra --tb=native {env:TOX_PYTEST_ARGS:--junit-xml=test_reports/{env:TOX_JUNIT_XML_PREFIX:}pytest-junit.xml --cov --cov-report=}}

[testenv:precommit{,all}]
skip_install = true
deps = pre-commit
Expand Down