Skip to content

Commit 6b6894c

Browse files
authored
Merge pull request #4 from spraakbanken/rename-project
rename project
2 parents c14090e + 60ad41f commit 6b6894c

File tree

17 files changed

+1334
-1575
lines changed

17 files changed

+1334
-1575
lines changed

.github/workflows/check.yml

Lines changed: 28 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ permissions:
1111
contents: read
1212

1313
env:
14-
MINIMUM_PYTHON_VERSION: "3.9"
15-
UV_VERSION: "0.4.18"
16-
UV_CACHE_DIR: /tmp/.uv-cache
14+
MINIMUM_PYTHON_VERSION: "3.11"
15+
UV_VERSION: "0.8.13"
1716

1817
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that
1918
# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5
@@ -24,14 +23,15 @@ concurrency:
2423
jobs:
2524
fmt:
2625
runs-on: ubuntu-latest
27-
name: ubuntu / 3.9 / fmt
26+
name: ubuntu / 3.11 / fmt
2827
steps:
29-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
3029
with:
30+
persist-credentials: false
3131
submodules: true
3232

3333
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }}
34-
uses: actions/setup-python@v5
34+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3535
id: setup-python
3636
with:
3737
python-version: ${{ env.MINIMUM_PYTHON_VERSION }}
@@ -40,42 +40,27 @@ jobs:
4040
# ----- setup uv and load cache -----
4141
#----------------------------------------------
4242
- name: Set up uv
43-
run: curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
44-
45-
- name: Restore uv cache
46-
uses: actions/cache@v4
47-
with:
48-
path: /tmp/.uv-cache
49-
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
50-
restore-keys: |
51-
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
52-
uv-${{ runner.os }}
53-
54-
- name: Load cached venv
55-
id: cached-venv
56-
uses: actions/cache@v4
43+
uses: astral-sh/setup-uv@4e1e303f7dafb1a3ec7770a507052543f593ad96 # v6.6.0
5744
with:
58-
path: .venv
59-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }}
45+
version: ${{ env.UV_VERSION }}
46+
enable-cache: true
6047

6148
- name: Install dependencies
62-
if: steps.cached-venv.outputs.cache-hit != 'true'
6349
run: make install-dev
6450

6551
- name: check formatting
6652
run: make check-fmt
6753

68-
- name: Minimize uv cache
69-
run: uv cache prune --ci
7054
lint:
7155
runs-on: ubuntu-latest
72-
name: ubuntu / 3.9 / lint
56+
name: ubuntu / 3.11 / lint
7357
steps:
74-
- uses: actions/checkout@v4
58+
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
7559
with:
60+
persist-credentials: false
7661
submodules: true
7762
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }}
78-
uses: actions/setup-python@v5
63+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
7964
id: setup-python
8065
with:
8166
python-version: ${{ env.MINIMUM_PYTHON_VERSION }}
@@ -84,41 +69,27 @@ jobs:
8469
# ----- setup uv and load cache -----
8570
#----------------------------------------------
8671
- name: Set up uv
87-
run: curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
88-
89-
- name: Restore uv cache
90-
uses: actions/cache@v4
72+
uses: astral-sh/setup-uv@4e1e303f7dafb1a3ec7770a507052543f593ad96 # v6.6.0
9173
with:
92-
path: /tmp/.uv-cache
93-
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
94-
restore-keys: |
95-
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
96-
uv-${{ runner.os }}
97-
98-
- name: Load cached venv
99-
id: cached-venv
100-
uses: actions/cache@v4
101-
with:
102-
path: .venv
103-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }}
74+
version: ${{ env.UV_VERSION }}
75+
enable-cache: true
76+
10477
- name: Install dependencies
105-
if: steps.cached-venv.outputs.cache-hit != 'true'
10678
run: make install-dev
79+
10780
- name: lint code
10881
run: make lint
10982

110-
- name: Minimize uv cache
111-
run: uv cache prune --ci
112-
11383
type-check:
11484
runs-on: ubuntu-latest
115-
name: ubuntu / 3.9 / type-check
85+
name: ubuntu / 3.11 / type-check
11686
steps:
117-
- uses: actions/checkout@v4
87+
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
11888
with:
89+
persist-credentials: false
11990
submodules: true
12091
- name: Set up the python ${{ env.MINIMUM_PYTHON_VERSION }}
121-
uses: actions/setup-python@v5
92+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
12293
id: setup-python
12394
with:
12495
python-version: ${{ env.MINIMUM_PYTHON_VERSION }}
@@ -127,32 +98,17 @@ jobs:
12798
# ----- setup uv and load cache -----
12899
#----------------------------------------------
129100
- name: Set up uv
130-
run: curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
131-
132-
- name: Restore uv cache
133-
uses: actions/cache@v4
134-
with:
135-
path: /tmp/.uv-cache
136-
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
137-
restore-keys: |
138-
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
139-
uv-${{ runner.os }}
140-
141-
- name: Load cached venv
142-
id: cached-venv
143-
uses: actions/cache@v4
101+
uses: astral-sh/setup-uv@4e1e303f7dafb1a3ec7770a507052543f593ad96 # v6.6.0
144102
with:
145-
path: .venv
146-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }}
103+
version: ${{ env.UV_VERSION }}
104+
enable-cache: true
105+
147106
- name: Install dependencies
148-
if: steps.cached-venv.outputs.cache-hit != 'true'
149107
run: make install-dev
108+
150109
- name: type-check code
151110
run: make type-check
152111

153-
- name: Minimize uv cache
154-
run: uv cache prune --ci
155-
156112
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
157113
check-check:
158114
if: always()
@@ -164,7 +120,6 @@ jobs:
164120
permissions: {}
165121
steps:
166122
- name: Decide whether the needed jobs succeeded or failed
167-
uses: re-actors/alls-green@release/v1
123+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
168124
with:
169125
jobs: ${{ toJSON(needs) }}
170-
allowed-failures: upload-coverage

.github/workflows/release.yml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,29 @@ permissions:
1616
contents: read
1717

1818
env:
19-
MINIMUM_PYTHON_VERSION: "3.9"
20-
UV_VERSION: "0.4.18"
21-
UV_CACHE_DIR: /tmp/.uv-cache
19+
MINIMUM_PYTHON_VERSION: "3.11"
20+
UV_VERSION: "0.8.13"
2221

2322
jobs:
2423
build:
2524
# This action builds distribution files for upload to PyPI
2625

27-
name: ubuntu / 3.9 / build
26+
name: ubuntu / 3.11 / build
2827
runs-on: ubuntu-latest
2928
steps:
3029
#----------------------------------------------
3130
# check-out repo and set-up python
3231
#----------------------------------------------
33-
- name: Check out repository
34-
uses: actions/checkout@v4
32+
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
3533
with:
34+
persist-credentials: false
3635
submodules: true
3736

3837
#----------------------------------------------
3938
# ----- setup python -----
4039
#----------------------------------------------
4140
- name: Set up the environment
42-
uses: actions/setup-python@v5
41+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
4342
id: setup-python
4443
with:
4544
python-version: ${{ env.MINIMUM_PYTHON_VERSION }}
@@ -48,16 +47,10 @@ jobs:
4847
# ----- setup uv and load cache -----
4948
#----------------------------------------------
5049
- name: Set up uv
51-
run: curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
52-
53-
- name: Restore uv cache
54-
uses: actions/cache@v4
50+
uses: astral-sh/setup-uv@4e1e303f7dafb1a3ec7770a507052543f593ad96 # v6.6.0
5551
with:
56-
path: /tmp/.uv-cache
57-
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
58-
restore-keys: |
59-
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
60-
uv-${{ runner.os }}
52+
version: ${{ env.UV_VERSION }}
53+
enable-cache: true
6154

6255
#----------------------------------------------
6356
# ----- build distribution -----
@@ -68,19 +61,16 @@ jobs:
6861
#----------------------------------------------
6962
# ----- upload artifacts -----
7063
#----------------------------------------------
71-
- uses: actions/upload-artifact@v4
64+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7265
with:
7366
name: pypi_files
7467
path: dist
7568

76-
- name: Minimize uv cache
77-
run: uv cache prune --ci
78-
7969
test-build:
8070
# This action runs the test suite on the built artifact in the `build` action.
8171
# The default is to run this in ubuntu, macos and windows
8272

83-
name: ${{ matrix.os }} / 3.9 / test built artifact
73+
name: ${{ matrix.os }} / 3.11 / test built artifact
8474
needs: [build]
8575

8676
strategy:
@@ -91,25 +81,26 @@ jobs:
9181

9282
runs-on: ${{ matrix.os }}-latest
9383
steps:
94-
- uses: actions/checkout@v4
84+
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
9585
with:
86+
persist-credentials: false
9687
submodules: true
9788

9889
- name: set up python
99-
uses: actions/setup-python@v5
90+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
10091
with:
10192
python-version: ${{ env.MINIMUM_PYTHON_VERSION }}
10293

10394
- name: get dist artifacts
104-
uses: actions/download-artifact@v4
95+
uses: actions/download-artifact@de96f4613b77ec03b5cf633e7c350c32bd3c5660 # v5.0.0
10596
with:
10697
name: pypi_files
10798
path: dist
10899

109100
- run: rm -r src
110101
- run: pip install typing-extensions
111102
- run: pip install -r tests/requirements-testing.lock
112-
- run: pip install sparv-pipeline-testing --no-index --no-deps --find-links dist --force-reinstall
103+
- run: pip install sparv-testing --no-index --no-deps --find-links dist --force-reinstall
113104
- run: pytest
114105

115106
# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
@@ -122,6 +113,6 @@ jobs:
122113
permissions: {}
123114
steps:
124115
- name: Decide whether the needed jobs succeeded or failed
125-
uses: re-actors/alls-green@release/v1
116+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
126117
with:
127118
jobs: ${{ toJSON(needs) }}

.github/workflows/scheduled.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ permissions:
66

77
on:
88
push:
9-
branches: [main]
9+
branches:
10+
- main
1011
pull_request:
1112
schedule:
1213
- cron: "7 7 * * *"
@@ -18,51 +19,44 @@ concurrency:
1819
name: rolling
1920

2021
env:
21-
UV_VERSION: "0.4.18"
22-
UV_CACHE_DIR: /tmp/.uv-cache
22+
UV_VERSION: "0.8.13"
2323

2424
jobs:
2525
# https://twitter.com/alcuadrado/status/1571291687837732873
2626
update:
2727
# This action checks that updating the dependencies of this crate to the latest available that
28-
# satisfy the versions in Cargo.toml does not break this crate. This is important as consumers
28+
# satisfy the versions in pyproject.toml does not break this crate. This is important as consumers
2929
# of this crate will generally use the latest available crates. This is subject to the standard
3030
# Cargo semver rules (i.e cargo does not update to a new major version unless explicitly told
3131
# to).
3232
runs-on: ubuntu-latest
33-
name: ubuntu / 3.12 / updates work
34-
# There's no point running this if no Cargo.lock was checked in in the first place, since we'd
33+
name: ubuntu / 3.13 / updates work
34+
# There's no point running this if no uv.lock was checked in in the first place, since we'd
3535
# just redo what happened in the regular test job. Unfortunately, hashFiles only works in if on
3636
# steps, so we repeat it.
3737
steps:
38-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
3939
with:
40+
persist-credentials: false
4041
submodules: true
42+
4143
- name: Set up uv
4244
if: hashFiles('uv.lock') != ''
43-
run: curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
44-
- name: Install 3.12
45-
if: hashFiles('uv.lock') != ''
46-
uses: actions/setup-python@v5
45+
uses: astral-sh/setup-uv@4e1e303f7dafb1a3ec7770a507052543f593ad96 # v6.6.0
4746
with:
48-
python-version: "3.12"
47+
version: ${{ env.UV_VERSION }}
48+
enable-cache: true
4949

50-
- name: Restore uv cache
51-
uses: actions/cache@v4
50+
- name: Install 3.13
51+
if: hashFiles('uv.lock') != ''
52+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
5253
with:
53-
path: /tmp/.uv-cache
54-
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
55-
restore-keys: |
56-
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
57-
uv-${{ runner.os }}
54+
python-version: "3.13"
5855

5956
- name: uv sync --dev --upgrade
6057
if: hashFiles('uv.lock') != ''
61-
run: uv sync --dev --upgrade
58+
run: uv sync --dev --upgrade --all-packages --all-extras
59+
6260
- name: make test
6361
if: hashFiles('uv.lock') != ''
6462
run: make test
65-
66-
- name: Minimize uv cache
67-
if: hashFiles('uv.lock') != ''
68-
run: uv cache prune --ci

0 commit comments

Comments
 (0)