-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packaging updates to modernize and fix version number (#29)
- Loading branch information
Showing
5 changed files
with
117 additions
and
176 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
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,48 +1,99 @@ | ||
[build-system] | ||
|
||
requires = ["setuptools", | ||
"setuptools_scm", | ||
requires = ["setuptools>=45", | ||
"setuptools_scm[toml]>=6.2", | ||
"wheel"] | ||
|
||
build-backend = 'setuptools.build_meta' | ||
|
||
[tool.towncrier] | ||
package = "hermes_{{ cookiecutter.instr_name }}" | ||
filename = "CHANGELOG.rst" | ||
directory = "changelog/" | ||
issue_format = "`#{issue} <https://github.com/HERMES-SOC/hermes_{{ cookiecutter.instr_name }}/pull/{issue}>`__" | ||
|
||
[[tool.towncrier.type]] | ||
directory = "breaking" | ||
name = "Backwards Incompatible Changes" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "api" | ||
name = "API Changes" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "removal" | ||
name = "Deprecations and Removals" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "feature" | ||
name = "Features" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "bugfix" | ||
name = "Bug Fixes" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "doc" | ||
name = "Improved Documentation" | ||
showcontent = true | ||
|
||
[[tool.towncrier.type]] | ||
directory = "trivial" | ||
name = "Trivial/Internal Changes" | ||
showcontent = true | ||
[project] | ||
name = "hermes_{{ cookiecutter.instr_name }}" | ||
description = "A Python package to process and analyze data from the HERMES {{ cookiecutter.instr_name }} instrument." | ||
readme = "README.rst" | ||
dynamic = ["version"] | ||
authors = [{name = "Steven Christe", email="steven.d.christe@nasa.gov"}, | ||
{name = "Damian Barrous Dumme", email="damianbarrous@gmail.com"}] | ||
license = {file = "LICENSE.rst"} | ||
requires-python = ">=3.7" | ||
keywords = ["hermes", "nasa mission", "space weather"] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"License :: OSI Approved :: Apache 2.0", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
] | ||
dependencies = [ | ||
'astropy>=4.1.0', | ||
'numpy>=1.16.0', | ||
'hermes_core @ git+https://github.com/HERMES-SOC/hermes_core/', | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
'coverage>=5.0.3', | ||
'pytest', | ||
'pytest-astropy', | ||
'pytest-cov', | ||
'black', | ||
'flake8', | ||
'coverage[toml]' | ||
] | ||
|
||
docs = [ | ||
'sphinx', | ||
'sphinx-automodapi' | ||
] | ||
|
||
test = [ | ||
'pytest', | ||
'pytest-astropy', | ||
'pytest-cov', | ||
'coverage[toml]' | ||
] | ||
|
||
style = [ | ||
'black', | ||
'flake8' | ||
] | ||
|
||
[tool.setuptools.package-data] | ||
"hermes_{{ cookiecutter.instr_name }}.data" = ["**"] | ||
|
||
[tool.setuptools] | ||
packages = ["hermes_{{ cookiecutter.instr_name }}"] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "hermes_{{ cookiecutter.instr_name }}/_version.py" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = [ | ||
"hermes_{{ cookiecutter.instr_name }}/tests", | ||
"docs" | ||
] | ||
doctest_plus = "enabled" | ||
text_file_format = "rst" | ||
addopts = "--doctest-rst" | ||
|
||
[tool.coverage.run] | ||
omit = [ | ||
'hermes_{{ cookiecutter.instr_name }}/__init*', | ||
'hermes_{{ cookiecutter.instr_name }}/conftest.py', | ||
'hermes_{{ cookiecutter.instr_name }}/*setup_package*', | ||
'hermes_{{ cookiecutter.instr_name }}/tests/*', | ||
'hermes_{{ cookiecutter.instr_name }}/*/tests/*', | ||
'hermes_{{ cookiecutter.instr_name }}/extern/*', | ||
'hermes_{{ cookiecutter.instr_name }}/version*', | ||
'*/hermes_{{ cookiecutter.instr_name }}/__init*', | ||
'*/hermes_{{ cookiecutter.instr_name }}/conftest.py', | ||
'*/hermes_{{ cookiecutter.instr_name }}/*setup_package*', | ||
'*/hermes_{{ cookiecutter.instr_name }}/tests/*', | ||
'*/hermes_{{ cookiecutter.instr_name }}/*/tests/*', | ||
'*/hermes_{{ cookiecutter.instr_name }}/extern/*', | ||
'*/hermes_{{ cookiecutter.instr_name }}/version*', | ||
] | ||
|
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,87 +1,3 @@ | ||
[metadata] | ||
name = hermes_{{ cookiecutter.instr_name }} | ||
author = Jane Doe | ||
author_email = jane.doe@example.com | ||
license = BSD 3-Clause | ||
license_file = LICENSE.rst | ||
url = https://github.com/HERMES-SOC/hermes_{{ cookiecutter.instr_name }} | ||
description = A Python package to process the HERMES instrument. | ||
long_description = file: README.rst | ||
|
||
[options] | ||
zip_safe = False | ||
packages = find: | ||
python_requires = >=3.7 | ||
setup_requires = setuptools_scm | ||
install_requires = | ||
astropy>=4.1.0 | ||
numpy>=1.16.0 | ||
hermes_core @ git+https://github.com/HERMES-SOC/hermes_core/ | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
astropy-package-template-example = packagename.example_mod:main | ||
|
||
|
||
[options.extras_require] | ||
dev = | ||
black | ||
flake8 | ||
|
||
test = | ||
tox | ||
pytest | ||
pytest-astropy | ||
pytest-cov | ||
docs = | ||
sphinx | ||
sphinx-automodapi | ||
sphinx-changelog | ||
towncrier | ||
|
||
[options.package_data] | ||
hermes_{{ cookiecutter.instr_name }} = data/* | ||
|
||
[tool:pytest] | ||
testpaths = "hermes_{{ cookiecutter.instr_name }}" "docs" | ||
doctest_plus = enabled | ||
text_file_format = rst | ||
addopts = --doctest-rst | ||
remote_data_strict = True | ||
|
||
[coverage:run] | ||
omit = | ||
hermes_{{ cookiecutter.instr_name }}/__init* | ||
hermes_{{ cookiecutter.instr_name }}/conftest.py | ||
hermes_{{ cookiecutter.instr_name }}/*setup_package* | ||
hermes_{{ cookiecutter.instr_name }}/tests/* | ||
hermes_{{ cookiecutter.instr_name }}/*/tests/* | ||
hermes_{{ cookiecutter.instr_name }}/extern/* | ||
hermes_{{ cookiecutter.instr_name }}/version* | ||
*/hermes_{{ cookiecutter.instr_name }}/__init* | ||
*/hermes_{{ cookiecutter.instr_name }}/conftest.py | ||
*/hermes_{{ cookiecutter.instr_name }}/*setup_package* | ||
*/hermes_{{ cookiecutter.instr_name }}/tests/* | ||
*/hermes_{{ cookiecutter.instr_name }}/*/tests/* | ||
*/hermes_{{ cookiecutter.instr_name }}/extern/* | ||
*/hermes_{{ cookiecutter.instr_name }}/version* | ||
|
||
[coverage:report] | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
# Don't complain about packages we have installed | ||
except ImportError | ||
# Don't complain if tests don't hit assertions | ||
raise AssertionError | ||
raise NotImplementedError | ||
# Don't complain about script hooks | ||
def main\(.*\): | ||
# Ignore branches that don't pertain to this version of Python | ||
pragma: py{ignore_python_version} | ||
# Don't complain about IPython completion helper | ||
def _ipython_key_completions_ | ||
|
||
[flake8] | ||
select = E101,E11,E111,E112,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,E401,E402,E502,E701,E711,E712,E713,E714,E722,E731,E901,E902,F822,F823,W191,W291,W292,W293,W391,W601,W602,W603,W604,W605,W690 | ||
exclude = .txt, .rst, .md | ||
exclude = .txt, .rst, .md |
This file was deleted.
Oops, something went wrong.