Skip to content

Commit 029054f

Browse files
committed
refactor: migrate to PDM
1 parent ae6547f commit 029054f

17 files changed

+744
-197
lines changed

.github/dependabot.yaml

+19-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
1+
---
12
version: 2
3+
24
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
5+
- package-ecosystem: github-actions
6+
directory: /
57
schedule:
6-
interval: "monthly"
8+
interval: monthly
79
groups:
810
ci-dependencies:
911
patterns:
10-
- "*"
12+
- '*'
1113

12-
- package-ecosystem: "pip"
13-
directory: "/"
14+
- package-ecosystem: pip
15+
directory: /
1416
schedule:
15-
interval: "monthly"
17+
interval: monthly
1618
groups:
1719
python-dependencies:
1820
patterns:
19-
- "*"
21+
- '*'
22+
23+
- package-ecosystem: docker
24+
directory: /
25+
schedule:
26+
interval: monthly
27+
groups:
28+
docker-dependencies:
29+
patterns:
30+
- '*'

.github/workflows/image-build-push.yaml

+15-11
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ defaults:
1313
run:
1414
shell: bash
1515

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18+
cancel-in-progress: true
19+
1620
permissions:
1721
contents: read
1822
packages: write
@@ -35,27 +39,27 @@ jobs:
3539

3640
runs-on: ubuntu-24.04
3741
steps:
38-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
42+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
3943

4044
- name: Install cosign
41-
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
45+
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
4246

4347
- name: Set up Docker Buildx
4448
id: buildx
45-
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
49+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
4650
with:
4751
platforms: ${{ matrix.platform }}
4852

4953
- name: Log in to container registry (${{ env.REGISTRY }})
50-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
54+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
5155
with:
5256
registry: ${{ env.REGISTRY }}
5357
username: ${{ github.actor }}
5458
password: ${{ secrets.GITHUB_TOKEN }}
5559

5660
- name: Extract Docker metadata
5761
id: docker_meta
58-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
62+
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
5963
with:
6064
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6165
tags: |
@@ -67,7 +71,7 @@ jobs:
6771
6872
- name: Build and push Docker image
6973
id: docker_build_push
70-
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
74+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
7175
with:
7276
builder: ${{ steps.buildx.outputs.name }}
7377
build-args: |
@@ -98,7 +102,7 @@ jobs:
98102
99103
- name: Upload digest
100104
if: ${{ github.ref == 'refs/heads/main' || startswith(github.event.ref, 'refs/tags/v') }}
101-
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
105+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
102106
with:
103107
if-no-files-found: error
104108
name: digests
@@ -113,24 +117,24 @@ jobs:
113117
runs-on: ubuntu-24.04
114118
steps:
115119
- name: Download digests
116-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
120+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
117121
with:
118122
name: digests
119123
path: /tmp/digests
120124

121125
- name: Set up Docker Buildx
122-
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
126+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
123127

124128
- name: Log in to container registry (${{ env.REGISTRY }})
125-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
129+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
126130
with:
127131
registry: ${{ env.REGISTRY }}
128132
username: ${{ github.actor }}
129133
password: ${{ secrets.GITHUB_TOKEN }}
130134

131135
- name: Extract Docker metadata
132136
id: docker_meta
133-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
137+
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
134138
with:
135139
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
136140
tags: |

.github/workflows/lint-test.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Lint & Test
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- v*
10+
pull_request:
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
lint_test:
22+
runs-on: ubuntu-24.04
23+
steps:
24+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
25+
26+
- name: Setup PDM
27+
uses: pdm-project/setup-pdm@568ddd69406b30de1774ec0044b73ae06e716aa4 # v4.1
28+
with:
29+
python-version: '3.11'
30+
cache: true
31+
32+
- name: Install dependencies
33+
run: pdm install --frozen-lockfile
34+
35+
- name: Run pre-commit
36+
run: pdm pre-commit
37+
38+
- name: Run tests
39+
run: pdm test

.github/workflows/python-ci.yaml

-27
This file was deleted.

.gitignore

+24-50
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,16 @@ eggs/
1616
.eggs/
1717
lib/
1818
lib64/
19+
parts/
1920
sdist/
2021
var/
2122
wheels/
22-
pip-wheel-metadata/
2323
share/python-wheels/
2424
*.egg-info/
2525
.installed.cfg
2626
*.egg
2727
MANIFEST
2828

29-
# PyInstaller
30-
# Usually these files are written by a python script from a template
31-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32-
*.manifest
33-
*.spec
34-
3529
# Installer logs
3630
pip-log.txt
3731
pip-delete-this-directory.txt
@@ -46,31 +40,18 @@ htmlcov/
4640
nosetests.xml
4741
coverage.xml
4842
*.cover
43+
*.py,cover
4944
.hypothesis/
5045
.pytest_cache/
46+
cover/
5147

5248
# Translations
5349
*.mo
5450
*.pot
5551

56-
# Django stuff:
57-
*.log
58-
local_settings.py
59-
db.sqlite3
60-
61-
# Flask stuff:
62-
instance/
63-
.webassets-cache
64-
65-
# Scrapy stuff:
66-
.scrapy
67-
6852
# Sphinx documentation
6953
docs/_build/
7054

71-
# PyBuilder
72-
target/
73-
7455
# Jupyter Notebook
7556
.ipynb_checkpoints
7657

@@ -79,20 +60,22 @@ profile_default/
7960
ipython_config.py
8061

8162
# pyenv
82-
.python-version
83-
84-
# pipenv
85-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
86-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
87-
# having no cross-platform support, pipenv may install dependencies that don’t work, or not
88-
# install all needed dependencies.
89-
#Pipfile.lock
90-
91-
# celery beat schedule file
92-
celerybeat-schedule
63+
# For a library or package, you might want to ignore these files since the code is
64+
# intended to run in multiple environments; otherwise, check them in:
65+
# .python-version
66+
67+
# pdm
68+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
69+
#pdm.lock
70+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
71+
# in version control.
72+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
73+
.pdm.toml
74+
.pdm-python
75+
.pdm-build/
9376

94-
# SageMath parsed files
95-
*.sage.py
77+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
78+
__pypackages__/
9679

9780
# Environments
9881
.env
@@ -118,18 +101,9 @@ venv.bak/
118101
.dmypy.json
119102
dmypy.json
120103

121-
# Pyre type checker
122-
.pyre/
123-
124-
# Azure Functions artifacts
125-
bin
126-
obj
127-
appsettings.json
128-
local.settings.json
129-
130-
# Azurite artifacts
131-
__blobstorage__
132-
__queuestorage__
133-
__azurite_db*__.json
134-
.python_packages
135-
.pdm-python
104+
# PyCharm
105+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
106+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
107+
# and can be added to the global gitignore or merged into this file. For a more nuclear
108+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
109+
.idea/

.markdownlint.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
MD013:
3+
line_length: 120
4+
5+
MD024: false

0 commit comments

Comments
 (0)