Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bindings #72

Merged
merged 11 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
32 changes: 32 additions & 0 deletions .github/workflows/nucypher-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,38 @@ jobs:
with:
cmd: --cwd nucypher-core-wasm/examples/node test

python-test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
python:
- "3.10"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true

- name: Install nucypher-core Python package
run: pip install -e .
working-directory: nucypher-core-python

- name: Install pip dependencies
run: pip install mypy

- name: Run mypy.stubtest
run: python -m mypy.stubtest nucypher_core --allowlist stubtest-allowlist.txt
working-directory: nucypher-core-python

trigger-wheels:
runs-on: ubuntu-latest
needs: test
Expand Down
57 changes: 24 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nucypher-core-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ crate-type = ["cdylib"]
[dependencies]
pyo3 = "0.18"
nucypher-core = { path = "../nucypher-core" }
umbral-pre = { version = "0.10.0", features = ["bindings-python"] }
ferveo = { package = "ferveo-pre-release", version = "0.2.0", features = ["bindings-python"] }
umbral-pre = { version = "0.10.0", features = ["bindings-python"], git = "https://github.com/piotr-roslaniec/rust-umbral.git", rev = "fd2e16f9304b9dab85c9a8947a61d962ff136131" }
ferveo = { package = "ferveo-pre-release", features = ["bindings-python"], git = "https://github.com/nucypher/ferveo.git", rev = "0e7c5615a0660a69077e7b431dd24c5bb3d0f10d" }
derive_more = { version = "0.99", default-features = false, features = ["from", "as_ref"] }

[build-dependencies]
Expand Down
7 changes: 7 additions & 0 deletions nucypher-core-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ This repo contains the Python bindings for the [main Rust project][nucypher-core

You will need to have `setuptools-rust` installed. Then, for development you can just do `pip install -e .` as usual.

## Development

Update `nucypher-core-python/stubtest-allowlist.txt` with:
```bash
cd umbral-pre-python
python -m mypy.stubtest nucypher_core --generate-allowlist > stubtest-allowlist.txt
```

[pypi-image]: https://img.shields.io/pypi/v/nucypher-core
[pypi-link]: https://pypi.org/project/nucypher-core/
Expand Down
Loading
Loading