Skip to content

Commit d5c15a4

Browse files
committed
chore: Merge branch 'release/v4.2.0'
2 parents d39446f + 07ad236 commit d5c15a4

36 files changed

Lines changed: 1460 additions & 1066 deletions

.github/workflows/ci.yml

Lines changed: 22 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Build and test
44
on: [push]
55

66
jobs:
7-
build:
7+
lint:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v3
@@ -14,112 +14,58 @@ jobs:
1414
- name: Install dependencies
1515
run: |
1616
python -m pip install --upgrade pip
17-
pip install -r requirements.txt
1817
pip install flake8
1918
- name: Linter
2019
run: |
2120
flake8 --max-line-length=100 --ignore E501
22-
- name: Build package
23-
run: |
24-
python -m build
25-
- uses: actions/upload-artifact@v3
26-
with:
27-
name: cloudproof_py_dist
28-
path: ./dist
29-
retention-days: 1
3021
31-
test:
32-
services:
33-
kms:
34-
image: ghcr.io/cosmian/kms:4.5.0
35-
env:
36-
COSMIAN_SERVER_URL: http://localhost:9998
37-
KMS_PUBLIC_PATH: /tmp
38-
KMS_PRIVATE_PATH: /tmp
39-
KMS_SHARED_PATH: /tmp
40-
ports:
41-
- 9998:9998
42-
findex_cloud:
43-
image: ghcr.io/cosmian/findex_cloud:0.1.0
44-
ports:
45-
- 8080:8080
46-
runs-on: ubuntu-latest
47-
needs: build
48-
steps:
49-
- uses: actions/checkout@v3
50-
- uses: actions/setup-python@v3
51-
with:
52-
python-version: 3.8
53-
- name: Download artifact
54-
uses: actions/download-artifact@v3
55-
with:
56-
name: cloudproof_py_dist
57-
- name: Install dependencies
58-
run: |
59-
python -m pip install --upgrade pip
60-
pip install mypy types-termcolor>=1.1 types_redis>=4.3 requests>=2.28 types-requests>=2.28
61-
scripts/ci_install_pyo3_builds.sh
62-
pip install cloudproof_py*.whl
63-
- name: Type-check
64-
run: |
65-
mypy src/cloudproof_py/anonymization/
66-
mypy src/cloudproof_py/cover_crypt/
67-
mypy src/cloudproof_py/findex/
68-
mypy src/cloudproof_py/fpe/
69-
mypy tests/
70-
mypy examples/cli_demo
71-
mypy examples/findex_upsert_search
72-
mypy examples/cover_crypt
73-
- name: Run tests
74-
run: |
75-
python tests/non_regression_cover_crypt.py --test --write
76-
python tests/findex_cloud.py
77-
python -m unittest tests/test*.py
78-
- name: Upload non-regression test vectors
79-
uses: actions/upload-artifact@v3
80-
with:
81-
name: cloudproof_python
82-
path: |
83-
./tests/data/export/non_regression_vector.json
84-
./tests/data/export/sqlite.db
85-
retention-days: 1
86-
if-no-files-found: error
22+
cloudproof_python:
23+
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_python.yml@develop
24+
with:
25+
branch: ${{ github.head_ref }}
26+
target: x86_64-unknown-linux-gnu
27+
kms-version: 4.10.0
28+
findex-cloud-version: 0.3.1
29+
copy_fresh_build: false
30+
regression_files: |
31+
./tests/data/export/non_regression_vector.json
32+
./tests/data/export/sqlite.db
8733
8834
cloudproof_java:
89-
needs: test
35+
needs: cloudproof_python
9036
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_java_in_docker.yml@develop
9137
with:
92-
branch: v6.0.0
38+
branch: develop
9339
target: x86_64-unknown-linux-gnu
9440
extension: so
9541
destination: linux-x86-64
9642
os: ubuntu-20.04
97-
kms-version: 4.5.0
98-
findex-cloud-version: 0.1.0
43+
kms-version: 4.10.0
44+
findex-cloud-version: 0.3.1
9945
copy_fresh_build: false
10046
copy_regression_files: |
10147
cp ./cloudproof_python/non_regression_vector.json src/test/resources/cover_crypt/non_regression/python_non_regression_vector.json
10248
cp ./cloudproof_python/sqlite.db src/test/resources/findex/non_regression/python_sqlite.db
10349
10450
cloudproof_js:
105-
needs: test
51+
needs: cloudproof_python
10652
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_js.yml@develop
10753
with:
10854
branch: develop
10955
target: wasm32-unknown-unknown
110-
kms-version: 4.5.0
111-
findex-cloud-version: 0.1.0
56+
kms-version: 4.10.0
57+
findex-cloud-version: 0.3.1
11258
copy_fresh_build: false
11359
copy_regression_files: |
11460
cp ./cloudproof_python/non_regression_vector.json tests/data/cover_crypt/non_regression/python_non_regression_vector.json
11561
cp ./cloudproof_python/sqlite.db tests/data/findex/non_regression/python_sqlite.db
11662
11763
cloudproof_flutter:
11864
needs:
119-
- test
65+
- cloudproof_python
12066
uses: Cosmian/reusable_workflows/.github/workflows/cloudproof_flutter.yml@develop
12167
with:
122-
branch: v7.0.0
68+
branch: develop
12369
target: x86_64-unknown-linux-gnu
12470
extension: so
12571
copy_fresh_build: false
@@ -129,6 +75,7 @@ jobs:
12975
13076
cleanup:
13177
needs:
78+
- lint
13279
- cloudproof_flutter
13380
- cloudproof_java
13481
- cloudproof_js

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,6 @@ docs/_build/
7272
# Pyenv
7373
.env/
7474
.python-version
75+
76+
# Findex test base
77+
./tests/data/export/sqlite.db

.pre-commit-config.yaml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ repos:
4545
- id: prettier
4646
types_or: [css, javascript, jsx, markdown, bash, java, sh]
4747

48+
- repo: https://github.com/asottile/reorder_python_imports
49+
rev: v3.12.0
50+
hooks:
51+
- id: reorder-python-imports
52+
args: [--py3-plus]
53+
4854
- repo: https://github.com/psf/black
4955
rev: 23.3.0
5056
hooks:
@@ -57,10 +63,36 @@ repos:
5763
args: ["--max-line-length=100", "--ignore", "E501"]
5864

5965
- repo: https://github.com/pre-commit/mirrors-mypy
60-
rev: 'v1.3.0'
66+
rev: v1.7.0
6167
hooks:
62-
- id: mypy
63-
additional_dependencies: [types_termcolor==1.1.6, types_redis==4.3.21.6, types-requests==2.28.11.15, types-urllib3==1.26.25.8]
68+
- id: mypy
69+
alias: mypy_no_demo
70+
# args: [--strict, --ignore-missing-imports]
71+
args: [--ignore-missing-imports]
72+
exclude: examples/cli_demo
73+
additional_dependencies:
74+
[
75+
types_termcolor==1.1.6,
76+
types_redis==4.3.21.6,
77+
types-requests==2.28.11.15,
78+
types-urllib3==1.26.25.8,
79+
]
80+
81+
- repo: https://github.com/pre-commit/mirrors-mypy
82+
rev: v1.7.0
83+
hooks:
84+
- id: mypy
85+
alias: mypy_no_impl_examples
86+
# args: [--strict, --ignore-missing-imports]
87+
args: [--ignore-missing-imports]
88+
exclude: examples/findex_upsert_search
89+
additional_dependencies:
90+
[
91+
types_termcolor==1.1.6,
92+
types_redis==4.3.21.6,
93+
types-requests==2.28.11.15,
94+
types-urllib3==1.26.25.8,
95+
]
6496

6597
- repo: https://github.com/igorshubovych/markdownlint-cli
6698
rev: v0.34.0
@@ -75,6 +107,12 @@ repos:
75107
--disable=MD046,
76108
]
77109

110+
- repo: https://github.com/tcort/markdown-link-check
111+
rev: v3.11.2
112+
hooks:
113+
- id: markdown-link-check
114+
args: [-q]
115+
78116
- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
79117
rev: v1.1.2
80118
hooks:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [4.2.0] - 2023-11-22
6+
7+
### Features
8+
9+
- Add policy edition example and tests ([#36])
10+
- Support findex v6
11+
512
## [4.1.0] - 2023-08-28
613

714
### Features

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Cloudproof Python Library
22

33
[![PyPI version](https://badge.fury.io/py/cloudproof_py.svg)](https://badge.fury.io/py/cloudproof_py)
4-
![Build status](https://github.com/Cosmian/cloudproof_python/actions/workflows/ci.yml/badge.svg)
4+
![Build status](https://github.com/Cosmian/cloudproof_python/actions/workflows/ci.yml/badge.svg?branch=main)
55

66
The library provides a Python API to the **Cloudproof Encryption** product of the [Cosmian Ubiquitous Encryption platform](https://cosmian.com).
77

@@ -42,7 +42,7 @@ pip install cloudproof_py
4242
```
4343

4444
Code examples are available in [./examples](./examples) to get you started.
45-
Please [check the online documentation](https://docs.cosmian.com/cloudproof_encryption/use_cases_benefits/) for more details on using the CloudProof APIs.
45+
Please [check the online documentation](https://docs.cosmian.com/) for more details on using the CloudProof APIs.
4646

4747
## Demo
4848

@@ -92,12 +92,13 @@ This library depends on [Covercrypt](https://github.com/Cosmian/cover_crypt) and
9292

9393
This table shows the minimum version correspondence between the various components.
9494

95-
| `cloudproof_py` | Covercrypt | Findex | KMS |
96-
| --------------- | ---------- | ----------- | ----- |
97-
| >=4.1.0 | 12.0.0 | 5.0.0 | 4.5.0 |
98-
| >=4.0.2 | 11.0.0 | 4.0.1 | 4.4.3 |
99-
| >=4.0.1 | 11.0.0 | 4.0.1 | 4.4.2 |
100-
| >=4.0.0 | 11.0.0 | 4.0.0,4.0.1 | 4.3.3 |
101-
| >=3.0.0 | 11.0.0 | 3.0.0 | 4.3.3 |
102-
| >=2.0.0 | 10.0.0 | 2.0.1,2.1.0 | 4.2.0 |
103-
| >=1.0.0 | 8.0.1 | 2.0.0 | - |
95+
| `cloudproof_py` | Covercrypt | Findex | KMS |
96+
| --------------- | ---------- | ----------- | ------ |
97+
| >=4.2.0 | 13.0.0 | 6.0.0 | 4.10.0 |
98+
| >=4.1.0 | 12.0.0 | 5.0.0 | 4.5.0 |
99+
| >=4.0.2 | 11.0.0 | 4.0.1 | 4.4.3 |
100+
| >=4.0.1 | 11.0.0 | 4.0.1 | 4.4.2 |
101+
| >=4.0.0 | 11.0.0 | 4.0.0,4.0.1 | 4.3.3 |
102+
| >=3.0.0 | 11.0.0 | 3.0.0 | 4.3.3 |
103+
| >=2.0.0 | 10.0.0 | 2.0.1,2.1.0 | 4.2.0 |
104+
| >=1.0.0 | 8.0.1 | 2.0.0 | - |

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
version: "3.4"
3+
services:
4+
kms:
5+
container_name: kms
6+
image: ghcr.io/cosmian/kms:4.10.0
7+
ports:
8+
- 9998:9998
9+
10+
findex_cloud:
11+
image: ghcr.io/cosmian/findex_cloud:0.3.1
12+
ports:
13+
- 8080:8080
14+
15+
redis:
16+
image: redis:latest
17+
ports:
18+
- 6379:6379

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# For the full list of built-in configuration values, see the documentation:
55
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6-
76
# -- Project information -----------------------------------------------------
87
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
98

0 commit comments

Comments
 (0)