Skip to content

Commit 8b2f78f

Browse files
authored
Release/2.0.0
* chore: release 2.0.0 - Drop Python 3.8 and 3.9 support; require Python >=3.10 - Add Python 3.13 and 3.14 support to classifiers and CI matrix - Allow `ProtoModule(file_path=None)`: auto-generate unique filename (`definition_N.proto`) - Fix `KeyError` in `test_compile_simple_dependency` by deduplicating `ProtoCollection.modules` values with `set()` - Migrate tox config from `tox.ini` into `pyproject.toml`; adopt `tox-uv` - Migrate CI from `actions/setup-python` + pip to `astral-sh/setup-uv` - Update GitHub Actions plugins to latest: `checkout@v6`, `setup-uv@v7`, `setup-python@v6` - Add `ty` type-checker to lint tox environment; remove Black - Fix README wording: replace "a `.proto` string" with "a protobuf definition string" - Add CHANGELOG.md covering all releases from 0.0.2 to 2.0.0 * bump version 1.0.5 -> 2.0.0rc0 * bump version 2.0.0rc0 -> 2.0.0rc1 * Fix an issue in test.yml * iterate to get coverage uploaded * iterate to get coverage uploaded * bump version 2.0.0rc1 -> 2.0.0rc2 * bump version 2.0.0rc2 -> 2.0.0
1 parent 109ea61 commit 8b2f78f

15 files changed

Lines changed: 782 additions & 360 deletions

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v4
1111
- name: Set up
12-
uses: actions/setup-python@v5
12+
uses: actions/setup-python@v6
1313
with:
1414
python-version: 3.11
1515
- name: Install tools

.github/workflows/test.yml

Lines changed: 18 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -2,125 +2,42 @@ name: test
22
on:
33
push:
44
pull_request:
5+
workflow_dispatch:
56
schedule:
6-
- cron: "0 8 * * *"
7+
- cron: "0 8 * * 1" # every Monday at 8am UTC
78

89
jobs:
910
lint:
1011
runs-on: ubuntu-latest
1112
steps:
1213
- uses: actions/checkout@v4
13-
- name: Set up Python
14-
uses: actions/setup-python@v5
15-
with:
16-
python-version: "3.x"
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install -e '.[dev]'
21-
- name: Format with Black
22-
run: black .
23-
- name: Lint with Ruff
24-
run: ruff check .
25-
26-
27-
py_39_proto_203:
28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
os: [ ubuntu-latest, macos-13, windows-latest ]
32-
runs-on: ${{ matrix.os }}
33-
timeout-minutes: 30
34-
steps:
35-
- uses: actions/checkout@v4
36-
with:
37-
fetch-depth: 0
38-
- uses: actions/setup-python@v5
39-
with:
40-
python-version: 3.9
41-
architecture: x64
42-
cache: pip
43-
- name: Install Protoc
44-
uses: arduino/setup-protoc@v1.1.2
45-
with:
46-
version: 3.20.3
47-
repo-token: ${{ secrets.GITHUB_TOKEN }}
48-
- name: install dependencies
49-
run: |
50-
pip install --upgrade pip
51-
pip install -e '.[ci]'
52-
protoc --version
53-
pip freeze
54-
- name: Setup test suite
55-
run: tox -vv --notest
56-
- name: Run test suite
57-
run: tox --skip-pkg-install
14+
- uses: astral-sh/setup-uv@v7
15+
- run: uv run --extra dev ruff check .
5816

59-
py_31x_proto_252:
17+
test:
6018
strategy:
6119
fail-fast: false
6220
matrix:
63-
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
64-
os: [ ubuntu-latest, macos-13, windows-latest ]
65-
python: [ '3.10', '3.11']
21+
# https://docs.github.com/en/actions/using-jobs/using-a-matrix
22+
os: [ubuntu-latest, macos-latest, windows-latest]
23+
protoc: ["25.x", "34.x"]
6624
runs-on: ${{ matrix.os }}
6725
timeout-minutes: 30
6826
steps:
69-
- uses: actions/checkout@v4
7027
# https://github.com/actions/checkout
28+
- uses: actions/checkout@v4
7129
with:
7230
fetch-depth: 0
73-
- uses: actions/setup-python@v5
74-
# https://github.com/actions/setup-python
75-
with:
76-
python-version: ${{ matrix.python }}
77-
architecture: x64
78-
cache: pip
79-
- name: Install Protoc
80-
uses: arduino/setup-protoc@v3
31+
# https://github.com/astral-sh/setup-uv
8132
# https://github.com/arduino/setup-protoc
33+
- uses: astral-sh/setup-uv@v7
34+
- uses: arduino/setup-protoc@v3
8235
with:
83-
version: 25.2
36+
version: ${{ matrix.protoc }}
8437
repo-token: ${{ secrets.GITHUB_TOKEN }}
85-
- name: install dependencies
86-
run: |
87-
pip install --upgrade pip
88-
pip install -e '.[ci]'
89-
protoc --version
90-
pip freeze
91-
- name: Setup test suite
92-
run: tox -vv --notest
93-
- name: Run test suite
94-
run: tox --skip-pkg-install
95-
96-
py_3x_proto_25x:
97-
strategy:
98-
fail-fast: false
99-
matrix:
100-
os: [ubuntu-latest, macos-latest, windows-latest]
101-
runs-on: ${{ matrix.os }}
102-
timeout-minutes: 30
103-
steps:
104-
- uses: actions/checkout@v4
38+
- run: uv run --extra ci tox -e py310,py311,py312,py313,py314
39+
- uses: codecov/codecov-action@v5
40+
if: matrix.os == 'ubuntu-latest' && matrix.protoc == '25.x'
10541
with:
106-
fetch-depth: 0
107-
- uses: actions/setup-python@v5
108-
with:
109-
python-version: 3.x
110-
architecture: x64
111-
cache: pip
112-
- name: Install Protoc
113-
uses: arduino/setup-protoc@v3
114-
with:
115-
version: 25.x
116-
repo-token: ${{ secrets.GITHUB_TOKEN }}
117-
- name: install dependencies
118-
run: |
119-
pip install --upgrade pip
120-
pip install -e '.[ci]'
121-
pip --version
122-
pip freeze
123-
- name: Setup test suite
124-
run: tox -vv --notest
125-
- name: Run test suite
126-
run: tox --skip-pkg-install
42+
token: ${{ secrets.CODECOV_TOKEN }}
43+
verbose: true

.pre-commit-config.yaml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,16 @@
11
# To install the git pre-commit hook run:
22
# pre-commit install
33
# To update the pre-commit hooks run:
4-
# pre-commit install-hooks
4+
# pre-commit autoupdate
55
exclude: '^(\.tox|\.bumpversion\.cfg)(/|$)'
66
repos:
7-
- repo: https://github.com/psf/black
8-
rev: 24.1.1
9-
hooks:
10-
- id: black
11-
- repo: https://github.com/charliermarsh/ruff-pre-commit
12-
rev: "v0.6.2"
7+
- repo: https://github.com/astral-sh/ruff-pre-commit
8+
rev: "v0.11.2"
139
hooks:
1410
- id: ruff
15-
- repo: https://github.com/asottile/pyupgrade
16-
rev: v3.17.0
17-
hooks:
18-
- id: pyupgrade
19-
args: [ '--py38-plus' ]
20-
- repo: https://github.com/mgedmin/check-python-versions
21-
rev: 0.22.0
22-
hooks:
23-
- id: check-python-versions
24-
args: [ '--only', 'pyproject.toml,tox.ini' ]
25-
verbose: true
11+
- id: ruff-format
2612
- repo: https://github.com/pre-commit/pre-commit-hooks
27-
rev: v4.6.0
13+
rev: v5.0.0
2814
hooks:
2915
- id: check-yaml
3016
- id: end-of-file-fixer

0 commit comments

Comments
 (0)