-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Meta-ticket: Adopt mainstream Python testing/linting infrastructure: tox, pytest, ..., describe in Developer's Guide #28936
Comments
Replying to @mkoeppe:
I don't know what you mean by "preferred interface" here. There isn't really any such thing as a preferred interface. It's just being proposed here as a recommendation over The main advantage to tox is the ability to run a package's tests across multiple runtime environments (esp. different Python versions). This isn't really possible currently with Sage; it would actually be very difficult to use tox in any sensible manner with Sage. If someone wants to do this anyways I don't see the harm really, but I'm not sure what problem it would be solving. |
comment:4
A first step: #28987 |
comment:5
Replying to @embray:
FWIW, I managed to use |
comment:6
I have broadened the ticket description. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:8
pushing these forward to 9.2 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:31
What do you think about using pytest-cov for generating the test coverage report? The results can then be uploded to codecov as part of the build process (github action). This gives a nice overview of the actual test coverage (i.e. code covered by tests) and could replace the sage-coverage scripts in the future. |
comment:32
+1 on investigating this. Myself I have no experience with the available tools (including the |
This metaticket proposes to use mainstream Python testing and linting infrastructure for Sage -- by adding configuration files and documentation.
tox:
src/tox.ini
: As an alternative interface to running the sage doctester.src/tox.ini
: Check patchbot plugin patternspytest:
sage.numerical.backends
: Replace use ofTestSuite
bypytest
test_...
functions to avoid the naming scheme reserved by pytestsage -t
: Do not run pytest on individual Python files unless they match the pytest file patternsage -pytest
test_...
classes to avoid the naming scheme reserved by pytestpytest
a standard packagesage.geometry.polyhedron
: Replace use ofTestSuite
bypytest
Other tickets:
"sage -startuptime" should accept file names too #30452 ("sage -startuptime" should accept file names too)
Add pyright config and linting documentation #30361 (Add pyright config and linting documentation; dup: sage developer's guide should mention pyflakes #17992)
sage -t : Write report in JUnitXML format #33232 (
sage -t
: Write report in JUnitXML format)Remove pyflakes? #30415 (Remove pyflakes?)
Documentation tickets:
Update section "Sage Development Process" in Developer's Guide #29784 Update section "Sage Development Process" in Developer's Guide
Mention .lgtm.yml in the Developer's Guide #29520: Mention .lgtm.yml in the Developer's Guide
Infrastructure tickets:
Meta-ticket: Migration from Trac to GitHub #30363 Replace patchbot by github actions (part of https://trac.sagemath.org/ticket/)
Use pre-commit https://pre-commit.com/
Use pipenv in place of venv https://pipenv.pypa.io/en/latest/#
See also:
Meta-ticket Meta-ticket: Add Dockerfiles and CI scripts for integration testing of source and binary distributions and of downstream packages #29060: Add Dockerfiles and CI scripts for integration testing of source and binary distributions and of downstream packages
Generalize
sage.numerical.backends.logging_backend.LoggingBackend
to help generate_test
methodsAdd script-type _spkg_check package that installs tox, mock, pytest etc. #28998: Add script-type check_dependencies package that installs tox, mock, pytest etc.
Extensive description of different linters: https://github.com/vintasoftware/python-linters-and-code-analysis
CC: @jdemeyer @dimpase @embray @videlec @fchapoton @tscrim @jm58660 @tobiasdiez @kliem @nthiery @tornaria
Component: doctest framework
Issue created by migration from https://trac.sagemath.org/ticket/28936
The text was updated successfully, but these errors were encountered: