Skip to content

Commit 4853b11

Browse files
Message wrapping (#85)
* New wrapping mechanism * Remove internal lib * Add unwrap member to metadata * Test invalid timezone for timetamp * Improve timestamp support * Reduce import size * Fix small bug * Fix wrap / unwrap confusion * Fix sync client test * Add back test * Add back timezone test * Disable testing the Rust codec * Fix cache with Rust codec workflow * Fix workflow * Disable Rust codec * Remove comment * Remove comment * Fix sync client testing * Remove useless wrap parameter * Add comment
1 parent e2a7ee6 commit 4853b11

File tree

11 files changed

+102
-1715
lines changed

11 files changed

+102
-1715
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ permissions:
1313

1414
jobs:
1515
tests:
16-
name: ${{ matrix.os }} / ${{ matrix.python-version }}
16+
name: ${{ matrix.os }} / ${{ matrix.python-version }} / Rust codec ${{ matrix.rust-codec }}
1717
runs-on: ${{ matrix.os }}-latest
1818
strategy:
1919
fail-fast: false
2020
matrix:
2121
os: [Ubuntu, MacOS, Windows]
2222
python-version: ['3.10', '3.11', '3.12', '3.13']
23+
rust-codec: ['disabled'] # TODO add 'enabled' when the Rust codec is ready
2324
steps:
2425
- uses: actions/checkout@v4
2526

@@ -48,29 +49,27 @@ jobs:
4849
id: cache
4950
with:
5051
path: .venv
51-
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
52+
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-rust-codec-${{ matrix.rust-codec }}-${{ hashFiles('**/poetry.lock') }}
5253

5354
- name: Ensure cache is healthy
5455
if: steps.cache.outputs.cache-hit == 'true'
5556
shell: bash
5657
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
5758

5859
- name: Install dependencies
60+
if: matrix.rust-codec == 'disabled'
5961
shell: bash
6062
run: poetry install -E all
6163

64+
- name: Install dependencies with the Rust codec
65+
if: matrix.rust-codec == 'enabled'
66+
shell: bash
67+
run: poetry install -E all -E rust-codec
68+
6269
- name: Download compiled test files
6370
shell: bash
6471
run: poetry run poe pull-compiled-tests
6572

6673
- name: Execute test suite
6774
shell: bash
6875
run: poetry run poe test
69-
70-
- name: Install dependencies with the Rust codec
71-
shell: bash
72-
run: poetry install -E all -E rust-codec
73-
74-
- name: Execute test suite with the Rust codec
75-
shell: bash
76-
run: poetry run poe test

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ norecursedirs = "**/output_*"
8989
addopts = "-p no:warnings"
9090

9191
# Dev workflow tasks
92+
[tool.poe.tasks.get-local-compiled-tests]
93+
# task useful for local development. Copies the compiled test files from the compiler folder to the tests folder
94+
shell = "rm -r tests/output_* && cp -r ../python-betterproto2-compiler/tests/output_* tests"
9295

9396
[tool.poe.tasks.test]
9497
cmd = "pytest"

0 commit comments

Comments
 (0)