-
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.
Moved all project configuration from setup.cfg to pyproject.toml
Moved all tox configuration from setup.cfg to tox.ini. Deleted setup.cfg
- Loading branch information
1 parent
365ca5b
commit f54b940
Showing
3 changed files
with
197 additions
and
198 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 |
---|---|---|
@@ -1,115 +1,170 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ["py39", "py310", "py311", "py312"] | ||
|
||
[tool.ruff] | ||
exclude = [ | ||
".git", | ||
".venv", | ||
".tox", | ||
"build", | ||
"dist", | ||
"__pycache__", | ||
"./docs/source/conf.py", | ||
"./src/folder_to_be_ignored", | ||
] | ||
src = ["src"] | ||
ignore = [ | ||
"E501", # Line length too long | ||
"D100", # Missing docstring in public module | ||
"D104", # Missing docstring in public package | ||
"D105", # Missing docstring in magic method | ||
"D107", # Missing docstring in __init__ | ||
"D202", # No blank lines allowed after function docstring | ||
"D203", # 1 blank line required before class docstring | ||
"D205", # 1 blank line required between summary line and description | ||
"D212", # Multi-line docstring summary should start at the first line | ||
"D213", # Multi-line docstring summary should start at the second line | ||
# "N802", # Function name should be lowercase (uncomment if you want to allow Uppercase function names) | ||
# "N803", # Argument name should be lowercase (uncomment if you want to allow Uppercase argument names) | ||
"N806", # Variable in function should be lowercase (uncomment if you want to allow Uppercase variable names in functions) | ||
# "N815", # Variable in class scope should not be mixedCase (uncomment if you want to allow mixedCase variable names in class scope) | ||
# "N816", # Variable in global scope should not be mixedCase (uncomment if you want to allow mixedCase variable names in global scope) | ||
"N999", # Invalid module name | ||
] | ||
line-length = 120 | ||
select = [ | ||
"E", | ||
"D", | ||
"F", | ||
"N", | ||
"W", | ||
"I", | ||
"B", | ||
] | ||
target-version = "py39" | ||
|
||
[tool.ruff.pep8-naming] | ||
ignore-names = [ | ||
"test_*", | ||
"setUp", | ||
"tearDown", | ||
] | ||
|
||
[tool.ruff.pydocstyle] | ||
convention = "numpy" | ||
|
||
[tool.ruff.per-file-ignores] | ||
"__init__.py" = ["I001"] | ||
"./tests/*" = ["D"] | ||
|
||
[tool.pyright] | ||
exclude = [ | ||
".git", | ||
".venv", | ||
".tox", | ||
"build", | ||
"dist", | ||
"**/__pycache__", | ||
"./docs/source/conf.py", | ||
"./src/folder_to_be_ignored", | ||
"./venv", | ||
] | ||
extraPaths = ["./src"] | ||
typeCheckingMode = "basic" | ||
useLibraryCodeForTypes = true | ||
reportMissingParameterType = "error" | ||
reportUnknownParameterType = "warning" | ||
reportUnknownMemberType = "warning" | ||
reportMissingTypeArgument = "error" | ||
reportPropertyTypeMismatch = "error" | ||
reportFunctionMemberAccess = "warning" | ||
reportPrivateUsage = "warning" | ||
reportTypeCommentUsage = "warning" | ||
reportIncompatibleMethodOverride = "warning" | ||
reportIncompatibleVariableOverride = "error" | ||
reportInconsistentConstructor = "error" | ||
reportOverlappingOverload = "warning" | ||
reportUninitializedInstanceVariable = "warning" | ||
reportCallInDefaultInitializer = "warning" | ||
reportUnnecessaryIsInstance = "information" | ||
reportUnnecessaryCast = "warning" | ||
reportUnnecessaryComparison = "warning" | ||
reportUnnecessaryContains = "warning" | ||
reportUnusedCallResult = "warning" | ||
reportUnusedExpression = "warning" | ||
reportMatchNotExhaustive = "warning" | ||
reportShadowedImports = "warning" | ||
reportUntypedFunctionDecorator = "warning" | ||
reportUntypedBaseClass = "error" | ||
reportUntypedNamedTuple = "warning" | ||
# Activate the following rules only locally and temporary, i.e. for a QA session. | ||
# (For server side CI they are considered too strict.) | ||
# reportConstantRedefinition = "warning" | ||
# reportUnnecessaryTypeIgnoreComment = "information" | ||
# reportImportCycles = "warning" | ||
# reportImplicitStringConcatenation = "warning" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = "tests" | ||
addopts = "--strict-markers" | ||
xfail_strict = true | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "maritime-schema" | ||
version = "0.0.3b1" | ||
description = "Python data classes and JSON schemata for maritime traffic scenarios." | ||
readme = "README.md" | ||
requires-python = ">= 3.9" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{name = "Author One", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Claas Rostock", email = "[email protected]"} | ||
] | ||
keywords = [] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: MacOS", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"pydantic>=2.5", | ||
"dictIO>=0.3.1", | ||
# "some_package_on_pypi>=0.1.0", | ||
# "some_project_in_my_local_dev @ file:../some_project_in_my_local_dev", | ||
# "some_project_on_github @ git+https://github.com/user/project.git@version_or_tag_or_branch_name#egg=project_name", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/dnv-opensource/maritime-schema" | ||
Documentation = "https://dnv-opensource.github.io/maritime-schema/README.html" | ||
Repository = "https://github.com/dnv-opensource/maritime-schema.git" | ||
Issues = "https://github.com/dnv-opensource/maritime-schema/issues" | ||
Changelog = "https://github.com/dnv-opensource/maritime-schema/blob/main/CHANGELOG.md" | ||
|
||
[project.scripts] | ||
maritime-schema = "maritime_schema.cli.maritime_schema:main" | ||
|
||
[tool.setuptools] | ||
packages = "find:" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
exclude = ["test*"] | ||
|
||
[tool.black] | ||
line-length = 120 | ||
target-version = ["py39", "py310", "py311", "py312"] | ||
|
||
[tool.ruff] | ||
exclude = [ | ||
".git", | ||
".venv", | ||
".tox", | ||
"build", | ||
"dist", | ||
"__pycache__", | ||
"./docs/source/conf.py", | ||
"./src/folder_to_be_ignored", | ||
] | ||
src = ["src"] | ||
ignore = [ | ||
"E501", # Line length too long | ||
"D100", # Missing docstring in public module | ||
"D104", # Missing docstring in public package | ||
"D105", # Missing docstring in magic method | ||
"D107", # Missing docstring in __init__ | ||
"D202", # No blank lines allowed after function docstring | ||
"D203", # 1 blank line required before class docstring | ||
"D205", # 1 blank line required between summary line and description | ||
"D212", # Multi-line docstring summary should start at the first line | ||
"D213", # Multi-line docstring summary should start at the second line | ||
# "N802", # Function name should be lowercase (uncomment if you want to allow Uppercase function names) | ||
# "N803", # Argument name should be lowercase (uncomment if you want to allow Uppercase argument names) | ||
"N806", # Variable in function should be lowercase (uncomment if you want to allow Uppercase variable names in functions) | ||
# "N815", # Variable in class scope should not be mixedCase (uncomment if you want to allow mixedCase variable names in class scope) | ||
# "N816", # Variable in global scope should not be mixedCase (uncomment if you want to allow mixedCase variable names in global scope) | ||
"N999", # Invalid module name | ||
] | ||
line-length = 120 | ||
select = [ | ||
"E", | ||
"D", | ||
"F", | ||
"N", | ||
"W", | ||
"I", | ||
"B", | ||
] | ||
target-version = "py39" | ||
|
||
[tool.ruff.pep8-naming] | ||
ignore-names = [ | ||
"test_*", | ||
"setUp", | ||
"tearDown", | ||
] | ||
|
||
[tool.ruff.pydocstyle] | ||
convention = "numpy" | ||
|
||
[tool.ruff.per-file-ignores] | ||
"__init__.py" = ["I001"] | ||
"./tests/*" = ["D"] | ||
|
||
[tool.pyright] | ||
exclude = [ | ||
".git", | ||
".venv", | ||
".tox", | ||
"build", | ||
"dist", | ||
"**/__pycache__", | ||
"./docs/source/conf.py", | ||
"./src/folder_to_be_ignored", | ||
"./venv", | ||
] | ||
extraPaths = ["./src"] | ||
typeCheckingMode = "basic" | ||
useLibraryCodeForTypes = true | ||
reportMissingParameterType = "error" | ||
reportUnknownParameterType = "warning" | ||
reportUnknownMemberType = "warning" | ||
reportMissingTypeArgument = "error" | ||
reportPropertyTypeMismatch = "error" | ||
reportFunctionMemberAccess = "warning" | ||
reportPrivateUsage = "warning" | ||
reportTypeCommentUsage = "warning" | ||
reportIncompatibleMethodOverride = "warning" | ||
reportIncompatibleVariableOverride = "error" | ||
reportInconsistentConstructor = "error" | ||
reportOverlappingOverload = "warning" | ||
reportUninitializedInstanceVariable = "warning" | ||
reportCallInDefaultInitializer = "warning" | ||
reportUnnecessaryIsInstance = "information" | ||
reportUnnecessaryCast = "warning" | ||
reportUnnecessaryComparison = "warning" | ||
reportUnnecessaryContains = "warning" | ||
reportUnusedCallResult = "warning" | ||
reportUnusedExpression = "warning" | ||
reportMatchNotExhaustive = "warning" | ||
reportShadowedImports = "warning" | ||
reportUntypedFunctionDecorator = "warning" | ||
reportUntypedBaseClass = "error" | ||
reportUntypedNamedTuple = "warning" | ||
# Activate the following rules only locally and temporary, i.e. for a QA session. | ||
# (For server side CI they are considered too strict.) | ||
# reportConstantRedefinition = "warning" | ||
# reportUnnecessaryTypeIgnoreComment = "information" | ||
# reportImportCycles = "warning" | ||
# reportImplicitStringConcatenation = "warning" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = "tests" | ||
addopts = "--strict-markers" | ||
xfail_strict = true |
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,27 @@ | ||
[tox] | ||
isolated_build = True | ||
envlist = py{39,310,311,312}-{linux,macos,windows} | ||
# envlist = py{39,310,311,312}-{windows} | ||
# envlist = py{39,310,311,312} | ||
|
||
[coverage:paths] | ||
source = | ||
src/maritime_schema | ||
*/site-packages/maritime-schema | ||
|
||
[coverage:run] | ||
source = maritime_schema | ||
branch = True | ||
|
||
[coverage:report] | ||
fail_under = 10.0 | ||
show_missing = True | ||
skip_covered = True | ||
|
||
[testenv] | ||
system_site_packages = True | ||
deps = | ||
pytest>=7.4 | ||
pytest-cov>=4.1 | ||
commands = | ||
pytest --cov --cov-config setup.cfg {posargs} |