Skip to content

Commit 8a2c97d

Browse files
authored
Merge pull request #104 from INCATools/pre-sulo-registry-updates
Update registry and generated artifacts (pre-sulo)
2 parents cfe7d31 + 40a856f commit 8a2c97d

File tree

15 files changed

+3791
-183
lines changed

15 files changed

+3791
-183
lines changed

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"permissions": {
33
"allow": [
4-
"Bash(*)",
4+
"Bash",
55
"Edit",
66
"MultiEdit",
77
"NotebookEdit",

.github/workflows/deploy_documentation.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Deploy Documentation
44
on:
55
workflow_dispatch:
66
push:
7-
branches: [ main ]
7+
branches: [main]
88

99
paths:
1010
- 'src/docs/*'
@@ -22,28 +22,26 @@ jobs:
2222
# check-out repo and set-up python
2323
#----------------------------------------------
2424
- name: Check out repository
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2626
with:
2727
# persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
2828
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
2929

30-
- name: Set up Python3
31-
uses: actions/setup-python@v3
32-
with:
33-
python-version: 3.9
34-
3530
#----------------------------------------------
36-
# install & configure poetry
31+
# install uv
3732
#----------------------------------------------
38-
- name: Install Poetry
39-
uses: snok/install-poetry@v1.3
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v6
35+
with:
36+
python-version: "3.11"
37+
enable-cache: true
38+
cache-dependency-glob: "uv.lock"
4039

4140
#----------------------------------------------
42-
# install dependencies if cache does not exist
41+
# install project dependencies
4342
#----------------------------------------------
4443
- name: Install dependencies
45-
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
46-
run: poetry install --no-interaction
44+
run: uv sync --dev --locked --no-progress
4745

4846
#----------------------------------------------
4947
# Create documentation and deploy.

.github/workflows/main.yaml

Lines changed: 21 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,62 @@
1-
# Built from:
2-
# https://docs.github.com/en/actions/guides/building-and-testing-python
3-
# https://github.com/snok/install-poetry#workflows-and-tips
4-
51
name: Build and test
62

73
on:
84
push:
9-
branches: [ main ]
5+
branches: [main]
106
pull_request:
11-
branches: [ main ]
7+
branches: [main]
128

139
jobs:
1410
lint:
1511
runs-on: ubuntu-latest
1612
strategy:
1713
matrix:
18-
python-version: [ '3.9' ]
14+
python-version: ["3.11"]
1915
steps:
20-
- uses: actions/checkout@v2
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v2
16+
- uses: actions/checkout@v4
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
2319
with:
2420
python-version: ${{ matrix.python-version }}
21+
enable-cache: true
22+
cache-dependency-glob: "uv.lock"
2523
- name: Install dependencies
26-
run: |
27-
pip install tox
24+
run: uv sync --dev --locked
2825
- name: Check code quality with flake8
29-
run: tox -e flake8
26+
run: uv run tox -e flake8
3027

3128
test:
3229
runs-on: ubuntu-latest
3330
strategy:
3431
matrix:
35-
python-version: [ '3.9' ]
32+
python-version: ["3.11"]
3633

3734
steps:
3835

3936
#----------------------------------------------
4037
# check-out repo and set-up python
4138
#----------------------------------------------
4239
- name: Check out repository
43-
uses: actions/checkout@v3
44-
45-
- name: Set up Python ${{ matrix.python-version }}
46-
uses: actions/setup-python@v3
47-
with:
48-
python-version: ${{ matrix.python-version }}
49-
50-
#----------------------------------------------
51-
# install & configure poetry
52-
#----------------------------------------------
53-
- name: Install Poetry
54-
uses: snok/install-poetry@v1.3
55-
with:
56-
virtualenvs-create: true
57-
virtualenvs-in-project: true
40+
uses: actions/checkout@v4
5841

5942
#----------------------------------------------
60-
# load cached venv if cache exists
43+
# install uv
6144
#----------------------------------------------
62-
- name: Load cached venv
63-
id: cached-poetry-dependencies
64-
uses: actions/cache@v3
45+
- name: Install uv
46+
uses: astral-sh/setup-uv@v6
6547
with:
66-
path: .venv
67-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
48+
python-version: ${{ matrix.python-version }}
49+
enable-cache: true
50+
cache-dependency-glob: "uv.lock"
6851

6952
#----------------------------------------------
70-
# install dependencies if cache does not exist
53+
# install dependencies
7154
#----------------------------------------------
7255
- name: Install dependencies
73-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
74-
run: poetry install --no-interaction --no-root
75-
76-
#----------------------------------------------
77-
# install your root project, if required
78-
#----------------------------------------------
79-
- name: Install library
80-
run: poetry install --no-interaction
56+
run: uv sync --dev --locked
8157

8258
#----------------------------------------------
8359
# run test suite
8460
#----------------------------------------------
8561
- name: Run tests
86-
run: poetry run python -m unittest discover
87-
62+
run: uv run python -m unittest discover

.github/workflows/pypi-publish.yaml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,40 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

15-
- name: Set up Python
16-
uses: actions/setup-python@v3
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v6
1717
with:
18-
python-version: 3.9
19-
20-
- name: Install Poetry
21-
uses: snok/install-poetry@v1.3.1
22-
with:
23-
virtualenvs-create: true
24-
virtualenvs-in-project: true
25-
26-
- name: Install dependencies
27-
run: poetry install --no-interaction
18+
python-version: "3.12"
19+
enable-cache: true
20+
cache-dependency-glob: "uv.lock"
2821

2922
- name: Build source and wheel archives
3023
run: |
31-
poetry version $(git describe --tags --abbrev=0)
32-
poetry build
24+
uv sync --locked --no-dev
25+
VERSION="$(git describe --tags --abbrev=0)"
26+
VERSION="${VERSION#v}"
27+
export VERSION
28+
python - <<'PY'
29+
import os
30+
import re
31+
from pathlib import Path
32+
33+
path = Path("pyproject.toml")
34+
data = path.read_text()
35+
version = os.environ["VERSION"]
36+
updated = re.sub(
37+
r'^version = ".*"$',
38+
f'version = "{version}"',
39+
data,
40+
count=1,
41+
flags=re.MULTILINE,
42+
)
43+
path.write_text(updated)
44+
print(f"Set project version to {version}")
45+
PY
46+
uv build
3347
3448
- name: Publish distribution 📦 to PyPI
3549
uses: pypa/gh-action-pypi-publish@v1.2.2

0 commit comments

Comments
 (0)