-
Notifications
You must be signed in to change notification settings - Fork 8
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
Convert setup.cfg
to pyproject.toml
#260
Changes from all commits
83cdc8e
0fd3e0c
7ff6ccf
eafc35a
39ccd74
cfcc6b9
d437a1f
9480923
511d083
610c5c7
c8d39f4
5340537
b6838f0
26cbaa5
b96848a
65ea019
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,94 @@ requires = [ | |
"setuptools>=50", | ||
"setuptools_scm>=6", | ||
"wheel>=0.34", | ||
] # ought to mirror 'requirements/build.txt' | ||
] | ||
|
||
[project] | ||
name = "xrtpy" | ||
readme = "README.md" | ||
keywords = ["solar physics"] | ||
description = "For analyzing data from the X-Ray Telescope (XRT) on the Hinode spacecraft." | ||
license = {file = "LICENSE"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed this from |
||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Scientific/Engineering :: Astronomy", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
] | ||
# SPEC 0 recommends that packages in the scientific pythoniverse support | ||
# versions of Python that have been released in the last ≤36 months | ||
requires-python = ">=3.9" | ||
Comment on lines
+29
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's the link to SPEC 0. We could drop Python 3.9 anytime. |
||
dynamic = ["version"] | ||
authors = [ | ||
{name = "Joy Velasquez", email = "[email protected]"}, | ||
{name = "Jonathan Slavin", email = "[email protected]"}, | ||
{name = "Nick Murpy", email="[email protected]"}, | ||
{name = "Will Barnes"}, | ||
{name = "Stuart Mumford"}, | ||
] | ||
|
||
dependencies = [ | ||
"astropy >= 5.1", | ||
"cached-property >= 1.5.2", | ||
"matplotlib >= 3.5.0", | ||
"numpy >= 1.24.0", | ||
"requests >= 2.28.0", | ||
"scikit-image >= 0.19.0", | ||
"scipy >= 1.8.0", | ||
# install setuptools to get pkg_resources | ||
"setuptools; python_version >= '3.12'", | ||
"sunpy[map] >= 4.0.0", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"nox >= 2022.8.7", | ||
"pre-commit >= 3.6.0", | ||
] | ||
Comment on lines
+55
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
tests = [ | ||
"pytest >= 8.0.0", | ||
"pytest-allclose >= 1.0.0", | ||
"pytest-xdist >= 3.6.1", | ||
] | ||
Comment on lines
+59
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can install Similarly, we can do |
||
docs = [ | ||
"docutils >= 0.19", | ||
"imageio >= 2.20.0", | ||
"ipykernel >= 6.20.0", | ||
"ipython >= 8.4.0", | ||
"ipywidgets >= 8.1.0", | ||
"jinja2 != 3.1, >= 3.0.0", | ||
"nbconvert >= 7.7.0, < 7.14", | ||
"nbsphinx >= 0.9", | ||
"numpydoc >= 1.5.0", | ||
"pillow >= 9.1.0", | ||
"pygments >= 2.12.0", | ||
"sphinx >= 7.3.0", | ||
"sphinx-changelog >= 1.5.0", | ||
"sphinx-codeautolink >= 0.15.2", | ||
"sphinx-copybutton >= 0.5.2", | ||
"sphinx-gallery >= 0.16.0", | ||
"sphinx-hoverxref >= 1.4.0", | ||
"sphinx-issues >= 4.1.0", | ||
"sphinx_automodapi >= 0.17.0", | ||
"sphinx_rtd_theme >= 2.0.0", | ||
"sphinxcontrib-bibtex >= 2.6.2", | ||
"sunpy[net] >= 4.0.0", | ||
"towncrier >= 23.11.0", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://xrtpy.readthedocs.io" | ||
Repository = "https://github.com/HinodeXRT/xrtpy" | ||
Issues = "https://github.com/HinodeXRT/xrtpy/issues" | ||
Changelog = "https://xrtpy.readthedocs.io/en/stable/changelog/index.html" | ||
|
||
[tool.ruff] | ||
target-version = "py39" | ||
|
@@ -17,7 +104,6 @@ extend-exclude = [ | |
] | ||
namespace-packages = [".github/workflows", "docs"] | ||
|
||
|
||
[tool.ruff.lint] | ||
# Find info about ruff rules at: https://docs.astral.sh/ruff/rules | ||
extend-select = [ | ||
|
@@ -78,7 +164,6 @@ ignore = [ | |
"TRY003", # raise-vanilla-args | ||
] | ||
|
||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"__init__.py" = ["E402", "F401", "F402", "F403"] # ignore import errors | ||
"docs/notebooks/computing_functions/temperature_response.ipynb" = ["A001"] # filter variable shadows Python builtin | ||
|
@@ -108,6 +193,37 @@ tne, | |
ue | ||
""" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ['xrtpy', 'docs'] | ||
xfail_strict = true | ||
doctest_optionflags = """ | ||
NORMALIZE_WHITESPACE | ||
ELLIPSIS | ||
NUMBER | ||
IGNORE_EXCEPTION_DETAIL""" | ||
norecursedirs = [ | ||
'build', | ||
'docs/_build', | ||
'examples', | ||
'auto_examples', | ||
] | ||
addopts = [ | ||
'--doctest-modules', | ||
'--doctest-continue-on-failure', | ||
'--ignore=docs/conf.py', | ||
] | ||
|
||
[tool.setuptools] | ||
packages = ["xrtpy"] | ||
|
||
[tool.setuptools.package-data] | ||
"xrtpy" = ["data/*"] | ||
"xrtpy.response" = ["data/*.txt", "data/*.geny"] | ||
"xrtpy.response.tests" = ["data/*/*/*.txt"] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "xrtpy/version.py" | ||
|
||
[tool.towncrier] | ||
package = "xrtpy" | ||
name = "XRTpy" | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes like these allow us to bypass the need for having the requirements files specified in the
requirements/
directory. We'll be installing the dependencies for running tests based on the dependency sets inpyproject.toml
instead, so dependencies will only need to be included in one place.