-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
80 additions
and
20 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,24 +1,71 @@ | ||
[build-system] | ||
requires = [ "setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "ckanext-relationship" | ||
version = "0.2.10" | ||
description = "" | ||
classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10",] | ||
keywords = [ "CKAN",] | ||
dependencies = [ "ckanext-scheming",] | ||
authors = [ | ||
{name = "DataShades", email = "[email protected]"}, | ||
{name = "Oleksandr Ivaniuk", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "DataShades", email = "[email protected]"}, | ||
] | ||
|
||
[project.readme] | ||
file = "README.md" | ||
content-type = "text/markdown" | ||
|
||
[project.license] | ||
text = "AGPL" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/DataShades/ckanext-relationship" | ||
|
||
[project.optional-dependencies] | ||
|
||
[project.entry-points."ckan.plugins"] | ||
relationship = "ckanext.relationship.plugin:RelationshipPlugin" | ||
|
||
[project.entry-points."babel.extractors"] | ||
ckan = "ckan.lib.extract:extract_ckan" | ||
|
||
[tool.setuptools.packages] | ||
find = {} | ||
|
||
[tool.black] | ||
# line-length = 88 | ||
# preview = true | ||
|
||
[tool.ruff] | ||
target-version = "py38" | ||
select = [ | ||
lint.select = [ | ||
# "ANN0", # type annotations for function arguments | ||
"B", # likely bugs and design problems | ||
# "BLE", # do not catch blind exception | ||
"C40", # better list/set/dict comprehensions | ||
"BLE", # do not catch blind exception | ||
"C4", # better list/set/dict comprehensions | ||
"C90", # check McCabe complexity | ||
"COM", # trailing commas | ||
"DTZ", # enforce timezone in date objects | ||
"E", # pycodestyle error | ||
"W", # pycodestyle warning | ||
"F", # pyflakes | ||
"FA", # verify annotations from future | ||
"G", # format strings for logging statements | ||
"N", # naming conventions | ||
"I", # isort | ||
"ICN", # import conventions | ||
# "D1", # require doc | ||
# "D2", # doc formatting | ||
"D4", # doc convention | ||
"PL", # pylint | ||
# "PERF", # performance anti-patterns | ||
"PT", # pytest style | ||
"PIE", # misc lints | ||
"Q", # preferred quoting style | ||
"RET", # improvements for return statements | ||
"RSE", # improvements for rise statements | ||
# "S", # security testing | ||
|
@@ -29,26 +76,43 @@ select = [ | |
"TRY", # better exceptions | ||
"UP", # upgrade syntax for newer versions of the language | ||
] | ||
ignore = [ | ||
|
||
lint.ignore = [ | ||
"RET503", # don't enforce return-None | ||
"E712", # comparison to bool: violated by SQLAlchemy filters | ||
"PT004", # fixture does not return anything, add leading underscore: violated by clean_db | ||
"PLC1901", # simplify comparison to empty string: violated by SQLAlchemy filters | ||
] | ||
|
||
[tool.ruff.per-file-ignores] | ||
"ckanext/relationship/tests*" = ["S", "PL"] | ||
[tool.ruff.lint.per-file-ignores] | ||
"ckanext/collection/tests*" = ["S", "PL", "ANN", "D"] | ||
"ckanext/collection/tests/test_dive.py" = ["F403", "F405"] | ||
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "google" | ||
|
||
[tool.ruff.lint.isort] | ||
section-order = [ | ||
"future", | ||
"standard-library", | ||
"first-party", | ||
"third-party", | ||
"ckan", | ||
"ckanext", | ||
"self", | ||
"local-folder", | ||
] | ||
|
||
[tool.ruff.lint.isort.sections] | ||
# Group all Django imports into a separate section. | ||
ckan = ["ckan"] | ||
ckanext = ["ckanext"] | ||
self = ["ckanext.collection"] | ||
|
||
[tool.isort] | ||
known_ckan = "ckan" | ||
known_ckanext = "ckanext" | ||
known_self = "ckanext.relationship" | ||
sections = "FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,CKAN,CKANEXT,SELF,LOCALFOLDER" | ||
profile = "black" | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--ckan-ini test.ini" | ||
filterwarnings = [ | ||
"ignore::sqlalchemy.exc.SADeprecationWarning", | ||
"ignore::sqlalchemy.exc.SAWarning", | ||
"ignore::DeprecationWarning", | ||
] | ||
|
@@ -129,8 +193,4 @@ reportIncompleteStub = true | |
reportUnsupportedDunderAll = true | ||
reportUnusedCoroutine = true | ||
reportUnnecessaryTypeIgnoreComment = true | ||
reportMatchNotExhaustive = true | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
omit = ["ckanext/relationship/tests/*"] | ||
reportMatchNotExhaustive = true |