-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update template * fix pyproject.toml * fix linting * update deps and drop setup.cfg * fix mypy import error * fix tests * drop tmp_dir fixture from dvc --------- Co-authored-by: daavoo <[email protected]> Co-authored-by: dberenbaum <[email protected]> Co-authored-by: Dave Berenbaum <[email protected]>
- Loading branch information
1 parent
f3c3f66
commit 61ee409
Showing
20 changed files
with
261 additions
and
331 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 |
---|---|---|
|
@@ -4,28 +4,63 @@ build-backend = "setuptools.build_meta" | |
|
||
[tool.setuptools_scm] | ||
|
||
[tool.black] | ||
line-length = 88 | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
''' | ||
|
||
[tool.isort] | ||
profile = "black" | ||
known_first_party = ["dvc_render"] | ||
line_length = 88 | ||
[project] | ||
name = "dvc-render" | ||
description = "Dvc Render" | ||
readme = "README.rst" | ||
license = {text = "Apache-2.0"} | ||
authors = [{ name = "Iterative", email = "[email protected]" }] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Development Status :: 4 - Beta", | ||
] | ||
requires-python = ">=3.8" | ||
dynamic = ["version"] | ||
dependencies = [] | ||
|
||
[project.urls] | ||
Issues = "https://github.com/iterative/dvc-render/issues" | ||
Source = "https://github.com/iterative/dvc-render" | ||
|
||
[project.optional-dependencies] | ||
table = [ | ||
"tabulate>=0.8.7", | ||
"flatten_dict<1,>=0.4.1", | ||
] | ||
markdown = [ | ||
"dvc-render[table]", | ||
"matplotlib", | ||
] | ||
docs = [ | ||
"mkdocs==1.5.2", | ||
"mkdocs-gen-files==0.5.0", | ||
"mkdocs-material==9.3.1", | ||
"mkdocs-section-index==0.3.6", | ||
"mkdocstrings-python==1.6.3", | ||
] | ||
tests = [ | ||
"dvc-render[table]", | ||
"dvc-render[markdown]", | ||
"pytest==7.2.0", | ||
"pytest-sugar==0.9.5", | ||
"pytest-cov==3.0.0", | ||
"pytest-mock==3.8.2", | ||
"mypy==1.2.0", | ||
] | ||
dev = [ | ||
"dvc-render[table]", | ||
"dvc-render[markdown]", | ||
"dvc-render[tests]", | ||
"dvc-render[docs]", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
namespaces = false | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "-ra" | ||
|
@@ -70,27 +105,38 @@ module = [ | |
] | ||
ignore_missing_imports = true | ||
|
||
[tool.codespell] | ||
ignore-words-list = " " | ||
|
||
[tool.pylint.format] | ||
max-line-length = 88 | ||
|
||
[tool.pylint.message_control] | ||
enable = ["c-extension-no-member", "no-else-return"] | ||
disable = [ | ||
"missing-module-docstring", | ||
"missing-class-docstring", | ||
"invalid-name", | ||
"R0801", | ||
"C0415" | ||
[tool.ruff] | ||
ignore = [ | ||
"S101", # assert | ||
"PLR2004", # magic-value-comparison | ||
"PLW2901", # redefined-loop-name | ||
"ISC001", # single-line-implicit-string-concatenation | ||
"SIM105", # suppressible-exception | ||
"SIM108", # if-else-block-instead-of-if-exp | ||
"D203", # one blank line before class | ||
"D213", # multi-line-summary-second-line | ||
"RUF012", # mutable class attributes | ||
"PT007", # value types in pytest.mark.parametrize | ||
] | ||
select = [ | ||
"F", "E", "W", "C90", "I", "N", "UP", "YTT", "ASYNC", "S", "BLE", "B", "A", "C4", "T10", | ||
"EXE", "ISC", "ICN", "G", "INP", "PIE", "T20", "PYI", "PT", "Q", "RSE", "RET", | ||
"SLOT", "SIM", "TID", "TCH", "ARG", "PGH", "PLC", "PLE", "PLR", "PLW", "TRY", | ||
"FLY", "PERF101", "RUF", | ||
] | ||
show-source = true | ||
show-fixes = true | ||
|
||
[tool.pylint.variables] | ||
dummy-variables-rgx = "_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_" | ||
ignored-argument-names = "_.*|^ignored_|^unused_|args|kwargs" | ||
[tool.ruff.per-file-ignores] | ||
"noxfile.py" = ["D", "PTH"] | ||
"tests/**" = ["S", "ARG001", "ARG002", "ANN"] | ||
"docs/**" = ["INP"] | ||
|
||
[tool.codespell] | ||
ignore-words-list = " " | ||
[tool.ruff.lint.flake8-type-checking] | ||
strict = true | ||
|
||
[tool.bandit] | ||
exclude_dirs = ["tests"] | ||
skips = ["B101"] | ||
[tool.ruff.lint.isort] | ||
known-first-party = ["{{ cookiecutter.package_name }}"] |
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,7 +1,7 @@ | ||
class DvcRenderException(Exception): | ||
class DvcRenderError(Exception): | ||
pass | ||
|
||
|
||
class MissingPlaceholderError(DvcRenderException): | ||
class MissingPlaceholderError(DvcRenderError): | ||
def __init__(self, placeholder, template_type): | ||
super().__init__(f"{template_type} template has to contain '{placeholder}'.") |
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
Oops, something went wrong.