-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
399 additions
and
264 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
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,74 +1,176 @@ | ||
[project] | ||
name = "cordage" | ||
version = "0.0.3" | ||
authors = [ | ||
{ name="Max Ploner", email="cordage@maxploner.de" }, | ||
] | ||
description = "Small framework for computational research data management" | ||
dynamic = ["version"] | ||
description = 'Small framework for computational research data management' | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = {text = "MIT"} | ||
license = "MIT" | ||
keywords = [] | ||
authors = [ | ||
{ name = "Max Ploner", email = "cordage@maxploner.de" }, | ||
] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
] | ||
dependencies=[ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dependencies = [ | ||
'docstring_parser', | ||
'colorlog', | ||
'dacite', | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/plonerma/cordage#readme" | ||
Issues = "https://github.com/plonerma/cordage/issues" | ||
Source = "https://github.com/plonerma/cordage" | ||
|
||
[project.optional-dependencies] | ||
tests = [ | ||
'pytest', | ||
'pytest-mypy', | ||
'pytest-isort', | ||
'pytest-flake8', | ||
'pytest-cov', | ||
'pytest-timeout', | ||
'pyyaml', | ||
'toml', | ||
'flake8<5.0.0', | ||
'flake8-black', | ||
'types-PyYAML', | ||
'types-toml', | ||
] | ||
|
||
dev = [ | ||
'types-PyYAML', | ||
'types-toml', | ||
toml = [ | ||
"toml", | ||
] | ||
yaml = [ | ||
"pyyaml", | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/plonerma/cordage" | ||
"Bug Tracker" = "https://github.com/plonerma/cordage/issues" | ||
|
||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.setuptools] | ||
package-dir = {"" = "src"} | ||
[tool.hatch.version] | ||
path = "src/cordage/__about__.py" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
[tool.hatch.envs.default] | ||
dependencies = [ | ||
"coverage[toml]>=6.5", | ||
"pytest", | ||
"pytest-timeout", | ||
] | ||
features = ["toml", "yaml"] | ||
[tool.hatch.envs.default.scripts] | ||
test = "pytest {args:tests}" | ||
test-cov = "coverage run -m pytest {args:tests}" | ||
cov-report = [ | ||
"- coverage combine", | ||
"coverage report", | ||
] | ||
cov = [ | ||
"test-cov", | ||
"cov-report", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
flake8-max-line-length = 210 | ||
addopts = "--flake8 --mypy --isort --cov=src --cov-fail-under=90" | ||
flake8-ignore = ["E203", "W503"] # See https://github.com/PyCQA/pycodestyle/issues/373 | ||
[[tool.hatch.envs.all.matrix]] | ||
python = ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
[tool.hatch.envs.lint] | ||
detached = true | ||
dependencies = [ | ||
"black>=23.1.0", | ||
"mypy>=1.0.0", | ||
"ruff>=0.0.243", | ||
] | ||
[tool.hatch.envs.lint.scripts] | ||
typing = "mypy --install-types --non-interactive {args:src/cordage tests}" | ||
style = [ | ||
"ruff {args:.}", | ||
"black --check --diff {args:.}", | ||
] | ||
fmt = [ | ||
"black {args:.}", | ||
"ruff --fix {args:.}", | ||
"style", | ||
] | ||
all = [ | ||
"style", | ||
"typing", | ||
] | ||
|
||
[tool.black] | ||
line_length = 120 | ||
target-version = ["py38"] | ||
line-length = 120 | ||
skip-string-normalization = true | ||
|
||
[tool.ruff] | ||
target-version = "py38" | ||
line-length = 120 | ||
select = [ | ||
"A", | ||
"ARG", | ||
"B", | ||
"C", | ||
"DTZ", | ||
"E", | ||
"EM", | ||
"F", | ||
"FBT", | ||
"I", | ||
"ICN", | ||
"ISC", | ||
"N", | ||
"PLC", | ||
"PLE", | ||
"PLR", | ||
"PLW", | ||
"Q", | ||
"RUF", | ||
"S", | ||
"T", | ||
"TID", | ||
"UP", | ||
"W", | ||
"YTT", | ||
] | ||
ignore = [ | ||
# Allow non-abstract empty methods in abstract base classes | ||
"B027", | ||
# Allow boolean positional values in function calls, like `dict.get(... True)` | ||
"FBT003", | ||
# Ignore checks for possible passwords | ||
"S105", "S106", "S107", | ||
# Allow asserts for now (transitioning to recommended exceptions) | ||
"S101", | ||
# Ignore complexity | ||
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", | ||
] | ||
unfixable = [ | ||
# Don't touch unused imports | ||
"F401", | ||
] | ||
|
||
[tool.ruff.isort] | ||
known-first-party = ["cordage"] | ||
|
||
[tool.ruff.flake8-tidy-imports] | ||
ban-relative-imports = "all" | ||
|
||
[tool.ruff.per-file-ignores] | ||
# Tests can use magic values, assertions, and relative imports | ||
"tests/**/*" = ["PLR2004", "S101", "TID252"] | ||
|
||
[tool.coverage.run] | ||
source_pkgs = ["cordage", "tests"] | ||
branch = true | ||
parallel = true | ||
omit = [ | ||
"src/cordage/__about__.py", | ||
] | ||
|
||
[tool.coverage.paths] | ||
cordage = ["src/cordage", "*/cordage/src/cordage"] | ||
tests = ["tests", "*/cordage/tests"] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"no cov", | ||
"if __name__ == .__main__.:", | ||
"if TYPE_CHECKING:", | ||
] | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
check_untyped_defs = true | ||
|
||
[tool.isort] | ||
profile = "black" | ||
line_length = 120 | ||
|
||
[tool.ruff] | ||
line-length = 120 |
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 @@ | ||
__version__ = "0.0.4" |
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.