Skip to content

Commit

Permalink
chore: Template upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed May 23, 2024
1 parent 1a1d06e commit 5623124
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 292 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 1.2.4
_commit: 1.2.5
_src_path: https://github.com/pawamoy/copier-uv.git
author_email: [email protected]
author_fullname: Timothée Mazzucotelli
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ jobs:
- name: Check if the code is correctly typed
run: make check-types

- name: Check for vulnerabilities in dependencies
run: make check-dependencies

- name: Check for breaking changes in the API
run: make check-api

Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ actions = \
changelog \
check \
check-api \
check-dependencies \
check-docs \
check-quality \
check-types \
Expand Down
2 changes: 0 additions & 2 deletions config/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[pytest]
python_files =
test_*.py
*_test.py
tests.py
addopts =
--cov
--cov-config config/coverage.ini
Expand Down
6 changes: 0 additions & 6 deletions config/vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
"command": "scripts/make",
"args": ["check-docs"]
},
{
"label": "check-dependencies",
"type": "process",
"command": "scripts/make",
"args": ["check-dependencies"]
},
{
"label": "check-api",
"type": "process",
Expand Down
39 changes: 19 additions & 20 deletions devdeps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,31 @@
editables>=0.5

# maintenance
build>=1.0
git-changelog>=2.3
twine>=5.0
build>=1.2
git-changelog>=2.5
twine>=5.1; python_version < '3.13'

# ci
duty>=0.10
ruff>=0.0
pytest>=7.4
pytest-cov>=4.1
duty>=1.4
ruff>=0.4
pytest>=8.2
pytest-cov>=5.0
pytest-randomly>=3.15
pytest-xdist>=3.3
mypy>=1.5
types-markdown>=3.5
pytest-xdist>=3.6
mypy>=1.10
types-markdown>=3.6
types-pyyaml>=6.0
safety>=2.3

# docs
black>=23.9
markdown-callouts>=0.3
markdown-exec>=1.7
mkdocs>=1.5
black>=24.4
markdown-callouts>=0.4
markdown-exec>=1.8
mkdocs>=1.6
mkdocs-coverage>=1.0
mkdocs-gen-files>=0.5
mkdocs-git-committers-plugin-2>=1.2
mkdocs-git-committers-plugin-2>=2.3
mkdocs-literate-nav>=0.6
mkdocs-material>=9.4
mkdocs-minify-plugin>=0.7
mkdocstrings[python]>=0.23
tomli>=2.0; python_version < '3.11'
mkdocs-material>=9.5
mkdocs-minify-plugin>=0.8
mkdocstrings[python]>=0.25
tomli>=2.0; python_version < '3.11'
21 changes: 2 additions & 19 deletions duties.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def changelog(ctx: Context, bump: str = "") -> None:
Parameters:
bump: Bump option passed to git-changelog.
"""
ctx.run(tools.git_changelog(bump=bump or None), title="Updating changelog", command="git-changelog")
ctx.run(tools.git_changelog(bump=bump or None), title="Updating changelog")


@duty(pre=["check_quality", "check_types", "check_docs", "check_dependencies", "check-api"])
Expand All @@ -67,23 +67,6 @@ def check_quality(ctx: Context) -> None:
)


@duty
def check_dependencies(ctx: Context) -> None:
"""Check for vulnerabilities in dependencies."""
# retrieve the list of dependencies
requirements = ctx.run(
["uv", "pip", "freeze"],
silent=True,
allow_overrides=False,
)

ctx.run(
tools.safety.check(requirements),
title="Checking dependencies",
command="uv pip freeze | safety check --stdin",
)


@duty
def check_docs(ctx: Context) -> None:
"""Check if the documentation builds correctly."""
Expand Down Expand Up @@ -169,7 +152,7 @@ def publish(ctx: Context) -> None:
dists = [str(dist) for dist in Path("dist").iterdir()]
ctx.run(
tools.twine.upload(*dists, skip_existing=True),
title="Publish source and wheel distributions to PyPI",
title="Publishing source and wheel distributions to PyPI",
pty=PTY,
)

Expand Down
Loading

0 comments on commit 5623124

Please sign in to comment.