-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: drop Python 2 Fixes static typing support from outer layers - only full paths were supported before. Since this doesn't change often, listing things out is the best static solution. Added tests to make sure nothing gets missed and everything is included and remembered when anything gets changed or added. Added noxfile for easy running. Extended static checks. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
128cba2
commit c15a570
Showing
22 changed files
with
1,438 additions
and
97 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,3 +71,4 @@ docs/_build | |
/.mypy_cache/* | ||
/pip-wheel-metadata/* | ||
/src/hepunits/version.py | ||
/src/hepunits/_version.py |
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
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,19 @@ | ||
import nox | ||
|
||
|
||
@nox.session | ||
def lint(session: nox.Session) -> None: | ||
""" | ||
Run the linter. | ||
""" | ||
session.install("pre-commit") | ||
session.run("pre-commit", "run", "--all-files", *session.posargs) | ||
|
||
|
||
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"]) | ||
def tests(session: nox.Session) -> None: | ||
""" | ||
Run the unit and regular tests. | ||
""" | ||
session.install(".[test]") | ||
session.run("pytest", *session.posargs) |
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,90 +1,63 @@ | ||
[bdist_wheel] | ||
universal=1 | ||
|
||
|
||
[metadata] | ||
name = hepunits | ||
author = Eduardo Rodrigues | ||
author_email = [email protected] | ||
maintainer = Eduardo Rodrigues | ||
maintainer_email = [email protected] | ||
description = Units and constants in the HEP system of units | ||
long_description = file: README.rst | ||
long_description_content_type = text/x-rst | ||
url = https://github.com/scikit-hep/hepunits | ||
author = Eduardo Rodrigues | ||
author_email = [email protected] | ||
maintainer = Eduardo Rodrigues | ||
maintainer_email = [email protected] | ||
license = BSD-3-Clause | ||
classifier = | ||
Topic :: Scientific/Engineering | ||
Intended Audience :: Science/Research | ||
license_file = LICENSE | ||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
Intended Audience :: Developers | ||
Operating System :: OS Independent | ||
Intended Audience :: Science/Research | ||
License :: OSI Approved :: BSD License | ||
Operating System :: OS Independent | ||
Programming Language :: Python | ||
Programming Language :: Python :: 2 | ||
Programming Language :: Python :: 2.7 | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.5 | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Development Status :: 5 - Production/Stable | ||
Topic :: Scientific/Engineering | ||
keywords = | ||
HEP | ||
HEP system of units | ||
Units | ||
Constants | ||
|
||
|
||
[options] | ||
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* | ||
packages = find: | ||
python_requires = >=3.6 | ||
include_package_data = True | ||
zip_safe = False | ||
packages: find: | ||
package_dir = | ||
=src | ||
|
||
|
||
zip_safe = False | ||
|
||
[options.packages.find] | ||
where = src | ||
|
||
|
||
[options.package_data] | ||
* = py.typed | ||
|
||
[tool:pytest] | ||
junit_family=xunit2 | ||
testpaths = | ||
tests | ||
addopts = -Wd | ||
|
||
|
||
[options.extras_require] | ||
test = | ||
pytest >=4.6 | ||
pytest-cov >=2.8.0 | ||
dev = | ||
pytest >=4.6 | ||
pytest-cov >=2.8.0 | ||
all = | ||
pytest >=4.6 | ||
pytest-cov >=2.8.0 | ||
|
||
[check-manifest] | ||
ignore = | ||
src/hepunits/version.py | ||
.pre-commit-config.yaml | ||
|
||
[mypy] | ||
strict=True | ||
|
||
[mypy-hepunits.version] | ||
ignore_missing_imports = True | ||
pytest>=6 | ||
pytest-cov>=2.8.0 | ||
dev = | ||
pytest>=6 | ||
pytest-cov>=2.8.0 | ||
test = | ||
pytest>=6 | ||
pytest-cov>=2.8.0 | ||
|
||
[options.package_data] | ||
* = py.typed | ||
|
||
[flake8] | ||
max-complexity = 12 | ||
ignore = E203, E231, E501, E722, W503, F401, F403, F405 | ||
extend-ignore = B950, E501 | ||
select = C,E,F,W,B,B9,T | ||
per-file-ignores = | ||
tests/*: T, F405, F403 |
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
Oops, something went wrong.