Skip to content

Commit

Permalink
Rename python package to openmined_psi (#200)
Browse files Browse the repository at this point in the history
* fix

* update
  • Loading branch information
s0l0ist authored Sep 30, 2024
1 parent b4d585d commit 4ea4d66
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
golang-version: ['1.21']
golang-version: ['1.23']
steps:
- name: Set up Golang ${{ matrix.golang-version }}
uses: actions/setup-go@v5
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Chore:
- Minor fixes that the cpp linter was reporting and a fix in the python cpp
bindings to use absl::MakeSpan instead of passing a std::vector.

Breaking:

- The **python** package has been renamed to `openmined_psi` to comply with the
bazel toolchain naming conventions.

# Version 2.0.2

Chore:
Expand Down
4 changes: 2 additions & 2 deletions private_set_intersection/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ py_package(
# This rule builds the wheel, but we need to change the name of the .whl before
# we publish to PyPI using a separate publish script outside of bazel. The
# output that gets generated looks like the following:
# openmined.psi-1.0.0-INTERPRETER-ABI-PLATFORM.whl
# openmined_psi-1.0.0-INTERPRETER-ABI-PLATFORM.whl
#
# This rule also bundles protobuf, but it resides in an incorrect directy and
# there doesn't seem to be a way to prevent it getting added to the wheel.
Expand All @@ -188,7 +188,7 @@ py_wheel(
"Topic :: Security :: Cryptography",
],
description_file = "DESCRIPTION.md",
distribution = "openmined.psi",
distribution = "openmined_psi",
extra_distinfo_files = {
"//:LICENSE": "LICENSE",
"//private_set_intersection/python:README.md": "README",
Expand Down
16 changes: 12 additions & 4 deletions private_set_intersection/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
Private Set Intersection protocol based on ECDH, Bloom Filters, and Golomb
Compressed Sets.

## Tests
## Installation

```bash
pip install openmined_psi
```

## Developing

### Tests

```bash
bazel test --test_output=all //private_set_intersection/python:test_3_8
Expand All @@ -13,7 +21,7 @@ bazel test --test_output=all //private_set_intersection/python:test_3_11
...
```

## Benchmarks
### Benchmarks

```bash
bazel run -c opt --test_output=all //private_set_intersection/python:benchmark_3_8
Expand All @@ -23,7 +31,7 @@ bazel run -c opt --test_output=all //private_set_intersection/python:benchmark_3
...
```

## Updating dependencies
### Updating dependencies

Add any dependencies to `requirements.in`, then run:

Expand All @@ -35,7 +43,7 @@ bazel run //private_set_intersection/python/requirements:requirements_3_11.updat
...
```

## Publishing
### Publishing

We first build the wheel

Expand Down
3 changes: 1 addition & 2 deletions private_set_intersection/python/rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ def main():
interpreter_version = tags.interpreter_version()
abi_tag = interpreter_name + interpreter_version

# openmined.psi-1.0.0-INTERPRETER-ABI-PLATFORM-ARCH.whl
# openmined_psi-1.0.0-INTERPRETER-ABI-PLATFORM-ARCH.whl
# INTERPRETER and ABI should be the same value
outfile = re.sub(r"INTERPRETER", abi_tag, inputfile)
outfile = re.sub(r"ABI", abi_tag, outfile)
outfile = re.sub(r"openmined_psi", "openmined.psi", outfile)
system = platform.system()

# We rename the wheel depending on the version of python and glibc
Expand Down

0 comments on commit 4ea4d66

Please sign in to comment.