mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Currently we get odd formatting like ``` 456 .devcontainer.json 139 .dvcignore 61.0 .gitattributes 96.0 .github 7.00 .gitignore 5.76k README.md 160 data 1.84k dvc.lock 519 dvc.yaml 4.00 foo 96.0 models 96.0 notebooks 225 params.yaml 46.0 requirements.txt 128 results 160 src ``` (notice stuff like 46.0) and there doesn't seem to be a simple way to fix that in tqdm, in addition to the general feeling that we are abusing tqdm's util for this. So let's just use `humanize`, which gets us a more pleasing result: ``` 456B .devcontainer.json 139B .dvcignore 61B .gitattributes 96B .github 7B .gitignore 5.8K README.md 160B data 1.8K dvc.lock 519B dvc.yaml 4B foo 96B models 96B notebooks 225B params.yaml 46B requirements.txt 128B results 160B src ```
317 lines
8.7 KiB
TOML
317 lines
8.7 KiB
TOML
[build-system]
|
|
build-backend = "setuptools.build_meta"
|
|
requires = ["setuptools>=61", "setuptools_scm[toml]>=7"]
|
|
|
|
[project]
|
|
name = "dvc"
|
|
description = "Git for data scientists - manage your code and data together"
|
|
readme = "README.rst"
|
|
keywords = [
|
|
"ai",
|
|
"collaboration",
|
|
"data-science",
|
|
"data-version-control",
|
|
"developer-tools",
|
|
"git",
|
|
"machine-learning",
|
|
"reproducibility",
|
|
]
|
|
license = { text = "Apache License 2.0" }
|
|
maintainers = [{ name = "Iterative", email = "[email protected]" }]
|
|
authors = [{ name = "Dmitry Petrov", email = "[email protected]" }]
|
|
requires-python = ">=3.8"
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
]
|
|
dynamic = ["version"]
|
|
dependencies = [
|
|
"colorama>=0.3.9",
|
|
"configobj>=5.0.6",
|
|
"distro>=1.3",
|
|
"dpath<3,>=2.1.0",
|
|
"dvc-data>=2.15.0,<2.16.0",
|
|
"dvc-http>=2.29.0",
|
|
"dvc-render>=0.3.1,<1",
|
|
"dvc-studio-client>=0.9.2,<1",
|
|
"dvc-task>=0.3.0,<1",
|
|
"flatten_dict<1,>=0.4.1",
|
|
# https://github.com/iterative/dvc/issues/9654
|
|
"flufl.lock>=5,<8",
|
|
"funcy>=1.14",
|
|
"grandalf<1,>=0.7",
|
|
"hydra-core>=1.1",
|
|
"iterative-telemetry>=0.0.7",
|
|
"networkx>=2.5",
|
|
"packaging>=19",
|
|
"pathspec>=0.10.3",
|
|
"platformdirs<4,>=3.1.1",
|
|
"psutil>=5.8",
|
|
"pydot>=1.2.4",
|
|
"pygtrie>=2.3.2",
|
|
"pyparsing>=2.4.7",
|
|
"requests>=2.22",
|
|
"rich>=12",
|
|
"ruamel.yaml>=0.17.11",
|
|
"scmrepo>=1.2.1,<2",
|
|
"shortuuid>=0.5",
|
|
"shtab<2,>=1.3.4",
|
|
"tabulate>=0.8.7",
|
|
"tomlkit>=0.11.1",
|
|
"tqdm<5,>=4.63.1",
|
|
"voluptuous>=0.11.7",
|
|
"zc.lockfile>=1.2.1",
|
|
"humanize",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
all = ["dvc[azure,gdrive,gs,hdfs,oss,s3,ssh,webdav,webhdfs]"]
|
|
azure = ["dvc-azure>=2.21.2"]
|
|
dev = ["dvc[azure,gdrive,gs,hdfs,lint,oss,s3,ssh,tests,webdav,webhdfs]"]
|
|
gdrive = ["dvc-gdrive==2.20"]
|
|
gs = ["dvc-gs==2.22.1"]
|
|
hdfs = ["dvc-hdfs==2.19"]
|
|
lint = [
|
|
"mypy==1.5.1",
|
|
"pylint==2.17.5",
|
|
"types-colorama",
|
|
"types-psutil",
|
|
"types-pyinstaller",
|
|
"types-requests",
|
|
"types-tabulate",
|
|
"types-toml",
|
|
"types-tqdm",
|
|
]
|
|
oss = ["dvc-oss==2.19"]
|
|
s3 = ["dvc-s3==2.23.0"]
|
|
ssh = ["dvc-ssh>=2.22.1,<3"]
|
|
ssh_gssapi = ["dvc-ssh[gssapi]>=2.22.1,<3"]
|
|
testing = [
|
|
"pytest-test-utils",
|
|
"pytest-benchmark[histogram]",
|
|
"pytest-virtualenv",
|
|
]
|
|
tests = [
|
|
"dvc[testing]",
|
|
"beautifulsoup4>=4.4",
|
|
"dvc-ssh",
|
|
"filelock",
|
|
"flaky",
|
|
"pytest<8,>=7",
|
|
"pytest-cov>=4.1.0",
|
|
"pytest-docker>=1,<3",
|
|
"pytest-lazy-fixture",
|
|
"pytest-mock",
|
|
"pytest-test-utils",
|
|
"pytest-timeout>=2",
|
|
"pytest-xdist>=3.2",
|
|
'pywin32>=225; sys_platform == "win32"', # optional test dependency
|
|
'tzdata; sys_platform == "win32"', # for testing with celery
|
|
]
|
|
webdav = ["dvc-webdav==2.19.1"]
|
|
webhdfs = ["dvc-webhdfs==2.19"]
|
|
webhdfs_kerberos = ["dvc-webhdfs[kerberos]==2.19"]
|
|
|
|
[project.urls]
|
|
Documentation = "https://dvc.org/doc"
|
|
Issues = "https://github.com/iterative/dvc/issues"
|
|
Source = "https://github.com/iterative/dvc"
|
|
|
|
[project.scripts]
|
|
dvc = "dvc.cli:main"
|
|
|
|
[project.entry-points."fsspec.specs"]
|
|
dvc = "dvc.api:DVCFileSystem"
|
|
|
|
[project.entry-points."pytest11"]
|
|
dvc-testing = "dvc.testing.plugin"
|
|
|
|
[project.entry-points."pyinstaller40"]
|
|
hook-dirs = "dvc.__pyinstaller:get_hook_dirs"
|
|
tests = "dvc.__pyinstaller:get_PyInstaller_tests"
|
|
|
|
[tool.setuptools]
|
|
license-files = ["LICENSE"]
|
|
|
|
[tool.setuptools.packages.find]
|
|
exclude = ["tests", "tests.*"]
|
|
namespaces = false
|
|
|
|
[tool.setuptools_scm]
|
|
write_to = "dvc/_dvc_version.py"
|
|
|
|
[tool.isort]
|
|
known_first_party = ["dvc", "dvc_data", "dvc_objects", "dvc_render", "dvc_task", "tests"]
|
|
profile = "black"
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "-ra --cov-config pyproject.toml --dist worksteal"
|
|
filterwarnings = [
|
|
"error::ResourceWarning",
|
|
"error::pytest.PytestUnraisableExceptionWarning",
|
|
"error::pytest_mock.PytestMockWarning",
|
|
# https://github.com/boto/botocore/issues/2744
|
|
"ignore:'urllib3.contrib.pyopenssl' module is deprecated:DeprecationWarning",
|
|
# google.cloud: https://github.com/googleapis/python-storage/issues/1000
|
|
# google.logging: https://github.com/googleapis/python-logging/issues/730
|
|
# Also happens with `zc.lockfile`.
|
|
"ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning",
|
|
# tpi imports pkg_resources
|
|
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
|
|
# see https://github.com/networkx/networkx/issues/5723.
|
|
"ignore:nx.nx_pydot.* depends on the pydot package, which has.*known issues and is not actively maintained:DeprecationWarning",
|
|
]
|
|
log_level = "debug"
|
|
markers = [
|
|
"needs_internet: Might need network access for the tests",
|
|
"studio: Tests verifying contract between DVC and Studio",
|
|
"vscode: Tests verifying contract between DVC and VSCode plugin",
|
|
]
|
|
testpaths = ["tests"]
|
|
xfail_strict = true
|
|
|
|
[tool.coverage.run]
|
|
branch = true
|
|
source = ["dvc", "tests"]
|
|
|
|
[tool.coverage.paths]
|
|
source = ["dvc"]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
"if typing.TYPE_CHECKING:",
|
|
"@overload",
|
|
"pragma: no cover",
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
]
|
|
show_missing = true
|
|
|
|
[tool.mypy]
|
|
check_untyped_defs = true
|
|
files = ["dvc"]
|
|
no_implicit_optional = true
|
|
pretty = true
|
|
show_column_numbers = true
|
|
show_error_codes = true
|
|
show_error_context = true
|
|
show_traceback = true
|
|
strict_equality = true
|
|
strict_concatenate = true
|
|
warn_no_return = true
|
|
warn_redundant_casts = true
|
|
warn_unreachable = true
|
|
warn_unused_configs = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
ignore_missing_imports = true
|
|
module = [
|
|
"celery.*",
|
|
"configobj.*",
|
|
"dpath.*",
|
|
"distro",
|
|
"dvc_http",
|
|
"dvc_render.*",
|
|
"dvc_ssh",
|
|
"dvc_studio_client.*",
|
|
"flatten_dict",
|
|
"fsspec.*",
|
|
"funcy.*", # https://github.com/Suor/funcy/issues/106,
|
|
"grandalf.*",
|
|
"ipdb",
|
|
"iterative_telemetry",
|
|
"kombu.*",
|
|
"networkx.*", # https://github.com/networkx/networkx/issues/3988
|
|
"pygtrie.*",
|
|
"pyinstrument",
|
|
"pyparsing",
|
|
"pytest_benchmark.*",
|
|
"pytest_docker.plugin",
|
|
"pytest_virtualenv.*",
|
|
"ruamel.*",
|
|
"ruamel.yaml.*",
|
|
"shortuuid",
|
|
"shtab",
|
|
"tpi.*",
|
|
"viztracer",
|
|
"voluptuous",
|
|
"yappi",
|
|
"zc.*",
|
|
]
|
|
|
|
[tool.codespell]
|
|
ignore-words-list = "ba,datas,fo,uptodate,cachable,falsy"
|
|
|
|
[tool.pylint.message_control]
|
|
disable = [
|
|
"cyclic-import", "design", "duplicate-code", "fixme", "format", "import-outside-toplevel", "invalid-name",
|
|
"missing-class-docstring", "missing-function-docstring", "missing-module-docstring", "multiple-imports",
|
|
"raise-missing-from", "refactoring", "spelling",
|
|
"ungrouped-imports", "unused-wildcard-import", "wrong-import-order", "wrong-import-position",
|
|
]
|
|
enable = ["c-extension-no-member", "no-else-return"]
|
|
|
|
[tool.pylint.typecheck]
|
|
generated-members = ["argparse.Namespace", "logger.trace", "logging.TRACE", "pytest.lazy_fixture", "sys.getwindowsversion"]
|
|
signature-mutators = ["funcy.decorators.decorator"]
|
|
|
|
[tool.pylint.variables]
|
|
dummy-variables-rgx = "_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)"
|
|
ignored-argument-names = "_.*|args|kwargs"
|
|
|
|
[tool.ruff]
|
|
# external flake8 codes that should be preserved
|
|
external = ["B301", "C901", "E302", "W601"]
|
|
ignore = [
|
|
"N818", "S101", "PT004", "PT007", "RET501", "RET502", "RET503", "SIM105", "SIM108",
|
|
"SIM117", "TRY003", "TRY200", "TRY300", "PLR2004", "PLW2901", "RUF012"
|
|
]
|
|
select = [
|
|
"F", "E", "W", "C90", "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
|
|
|
|
[tool.ruff.flake8-pytest-style]
|
|
fixture-parentheses = false
|
|
mark-parentheses = false
|
|
parametrize-names-type = "csv"
|
|
raises-extend-require-match-for = ["dvc.exceptions.DvcException", "dvc.scm.SCMError", "scmrepo.exceptions.SCMError"]
|
|
|
|
[tool.ruff.flake8-tidy-imports]
|
|
[tool.ruff.flake8-tidy-imports.banned-api]
|
|
"funcy.cached_property" = {msg = "use `from dvc.utils.objects import cached_property` instead."}
|
|
|
|
[tool.ruff.flake8-type-checking]
|
|
strict = true
|
|
|
|
[tool.ruff.flake8-unused-arguments]
|
|
ignore-variadic-names = true
|
|
|
|
[tool.ruff.isort]
|
|
known-first-party = ["dvc", "dvc_data", "dvc_objects", "dvc_render", "dvc_task", "tests"]
|
|
|
|
[tool.ruff.pep8-naming]
|
|
extend-ignore-names = ["M", "SCM"]
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
"dvc/commands/**" = ["N806"]
|
|
"dvc/testing/**" = ["ARG002"]
|
|
"dvc/testing/benchmarks/**" = ["ARG001"]
|
|
"tests/**" = ["S", "ARG001", "ARG002", "TRY002", "TRY301"]
|
|
|
|
[tool.ruff.pylint]
|
|
max-args = 10
|
|
|
|
[tool.bandit]
|
|
exclude_dirs = ["tests", "dvc/repo/experiments/utils.py"]
|
|
skips = ["B101"]
|