Skip to content

Commit 06cf5b7

Browse files
committed
Cleanup package infrastructure
1 parent bbeaaea commit 06cf5b7

25 files changed

Lines changed: 1483 additions & 519 deletions

.editorconfig

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,28 @@ insert_final_newline = true
77
trim_trailing_whitespace = true
88
charset = utf-8
99

10-
[*.py]
10+
[*.{css,pcss}]
11+
indent_size = 2
12+
13+
[*.html]
14+
indent_size = 2
15+
16+
[*.ini]
1117
indent_size = 4
18+
19+
[*.{js,ts,vue}]
20+
indent_size = 2
1221
max_line_length = 100
1322

14-
[{*.yml,*.yaml}]
23+
[*.{json,jsonc,json5}]
1524
indent_size = 2
1625

17-
[*.ini]
26+
[*.py]
1827
indent_size = 4
28+
max_line_length = 100
29+
30+
[*.toml]
31+
indent_size = 2
32+
33+
[*.{yml,yaml}]
34+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uv.lock linguist-generated=true

.github/renovate.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: [
4+
'github>kitware-resonant/.github:renovate-library.json5',
5+
],
6+
}

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ on:
44
push:
55
branches:
66
- master
7-
schedule:
8-
- cron: "0 0 * * *"
7+
permissions:
8+
contents: read
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.10", "3.11", "3.12", "3.13"]
14+
python-version: ["3.12", "3.13", "3.14"]
1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v2
16+
- name: Checkout repository
17+
uses: actions/checkout@v6
18+
with:
19+
# Tags are needed to compute the current version number
20+
fetch-depth: 0
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v7
1923
with:
2024
python-version: ${{ matrix.python-version }}
21-
- name: Install tox
22-
run: |
23-
pip install --upgrade pip
24-
pip install tox
2525
- name: Run tests
2626
run: |
27-
tox
27+
uv run tox

.github/workflows/release.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,21 @@ on:
55
jobs:
66
publish:
77
runs-on: ubuntu-latest
8+
environment: release
9+
permissions:
10+
contents: read
11+
id-token: write
812
steps:
9-
- uses: actions/checkout@v2
13+
- name: Checkout repository
14+
uses: actions/checkout@v6
1015
with:
1116
# Tags are needed to compute the current version number
1217
fetch-depth: 0
13-
- name: Set up Python
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: "3.x"
17-
- name: Install tox
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v7
20+
- name: Build the Python distribution
1821
run: |
19-
pip install --upgrade pip
20-
pip install tox
21-
- name: Publish to PyPI
22-
env:
23-
TWINE_USERNAME: "__token__"
24-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
25-
TWINE_NON_INTERACTIVE: "true"
22+
uv build
23+
- name: Publish the Python distributions to PyPI
2624
run: |
27-
tox -e release
25+
uv publish --trusted-publishing=always

.gitignore

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
# Byte-compiled / optimized / DLL files
1+
# Created by https://www.toptal.com/developers/gitignore/api/django
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=django
3+
4+
### Django ###
5+
*.log
6+
*.pot
7+
*.pyc
28
__pycache__/
9+
local_settings.py
10+
db.sqlite3
11+
db.sqlite3-journal
12+
media
13+
14+
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
15+
# in your Git repository. Update and uncomment the following line accordingly.
16+
# <django-project-name>/staticfiles/
17+
18+
### Django.Python Stack ###
19+
# Byte-compiled / optimized / DLL files
320
*.py[cod]
421
*$py.class
522

@@ -20,7 +37,6 @@ parts/
2037
sdist/
2138
var/
2239
wheels/
23-
pip-wheel-metadata/
2440
share/python-wheels/
2541
*.egg-info/
2642
.installed.cfg
@@ -50,16 +66,12 @@ coverage.xml
5066
*.py,cover
5167
.hypothesis/
5268
.pytest_cache/
69+
cover/
5370

5471
# Translations
5572
*.mo
56-
*.pot
5773

5874
# Django stuff:
59-
*.log
60-
local_settings.py
61-
db.sqlite3
62-
db.sqlite3-journal
6375

6476
# Flask stuff:
6577
instance/
@@ -72,6 +84,7 @@ instance/
7284
docs/_build/
7385

7486
# PyBuilder
87+
.pybuilder/
7588
target/
7689

7790
# Jupyter Notebook
@@ -82,7 +95,9 @@ profile_default/
8295
ipython_config.py
8396

8497
# pyenv
85-
.python-version
98+
# For a library or package, you might want to ignore these files since the code is
99+
# intended to run in multiple environments; otherwise, check them in:
100+
# .python-version
86101

87102
# pipenv
88103
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -91,7 +106,22 @@ ipython_config.py
91106
# install all needed dependencies.
92107
#Pipfile.lock
93108

94-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
109+
# poetry
110+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
111+
# This is especially recommended for binary packages to ensure reproducibility, and is more
112+
# commonly ignored for libraries.
113+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
114+
#poetry.lock
115+
116+
# pdm
117+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
118+
#pdm.lock
119+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
120+
# in version control.
121+
# https://pdm.fming.dev/#use-with-ide
122+
.pdm.toml
123+
124+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
95125
__pypackages__/
96126

97127
# Celery stuff
@@ -127,3 +157,18 @@ dmypy.json
127157

128158
# Pyre type checker
129159
.pyre/
160+
161+
# pytype static type analyzer
162+
.pytype/
163+
164+
# Cython debug symbols
165+
cython_debug/
166+
167+
# PyCharm
168+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
169+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
170+
# and can be added to the global gitignore or merged into this file. For a more nuclear
171+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
172+
#.idea/
173+
174+
# End of https://www.toptal.com/developers/gitignore/api/django

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

NOTICE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2022 Kitware, Inc.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
See accompanying LICENSE file. You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

0 commit comments

Comments
 (0)