Skip to content

Commit 8c1be6f

Browse files
authored
refactor: update template (#77)
2 parents 56370ee + dba6778 commit 8c1be6f

File tree

15 files changed

+107
-95
lines changed

15 files changed

+107
-95
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 0.1.11
2+
_commit: 0.1.16
33
_src_path: gh:12rambau/pypackage
44
author_email: [email protected]
55
author_first_name: Pierrick

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"ghcr.io/devcontainers-contrib/features/nox:2": {},
66
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
77
},
8-
"postCreateCommand": "python -m pip install commitizen && pre-commit install"
8+
"postCreateCommand": "python -m pip install commitizen uv && pre-commit install"
99
}

.github/workflows/pypackage_check.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ name: template update check
22

33
on:
44
workflow_dispatch:
5-
schedule:
6-
- cron: "0 0 1 * *" # Run at 00:00 on the first day of each month
5+
6+
env:
7+
PIP_ROOT_USER_ACTION: ignore
78

89
jobs:
910
check_version:
1011
runs-on: ubuntu-latest
1112
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-python@v4
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
1415
with:
1516
python-version: "3.10"
1617
- name: install dependencies

.github/workflows/release.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
release:
55
types: [created]
66

7+
env:
8+
PIP_ROOT_USER_ACTION: ignore
9+
710
jobs:
811
tests:
912
uses: ./.github/workflows/unit.yaml
@@ -12,12 +15,12 @@ jobs:
1215
needs: [tests]
1316
runs-on: ubuntu-latest
1417
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-python@v4
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
1720
with:
18-
python-version: "3.10"
21+
python-version: "3.11"
1922
- name: Install dependencies
20-
run: pip install twine build nox
23+
run: pip install twine build nox[uv]
2124
- name: update citation date
2225
run: nox -s release-date
2326
- name: Build and publish

.github/workflows/unit.yaml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,42 @@ on:
77
- main
88
pull_request:
99

10+
env:
11+
FORCE_COLOR: 1
12+
PIP_ROOT_USER_ACTION: ignore
13+
1014
jobs:
1115
lint:
1216
runs-on: ubuntu-latest
1317
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-python@v4
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
1620
with:
17-
python-version: "3.10"
21+
python-version: "3.11"
1822
- uses: pre-commit/[email protected]
1923

2024
mypy:
2125
runs-on: ubuntu-latest
2226
steps:
23-
- uses: actions/checkout@v3
24-
- uses: actions/setup-python@v4
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-python@v5
2529
with:
26-
python-version: "3.10"
30+
python-version: "3.11"
2731
- name: Install nox
28-
run: pip install nox
32+
run: pip install nox[uv]
2933
- name: run mypy checks
3034
run: nox -s mypy
3135

3236
docs:
3337
needs: [lint, mypy]
3438
runs-on: ubuntu-latest
3539
steps:
36-
- uses: actions/checkout@v3
37-
- uses: actions/setup-python@v4
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
3842
with:
39-
python-version: "3.10"
43+
python-version: "3.11"
4044
- name: Install nox
41-
run: pip install nox
45+
run: pip install nox[uv]
4246
- name: build static docs
4347
run: nox -s docs
4448

@@ -56,13 +60,13 @@ jobs:
5660
python-version: "3.11"
5761
runs-on: ${{ matrix.os }}
5862
steps:
59-
- uses: actions/checkout@v3
63+
- uses: actions/checkout@v4
6064
- name: Set up Python ${{ matrix.python-version }}
61-
uses: actions/setup-python@v4
65+
uses: actions/setup-python@v5
6266
with:
6367
python-version: ${{ matrix.python-version }}
6468
- name: Install nox
65-
run: pip install nox
69+
run: pip install nox[uv]
6670
- name: test with pytest
6771
run: nox -s ci-test
6872
- name: assess dead fixtures
@@ -84,7 +88,7 @@ jobs:
8488
name: coverage
8589
path: coverage.xml
8690
- name: codecov
87-
uses: codecov/codecov-action@v3
91+
uses: codecov/codecov-action@v4
8892
with:
8993
file: ./coverage.xml
9094
token: ${{ secrets.CODECOV_TOKEN }}

.pre-commit-config.yaml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
default_install_hook_types: [pre-commit, commit-msg]
22

33
repos:
4-
- repo: "https://github.com/psf/black"
5-
rev: "22.3.0"
6-
hooks:
7-
- id: black
8-
stages: [commit]
9-
104
- repo: "https://github.com/commitizen-tools/commitizen"
115
rev: "v2.18.0"
126
hooks:
@@ -17,38 +11,34 @@ repos:
1711
rev: "0.5.0"
1812
hooks:
1913
- id: nbstripout
20-
stages: [commit]
14+
stages: [pre-commit]
2115

22-
- repo: "https://github.com/pre-commit/mirrors-prettier"
23-
rev: "v2.7.1"
16+
- repo: "https://github.com/pycontribs/mirrors-prettier"
17+
rev: "v3.4.2"
2418
hooks:
2519
- id: prettier
26-
stages: [commit]
20+
stages: [pre-commit]
2721
exclude: tests\/test_.+\.
2822

2923
- repo: https://github.com/charliermarsh/ruff-pre-commit
30-
rev: "v0.0.215"
24+
rev: "v0.7.0"
3125
hooks:
3226
- id: ruff
33-
stages: [commit]
34-
35-
- repo: https://github.com/PyCQA/doc8
36-
rev: "v1.1.1"
37-
hooks:
38-
- id: doc8
39-
stages: [commit]
27+
stages: [pre-commit]
28+
- id: ruff-format
29+
stages: [pre-commit]
4030

41-
- repo: https://github.com/FHPythonUtils/LicenseCheck
42-
rev: "2023.5.1"
31+
- repo: https://github.com/sphinx-contrib/sphinx-lint
32+
rev: "v1.0.0"
4333
hooks:
44-
- id: licensecheck
45-
stages: [commit]
34+
- id: sphinx-lint
35+
stages: [pre-commit]
4636

4737
- repo: https://github.com/codespell-project/codespell
4838
rev: v2.2.4
4939
hooks:
5040
- id: codespell
51-
stages: [commit]
41+
stages: [pre-commit]
5242
additional_dependencies:
5343
- tomli
5444

@@ -57,5 +47,5 @@ repos:
5747
rev: v4.3.0
5848
hooks:
5949
- id: check-merge-conflict
60-
stages: [commit]
50+
stages: [pre-commit]
6151
args: [--assume-in-merge]

README.rst

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,48 @@
11
PyGADM
22
======
33

4-
.. image:: https://img.shields.io/badge/License-MIT-yellow?logo=opensourceinitiative&logoColor=white
4+
.. |license| image:: https://img.shields.io/badge/License-MIT-yellow.svg?logo=opensourceinitiative&logoColor=white
55
:target: LICENSE
66
:alt: License: MIT
77

8-
.. image:: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow?logo=git&logoColor=white
8+
.. |commit| image:: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?logo=git&logoColor=white
99
:target: https://conventionalcommits.org
1010
:alt: conventional commit
1111

12-
.. image:: https://img.shields.io/badge/code%20style-black-000000?logo=ford&logoColor=white
13-
:target: https://github.com/psf/black
14-
:alt: Black badge
12+
.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
13+
:target: https://github.com/astral-sh/ruff
14+
:alt: ruff badge
1515

16-
.. image:: https://img.shields.io/badge/code_style-prettier-ff69b4?logo=prettier&logoColor=white
16+
.. |prettier| image:: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier&logoColor=white
1717
:target: https://github.com/prettier/prettier
1818
:alt: prettier badge
1919

20-
.. image:: https://img.shields.io/badge/pre--commit-active-yellow?logo=pre-commit&logoColor=white
20+
.. |pre-commmit| image:: https://img.shields.io/badge/pre--commit-active-yellow?logo=pre-commit&logoColor=white
2121
:target: https://pre-commit.com/
2222
:alt: pre-commit
2323

24-
.. image:: https://img.shields.io/pypi/v/pygadm?color=blue&logo=python&logoColor=white
24+
.. |pypi| image:: https://img.shields.io/pypi/v/pygadm?color=blue&logo=pypi&logoColor=white
2525
:target: https://pypi.org/project/pygadm/
2626
:alt: PyPI version
2727

28-
.. image:: https://img.shields.io/conda/vn/conda-forge/pygadm?color=blue&logo=anaconda&logoColor=white
28+
.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/pygadm?color=blue&logo=anaconda&logoColor=white
2929
:target: https://anaconda.org/conda-forge/pygadm
3030
:alt: Conda Version
3131

32-
.. image:: https://img.shields.io/github/actions/workflow/status/12rambau/pygadm/unit.yaml?logo=github&logoColor=white
32+
.. |build| image:: https://img.shields.io/github/actions/workflow/status/12rambau/pygadm/unit.yaml?logo=github&logoColor=white
3333
:target: https://github.com/12rambau/pygadm/actions/workflows/unit.yaml
3434
:alt: build
3535

36-
.. image:: https://img.shields.io/codecov/c/github/12rambau/pygadm?logo=codecov&logoColor=white
36+
.. |coverage| image:: https://img.shields.io/codecov/c/github/12rambau/pygadm?logo=codecov&logoColor=white
3737
:target: https://codecov.io/gh/12rambau/pygadm
3838
:alt: Test Coverage
3939

40-
.. image:: https://img.shields.io/readthedocs/pygadm?logo=readthedocs&logoColor=white
40+
.. |docs| image:: https://img.shields.io/readthedocs/pygadm?logo=readthedocs&logoColor=white
4141
:target: https://pygadm.readthedocs.io/en/latest/
4242
:alt: Documentation Status
4343

44+
|license| |commit| |ruff| |prettier| |pre-commmit| |pypi| |conda| |build| |coverage| |docs|
45+
4446
Overview
4547
--------
4648

@@ -75,4 +77,4 @@ and then request area of interest from their name or GADM Id:
7577
Credits
7678
-------
7779

78-
This package was created with `Copier <https://copier.readthedocs.io/en/latest/>`__ and the `@12rambau/pypackage <https://github.com/12rambau/pypackage>`__ 0.1.11 project template.
80+
This package was created with `Copier <https://copier.readthedocs.io/en/latest/>`__ and the `@12rambau/pypackage <https://github.com/12rambau/pypackage>`__ 0.1.16 project template.

docs/_static/custom-icon.js

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_template/pypackage-credit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p class="pypackage-credit">
22
From
33
<a href="https://github.com/12rambau/pypackage">@12rambau/pypackage</a>
4-
0.1.11 Copier project.
4+
0.1.16 Copier project.
55
</p>

docs/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@
6464
"url": "https://pypi.org/project/pygadm",
6565
"icon": "fa-brands fa-python",
6666
},
67+
{
68+
"name": "Conda",
69+
"url": "https://anaconda.org/conda-forge/pygadm",
70+
"icon": "fa-custom fa-conda",
71+
"type": "fontawesome",
72+
},
6773
],
6874
}
6975
html_context = {

0 commit comments

Comments
 (0)