diff --git a/README.rst b/README.rst index 4121c8c..7e94455 100644 --- a/README.rst +++ b/README.rst @@ -18,7 +18,7 @@ Curver is a program for performing calculations in the curve complex. It implements the Bell--Webb algorithm to determine the Nielsen--Thurston type of a mapping class. This algorithm runs in polynomial time but the constants involved currently make this implementation impractical. -Curver officially supports Python 3.7 -- 3.11. +Curver officially supports Python 3.8 -- 3.12. Unoffically, it also runs on `PyPy`_ and `Sage`_ with some care. Quickstart diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..fa1a645 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,36 @@ + +build: false + +environment: + matrix: + - PYTHON: "C:\\Python38" + TOXENV: "lint" + + - PYTHON: "C:\\Python38" + TOXENV: "py38" + + - PYTHON: "C:\\Python39" + TOXENV: "py39" + + - PYTHON: "C:\\Python310" + TOXENV: "py310" + + - PYTHON: "C:\\Python311" + TOXENV: "py311" + + - PYTHON: "C:\\Python312" + TOXENV: "py312" + +init: + - set "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - echo "%PYTHON%" + - python -c "import sys; print(sys.version)" + - pip --version + +install: + - pip install virtualenv --upgrade + - pip install tox + +test_script: + - tox -- --hypothesis-profile=ci --durations=20 -v + diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..263f1de --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,50 @@ + +trigger: + branches: + include: + - '*' + tags: + include: + - 'v*' + +jobs: +- job: 'Test' + pool: + vmImage: 'Ubuntu-22.04' + strategy: + matrix: + Lint: + python.version: '3.8' + TOXENV: 'lint' + Python38: + python.version: '3.8' + TOXENV: 'py38' + Python39: + python.version: '3.9' + TOXENV: 'py39' + Python310: + python.version: '3.10' + TOXENV: 'py310' + Python311: + python.version: '3.11' + TOXENV: 'py311' + Python312: + python.version: '3.12' + TOXENV: 'py312' + + steps: + - task: UsePythonVersion@0 + displayName: 'Use Python $(python.version)' + inputs: + versionSpec: '$(python.version)' + - script: pip install tox + displayName: 'Install tox' + - script: tox -- --hypothesis-profile=ci --durations=20 --junitxml=results.xml -v + displayName: 'Run tox' + - task: PublishTestResults@2 + displayName: 'Publish results file' + condition: startswith(variables['TOX_ENV'], 'py') + inputs: + testResultsFiles: 'results.xml' + testRunTitle: 'Test results for Python $(python.version)' + diff --git a/curver/kernel/utilities.py b/curver/kernel/utilities.py index 0b411a4..8baf667 100644 --- a/curver/kernel/utilities.py +++ b/curver/kernel/utilities.py @@ -59,7 +59,7 @@ def maximin(*iterables): for item in iterable: if item <= result: break - if item < best: + if item < best: # pylint: disable=consider-using-min-builtin best = item else: # We never broke out, so best > result result = best diff --git a/tests/conftest.py b/tests/conftest.py index 132a0b0..19deb41 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,8 +14,8 @@ def pytest_collection_modifyitems(config, items): item.add_marker(skip_slow) -settings.register_profile('ci', settings(deadline=None, suppress_health_check=(HealthCheck.too_slow,))) -settings.register_profile('dev', settings(deadline=None, suppress_health_check=(HealthCheck.too_slow,), max_examples=5)) -settings.register_profile('debug', settings(deadline=None, suppress_health_check=(HealthCheck.too_slow,), max_examples=5, verbosity=Verbosity.verbose)) +settings.register_profile('ci', settings(deadline=None, suppress_health_check=(HealthCheck.too_slow, HealthCheck.differing_executors))) +settings.register_profile('dev', settings(deadline=None, suppress_health_check=(HealthCheck.too_slow, HealthCheck.differing_executors), max_examples=5)) +settings.register_profile('debug', settings(deadline=None, suppress_health_check=(HealthCheck.too_slow, HealthCheck.differing_executors), max_examples=5, verbosity=Verbosity.verbose)) settings.load_profile(os.getenv(u'HYPOTHESIS_PROFILE', 'dev'))