-
Notifications
You must be signed in to change notification settings - Fork 303
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
Move tests_require to special "tests" extra for easier installation #1830
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1830 +/- ##
==========================================
- Coverage 93.03% 93.03% -0.01%
==========================================
Files 268 268
Lines 39625 39628 +3
==========================================
+ Hits 36865 36866 +1
- Misses 2760 2762 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Ftr, I started using poetry in another repo, works great, also for tests. |
|
For reference, the pyproject.toml file of my local package (which is a satpy plugin): [tool.poetry]
name = "satpy-ctth-fm-plugin"
version = "0.0.0"
description = ""
authors = ["Martin Raspaud <martin.raspaud@smhi.se>"]
include = ["etc/*/*.yaml"]
[tool.poetry.dependencies]
python = "^3.7"
satpy = "^0.29.0"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.plugins."satpy.composites"]
"ctth_fm" = "satpy_ctth_fm_plugin"
[tool.poetry-dynamic-versioning]
enable = true |
|
|
Based on the discussion in #1829, I thought it would be best to clear up some of the confusion in the developer's guide about running tests and test dependencies. I realized while commenting on that issue that
tests_require
insetup.py
no longer serve any purpose as we don't usepython setup.py test
to run our tests. As far as I can tell there is no fully supported way currently to define your test dependencies except as an "extra" insetup.py
.As part of this work I looked into how you are supposed to define things in
pyproject.toml
. Although there are some examples, it didn't seem like a fully supported method. I mean, completely replacing our setup.py static information with metadata in pyproject.toml seems like more work and seems like it may not be fully supported bypip
and other tools right now. I think we can save that for a later time and let larger projects run into the gotchas first. I know projects like xarray already define everything in theirsetup.cfg
.For reference: https://www.python.org/dev/peps/pep-0621