-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move build configuration from
setup.cfg
to pyproject.toml
- Loading branch information
1 parent
60469c6
commit b4cca5b
Showing
7 changed files
with
123 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# flake8 does not support pyproject.toml (https://github.com/PyCQA/flake8/issues/234) | ||
|
||
[flake8] | ||
max-line-length = 79 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,109 @@ | ||
[project] | ||
name = "packagename" | ||
description = "My pretty cool package" | ||
requires-python = ">=3.7" | ||
authors = [ | ||
{ name = "STScI", email = "[email protected]" }, | ||
] | ||
keywords = [ | ||
"astronomy", | ||
"astrophysics", | ||
] | ||
classifiers = [ | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Scientific/Engineering :: Astronomy", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
] | ||
dependencies = [ | ||
"numpy>=1.17", | ||
"astropy>=4", | ||
] | ||
dynamic = [ | ||
"version", | ||
] | ||
|
||
[project.readme] | ||
file = "README.rst" | ||
content-type = "text/x-rst" | ||
|
||
[project.license] | ||
file = "LICENSE.rst" | ||
content-type = "text/plain" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/spacetelescope/stsci-package-template" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"pytest-astropy-header", | ||
"pytest-doctestplus", | ||
] | ||
docs = [ | ||
"sphinx-automodapi", | ||
"stsci_rtd_theme", | ||
] | ||
|
||
[project.scripts] | ||
stsci_package_template_example = "packagename.example_mod:main" | ||
|
||
[build-system] | ||
requires = ["setuptools", | ||
"setuptools_scm", | ||
"wheel"] | ||
requires = [ | ||
"setuptools>=61.2", | ||
"setuptools_scm[toml]>=3.4", | ||
"wheel", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
zip-safe = false | ||
include-package-data = true | ||
|
||
[tool.setuptools.packages.find] | ||
namespaces = false | ||
|
||
[tool.setuptools.package-data] | ||
packagename = [ | ||
"data/*", | ||
] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "packagename/version.py" | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "5.0" | ||
norecursedirs = [ | ||
"build", | ||
"docs/_build", | ||
] | ||
astropy_header = true | ||
doctest_plus = "enabled" | ||
|
||
[tool.coverage.run] | ||
source = [ | ||
"packagename", | ||
] | ||
omit = [ | ||
"packagename/tests/*", | ||
"packagename/version*", | ||
"*/packagename/tests/*", | ||
"*/packagename/version*", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"pragma: no cover", | ||
"except ImportError", | ||
"raise AssertionError", | ||
"raise NotImplementedError", | ||
"def main\\(.*\\):", | ||
"pragma: py{ignore_python_version}", | ||
"def _ipython_key_completions_", | ||
] | ||
|
||
[tool.build_sphinx] | ||
edit-on-github = false | ||
github-project = "spacetelescope/stsci-package-template" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters