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

Assorted chores #166

Merged
merged 12 commits into from
Jan 18, 2024
Merged
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
23 changes: 21 additions & 2 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
target:
- wasm32-unknown-unknown
python:
- "3.10"
- "3.12"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
working-directory: ferveo-python

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

- name: Run pytest
run: pytest
Expand All @@ -186,6 +186,10 @@ jobs:
run: python -m mypy.stubtest ferveo
working-directory: ferveo-python

- name: Run ruff
run: ruff check ferveo
working-directory: ferveo-python

codecov:
runs-on: ubuntu-latest
needs: [ test ]
Expand All @@ -209,6 +213,21 @@ jobs:
files: lcov.info
fail_ci_if_error: true

compile-benchmarks:
# Temporarily replaces "benchmark" job. TODO: Remove this job once the "benchmark" job is fixed.
runs-on: ubuntu-latest
needs: [ test ]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- name: Compile benchmarks
run: cargo bench --no-run --no-default-features

benchmark:

# TODO: This job is failing with error:
Expand Down
58 changes: 29 additions & 29 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ members = [
"ferveo",
"ferveo-common",
"ferveo-python",
"ferveo-tdec",
"ferveo-wasm",
"subproductdomain",
"tpke",
]

[profile.bench]
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ name = "pypi"
[dev-packages]

[requires]
python_version = "3.10"
python_version = "3.12"
12 changes: 2 additions & 10 deletions ferveo-common/src/keypair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,7 @@ impl<E: Pairing> PublicKey<E> {

impl<E: Pairing> PartialOrd for PublicKey<E> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
if self.encryption_key.x() == other.encryption_key.x() {
return self
.encryption_key
.y()
.partial_cmp(&other.encryption_key.y());
}
self.encryption_key
.x()
.partial_cmp(&other.encryption_key.x())
Some(self.cmp(other))
}
}

Expand Down Expand Up @@ -102,7 +94,7 @@ pub struct Keypair<E: Pairing> {

impl<E: Pairing> PartialOrd for Keypair<E> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.decryption_key.partial_cmp(&other.decryption_key)
Some(self.cmp(other))
}
}

Expand Down
2 changes: 1 addition & 1 deletion ferveo-python/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ name = "pypi"
[dev-packages]

[requires]
python_version = "3.10"
python_version = "3.12"
Loading
Loading