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 Python typings #139

Merged
merged 9 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
104 changes: 0 additions & 104 deletions .github/workflows/maturin.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,17 @@ jobs:
run: python examples/server_api_simple.py
working-directory: ferveo-python

- name: Install pytest
run: pip install pytest
- name: Install pip dependencies
run: pip install pytest mypy

- name: Run pytest
run: pytest
working-directory: ferveo-python

- name: Run mypy.stubtest
run: python -m mypy.stubtest ferveo
working-directory: ferveo-python

codecov:
runs-on: ubuntu-latest
needs: [ test ]
Expand Down
11 changes: 11 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.10"
8 changes: 0 additions & 8 deletions ferveo-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ publish = false

[lib]
crate-type = ["cdylib"]
name = "ferveo_py"

[features]
extension-module = ["pyo3/extension-module"]
Expand All @@ -18,12 +17,5 @@ default = ["extension-module"]
ferveo = { package = "ferveo-pre-release", path = "../ferveo", features = ["bindings-python"] }
pyo3 = "0.18.2"

# We avoid declaring "pyo3/extension-module" in `dependencies` since it causes compile-time issues:
# https://github.com/PyO3/pyo3/issues/340
# Instead, we expose it in certain cases:
# https://github.com/PyO3/maturin/issues/325
KPrasch marked this conversation as resolved.
Show resolved Hide resolved
[tool.maturin]
features = ["pyo3/extension-module"]

[build-dependencies]
pyo3-build-config = "*"
11 changes: 11 additions & 0 deletions ferveo-python/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.10"
7 changes: 0 additions & 7 deletions ferveo-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,3 @@
## Build

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

## Publish

```bash
maturin build --release
maturin publish
```
2 changes: 1 addition & 1 deletion ferveo-python/examples/exception.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ferveo_py import (
from ferveo import (
Keypair,
Validator,
Dkg,
Expand Down
2 changes: 1 addition & 1 deletion ferveo-python/examples/server_api_precomputed.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ferveo_py import (
from ferveo import (
encrypt,
combine_decryption_shares_precomputed,
decrypt_with_shared_secret,
Expand Down
2 changes: 1 addition & 1 deletion ferveo-python/examples/server_api_simple.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ferveo_py import (
from ferveo import (
encrypt,
combine_decryption_shares_simple,
decrypt_with_shared_secret,
Expand Down
2 changes: 1 addition & 1 deletion ferveo-python/ferveo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .ferveo_py import (
from ._ferveo import (
encrypt,
combine_decryption_shares_simple,
combine_decryption_shares_precomputed,
Expand Down
Loading
Loading