Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci-py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ jobs:
- name: Setup dependencies.
run: uv sync --python ${{ matrix.python-version }}

# TODO: Fix lints and re-enable
#- name: Type check with mypy
# run: uv run mypy .
- name: Type check with mypy
run: uv run mypy .

- name: Check formatting with ruff
run: uv run ruff format --check
Expand Down
26 changes: 6 additions & 20 deletions .github/workflows/ci-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,33 +53,19 @@ jobs:
sudo make install
- name: Get cargo binstall
uses: cargo-bins/cargo-binstall@main
- name: Install capnproto-rust plugin
run: cargo binstall capnpc
- name: Regenerate the Rust capnp code
run: |
capnp compile \
-orust:impl/rs/src \
--src-prefix=impl \
impl/capnp/jeff.capnp
- name: Regenerate the C++ capnp code
- uses: extractions/setup-just@v3

- name: Regenerate the capnp bindings
run: |
patch -p0 < impl/capnp/cpp_namespace.patch
capnp compile \
-oc++:impl/cpp/src \
--src-prefix=impl \
impl/capnp/jeff.capnp
patch -p0 -R < impl/capnp/cpp_namespace.patch
- name: Re-encode the test .jeff files
run: ./examples/encode_examples.sh
- name: Copy the latest capnp schema to the python package
run: cp impl/capnp/jeff.capnp impl/py/src/jeff-format/data/jeff.capnp
just update-capnp

- name: Check if the generated capnproto code is up to date
run: |
git diff --exit-code \
impl/rs/src/capnp/ \
impl/cpp/src/capnp/ \
examples/ \
impl/py/src/jeff-format/data/jeff.capnp
impl/py/src/jeff-format/capnp/jeff.capnp
if [ $? -ne 0 ]; then
echo "The capnp generated code is not up to date"
echo "Please run 'just update-capnp' and commit the changes"
Expand Down
19 changes: 9 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,24 @@ repos:
- id: ruff-format
name: ruff format
description: Format python code with `ruff`.
entry: uv run ruff format
entry: uv run ruff format impl/py
language: system
files: \.py$
pass_filenames: false
- id: ruff-check
name: ruff
description: Check python code with `ruff`.
entry: uv run ruff check --fix --exit-non-zero-on-fix
entry: uv run ruff check --fix --exit-non-zero-on-fix impl/py
language: system
files: \.py$
pass_filenames: false
- id: mypy-check
name: mypy
description: Check python code with `mypy`.
entry: uv run mypy .
language: system
files: \.py$
pass_filenames: false
# TODO: Fix lints and re-enable
#- id: mypy-check
# name: mypy
# description: Check python code with `mypy`.
# entry: uv run mypy .
# language: system
# files: \.py$
# pass_filenames: false
- id: cargo-fmt
name: cargo format
description: Format rust code with `cargo fmt`.
Expand Down
6 changes: 4 additions & 2 deletions impl/py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ classifiers = [
]

dependencies = [
# TODO: Temporarily disabled
# "pycapnp ~= 2.0.0"
"pycapnp~=2.0.0",
]

[tool.hatch.build.targets.wheel]
packages = ["src/jeff"]

[tool.uv.sources]
pycapnp = { git = "https://github.com/mlxd/pycapnp", branch = "mlxd/update_gh_actions" }

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Loading
Loading