Skip to content

Commit

Permalink
Merge pull request #166 from nucypher/chores
Browse files Browse the repository at this point in the history
Assorted chores
  • Loading branch information
piotr-roslaniec authored Jan 18, 2024
2 parents 13d9d26 + 87c5f34 commit 7350d91
Show file tree
Hide file tree
Showing 36 changed files with 228 additions and 403 deletions.
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

0 comments on commit 7350d91

Please sign in to comment.