Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/py-template",
"commit": "454eb9a60092e980778877f1248072b45a92bb74",
"commit": "2d55533d84a4e1708ceb78b42dcfdb43cbad46f6",
"context": {
"cookiecutter": {
"project_name": "scmrepo",
Expand All @@ -15,7 +15,8 @@
"docs": "False",
"short_description": "scmrepo",
"development_status": "Development Status :: 4 - Beta",
"_template": "https://github.com/iterative/py-template"
"_template": "https://github.com/iterative/py-template",
"_commit": "2d55533d84a4e1708ceb78b42dcfdb43cbad46f6"
}
},
"directory": null,
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/update-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
<<<<<<<
- name: Check out the repository
uses: actions/checkout@v5
=======
- name: Check out the repository
uses: actions/checkout@v4
>>>>>>>

<<<<<<<
- name: Update template via cruft
uses: iterative/py-template@main
=======
- name: Update template
uses: iterative/py-template@main
>>>>>>>
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
<<<<<<<
rev: v6.0.0
=======
rev: v5.0.0
>>>>>>>
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -20,7 +24,11 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
<<<<<<<
rev: 'v0.13.1'
=======
rev: 'v0.11.8'
>>>>>>>
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -30,3 +38,10 @@ repos:
hooks:
- id: codespell
additional_dependencies: ["tomli"]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix, --no-sort]
- id: pretty-format-yaml
args: [--autofix, --indent, '2', '--offset', '2', --preserve-quotes]
9 changes: 9 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
python_versions = nox.project.python_versions(project)


<<<<<<<
@nox.session(python=python_versions)
=======
@nox.session(
python=["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"],
)
>>>>>>>
def tests(session: nox.Session) -> None:
session.install(".[tests]")
session.run(
Expand All @@ -31,11 +37,14 @@ def lint(session: nox.Session) -> None:
session.install("pre-commit")
session.install("-e", ".[dev]")

<<<<<<<
args = *(session.posargs or ("--show-diff-on-failure",)), "--all-files"
session.run("pre-commit", "run", *args)
session.run("python", "-m", "mypy")


=======
>>>>>>>
@nox.session
def build(session: nox.Session) -> None:
session.install("build", "setuptools", "twine")
Expand Down
72 changes: 63 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,35 @@
requires = ["setuptools>=77", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[project]
name = "scmrepo"
description = "scmrepo"
readme = "README.rst"
<<<<<<<
license = "Apache-2.0"
authors = [{ name = "Iterative", email = "support@dvc.org" }]
=======
license = {text = "Apache-2.0"}
authors = [{name = "Iterative", email = "support@dvc.org"}]
>>>>>>>
classifiers = [
<<<<<<<
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"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",
"Programming Language :: Python :: 3.12",
"Development Status :: 4 - Beta"
>>>>>>>
]
requires-python = ">=3.9"
dynamic = ["version"]
Expand Down Expand Up @@ -48,21 +61,38 @@ tests = [
"pytest-docker>=1,<4",
"pytest-mock",
"pytest-sugar",
<<<<<<<
"pytest-test-utils>=0.1.0,<0.2",
"proxy.py",
=======

[project.optional-dependencies]
tests = [
"pytest==7.2.0",
"pytest-sugar==0.9.5",
"pytest-cov==3.0.0",
"pytest-mock==3.8.2",
"mypy==1.9.0"
>>>>>>>
]
dev = [
<<<<<<<
"mypy==1.17.1",
"scmrepo[tests]",
"types-certifi",
"types-mock",
"types-paramiko",
"types-tqdm",
=======
"scmrepo[tests]",
>>>>>>>
]

[tool.setuptools.package-data]
scmrepo = ["py.typed"]

[tool.setuptools_scm]

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
Expand All @@ -86,13 +116,13 @@ source = ["src", "*/site-packages"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"if typing.TYPE_CHECKING:",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"raise AssertionError",
"@overload",
"pragma: no cover",
"if __name__ == .__main__.:",
"if typing.TYPE_CHECKING:",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"raise AssertionError",
"@overload"
]

[tool.mypy]
Expand Down Expand Up @@ -125,7 +155,11 @@ module = [
ignore_missing_imports = true

[tool.codespell]
<<<<<<<
ignore-words-list = "cachable, keypair"
=======
ignore-words-list = " "
>>>>>>>
skip = "CODE_OF_CONDUCT.rst"

[tool.ruff]
Expand All @@ -134,6 +168,7 @@ show-fixes = true

[tool.ruff.lint]
ignore = [
<<<<<<<
"S101", # assert
"PLR2004", # magic-value-comparison
"PLW2901", # redefined-loop-name
Expand All @@ -148,7 +183,26 @@ ignore = [
"SIM117", # multiple-with-statements
"N818", # error-suffix-on-exception-name
"PLC0415", # import-outside-top-level
=======
"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
>>>>>>>
]
<<<<<<<
=======
select = ["ALL"]

[tool.ruff.lint.per-file-ignores]
"noxfile.py" = ["D", "PTH"]
"tests/**" = ["S", "ARG001", "ARG002", "ANN"]
"docs/**" = ["INP"]
>>>>>>>
select = [
"A", # flake8-buitlins
"ASYNC", # flake8-async
Expand Down