Skip to content

Commit

Permalink
cruft: update template
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Nov 22, 2023
1 parent 80975fc commit 3a5ab60
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 165 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/py-template",
"commit": "c4e24f909659b6ce9c34a1da631290f0c70ff2f2",
"commit": "15ee26df315020399731c6291d61bef81a3fc5d3",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -49,7 +49,7 @@ jobs:
run: nox -s tests-${{ matrix.nox_pyv || matrix.pyv }} -- --cov-report=xml

- name: Upload coverage report
uses: codecov/[email protected].1
uses: codecov/[email protected].4

- name: Build package
run: nox -s build
2 changes: 1 addition & 1 deletion .github/workflows/update-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Update template
uses: iterative/py-template@main
29 changes: 6 additions & 23 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand All @@ -23,6 +19,12 @@ repos:
args: ['--fix=lf']
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.5'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
Expand All @@ -33,22 +35,3 @@ repos:
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==23.1.20
- flake8-comprehensions==3.10.1
- flake8-debugger==4.1.2
- flake8-string-format==0.3.0
- repo: https://github.com/pycqa/bandit
rev: 1.7.5
hooks:
- id: bandit
args: [-c, pyproject.toml]
additional_dependencies: [".[toml]"]
1 change: 0 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def lint(session: nox.Session) -> None:
args = *(session.posargs or ("--show-diff-on-failure",)), "--all-files"
session.run("pre-commit", "run", *args)
session.run("python", "-m", "mypy")
session.run("python", "-m", "pylint", "src")


@nox.session
Expand Down
112 changes: 62 additions & 50 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,69 @@ 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
)/
'''
[project]
name = "dvc-data"
description = "dvc data"
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 = [
"funcy>=1.14",
"dictdiffer>=0.8.1",
"pygtrie>=2.3.2",
"shortuuid>=0.5.0",
"dvc-objects>=1.1.0,<2",
"diskcache>=5.2.1",
"attrs>=21.3.0",
"sqltrie>=0.8.0,<1",
]

[project.urls]
Issues = "https://github.com/iterative/dvc-data/issues"
Source = "https://github.com/iterative/dvc-data"

[project.optional-dependencies]
cli = [
"typer[all]>=0.6",
"rich>=10.11.0,<14.0.0",
]
all = [
"dvc-data[cli]",
]
tests = [
"pytest==7.2.0",
"pytest-sugar==0.9.6",
"pytest-cov==4.0.0",
"pytest-mock==3.10.0",
"pytest-benchmark==4.0.0",
"mypy==1.5.1",
"pytest-servers[s3]==0.1.3",
]
dev = [
"dvc-data[all]",
"dvc-data[tests]",
"blake3>=0.3.1",
]

[project.scripts]
dvc = "dvci_data.__main__:main"

[tool.isort]
profile = "black"
known_first_party = ["dvc_data"]
line_length = 88
[tool.setuptools.package-data]
dvc_objects = ["py.typed"]

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

[tool.pytest.ini_options]
addopts = "-ra -Werror --benchmark-skip"
Expand Down Expand Up @@ -78,34 +119,5 @@ module = [
"shortuuid.*",
]

[tool.pylint.master]
extension-pkg-whitelist = ["blake3"]

[tool.pylint.format]
max-line-length = 88

[tool.pylint.message_control]
enable = ["c-extension-no-member", "no-else-return"]
disable = [
"format", "refactoring", "spelling", "design",
"invalid-name", "duplicate-code", "fixme",
"unused-wildcard-import", "cyclic-import", "wrong-import-order",
"wrong-import-position", "ungrouped-imports", "multiple-imports",
"logging-format-interpolation", "logging-fstring-interpolation",
"missing-function-docstring", "missing-module-docstring",
"missing-class-docstring", "raise-missing-from", "import-outside-toplevel",
]

[tool.pylint.typecheck]
ignored-classes = ["attr._make._CountingAttr"]

[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.codespell]
ignore-words-list = "fo"

[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101"]
86 changes: 0 additions & 86 deletions setup.cfg

This file was deleted.

0 comments on commit 3a5ab60

Please sign in to comment.