Skip to content

Commit bfc0f04

Browse files
authored
💥✨ Regenerate cloudcontroller with up-to-date python (asyncio) openapi generator (#114)
* ✨ use default python generator from openapi-generator * 🎨 add isort step to generated output, and comment out patching * revise version tag * regenerate api and models with default python openapi-generator * ✨ new files generated with default python openapi-generator * 🎨 isort * 🎨 resolve todo's * ➕ add `python-dateutil` dependency * ➖✨ remove deprecated `uplink` dependency * ⬆️ bump pydantic to 2.4 * 🎨 rename imports in tests * 🔥✨ remove custom converters for deprecated library, and associated test * fix reference to pydantic ValidationError * 🎨 replace .dict with .modul_dump * 🎨 replace uplink.AiohttpClient with httpx.AsyncClient * 🎨 * ➕ add `httpx` dependency * ➕ add `urllib3` dependency * ➕ add `isort` dependency * 🎨 isort * 🎨 black formatting * 🎨 correct pydantic v2 dump_json todo fix * ➕ add autoflake dependency * 🎨 remove unused imports with autoflake, and add steps to script to postprocess generated client with autoflake, black, and isort * 🎨 remove extra_service_params * set library to `asyncio` in additionalProperties * ✨ regenerate client with `--library asyncio` * 🎨 add missing imports * ✨ extend ApiClient, configure base_url + api_key, and initialize API modules * 🎨 add AcaPyClient to imports * 🎨 add admin_insecure flag again, and raise exception if api_key is missing * 🔥 * ✅ update tests for models that now expect StrictBool for input * ⬆️ update `black` to 3.9 * ⬆️ bump `anyio` * ⬆️ update `typing-extensions` to 4.8 * ➖ remove httpx dependency * Update lint job * update python image to 3.9 * 🎨 add isort to linting job * version bump * add custom models for WalletRecordWithGroups and WalletListWithGroups * 🎨 add implementation for get wallets with a group_id, to remove the overriding of this Api module in CloudApi * version bump * fix incorrect max value (was -1, should be 18446744073709551615) * fix deprecation warning * version bump * 🎨 add method to convert boolean query parameters to their string equivalents before http request is sent * version bump * 🎨 move custom boolean conversion to `sanitize_for_serialization` method * version bump * 🎨 remove inheritance of ApiClient and configure instance separately * version bump * 0.9.0-beta1 * 🎨 update url * 🎨 re-add async context management * 0.9.0-beta2 * 🎨 configure base_url in configuration before instantiating ApiClient - avoids shared state with multiple AcaPyClients! * 🎨 modify DID to have enums for select fields * ✅ write tests to assert changes to DID model * 🎨 deduplicate regex patterns * 0.9.0-beta3 * 🎨 * 🎨 publish_rev_reg_def can return a `Union[RevRegResult, TxnOrRevRegResult]` * 0.9.0-beta4 * fix: var_json field in AttachDecoratorData can either be a dict, or a list of dict * ✅ create test for the custom type in ACA-Py requiring a manual change to AttachDecoratorData * only type "CL" is accepted for CredentialDefinition * ✅ write tests to assert that only type "CL" is accepted for CredentialDefinition * fix: context and issuer fields in Credential can either be a str or a dict * fix: some fields in Filter schema are a "StrOrNumberField" - custom type defined in ACA-py * ✅ write tests to assert manual changes to Filter model to accommodate custom type in ACA-Py * 🎨 services can be a str or a Dict * 🎨 fix: recipient_keys and service_endpoint are optional in ACA-Py 0.9.0. This is fixed and can be removed from 0.10.0 onwards * 🎨 modify `sanitize_for_serialization` to only cast query_param bools to string * 0.9.0-beta5 * 🎨 Special handling for Union[RevRegResult, TxnOrRevRegResult] response from publish_rev_reg_def. Fixed and no longer necessary in ACA-Py 0.10.1 * 0.9.0-beta6 * 🎨 add imports for custom models: WalletListWithGroups and WalletRecordWithGroups * 0.9.0-beta7 * 🎨 remove strict model requirement for `doc` * 🎨 remove override that was used if doc is a BaseModel * 0.9.0-beta8 * 🎨 * 🎨 WalletListWithGroups should inherit from WalletList * 0.9.0-beta9 * 🎨 override `from_dict` method for our custom models: WalletRecordWithGroups and WalletListWithGroups * 0.9.0-beta10 * set version * update python version to 3.9.18 * 📄 Update contact info * 0.9.0-beta11 * 🎨 define DEFAULT_PYDANTIC_MODEL_CONFIG to deduplicate model config. Adds `defer_build: True` * 🎨 * 🎨 deduplicate * 🎨 set `validate_assignment` to False * 0.9.0-beta12 * 📌 pin anyio to >= 3.7.1, as fastapi doesn't support v4 yet * 🎨 * include fetching spec in generate-client.sh * 🎨 * rename config to template (env var to be filled by generate-client script) * 🎨 read ACA_PY_VERSION as input and set as env var to generate config from template * 🎨 unused import * config filled from template * updated spec * 🎨 move custom _WithGroups models to own files * 🎨 regenerate with postprocessing and ACA-Py versioning * 🎨 regenerate with postprocessing and ACA-Py versioning * 🎨 print version being generated * 🎨 define script for postprocessing the generated client * 🎨 moved custom models * 🎨 import * 🎨✨ additional postprocessing to modify faults in autogeneration * 🎨 re-add import of regex patterns * 0.9.0-beta13 * 🎨 define and re-use default_ssl_context * 🎨 Update description * ✨ revised 0.9.0 release * 🎨 Update README with simplified steps * 🎨 Update README
1 parent e761894 commit bfc0f04

File tree

655 files changed

+63306
-17635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

655 files changed

+63306
-17635
lines changed

.github/workflows/python-publish.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install Python 3
1616
uses: actions/setup-python@v4
1717
with:
18-
python-version: 3.8
18+
python-version: 3.9
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
@@ -28,10 +28,22 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v4
31-
- name: Black Python linting
32-
uses: lgeiger/[email protected]
31+
- name: Set up Python 3.9
32+
uses: actions/setup-python@v4
3333
with:
34-
args: . --check
34+
python-version: 3.9
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install \
39+
isort~=5.12.0 \
40+
black~=23.9.1
41+
- name: Check import style with isort
42+
run: |
43+
isort . --check --profile black --diff
44+
- name: Check code style with Black
45+
run: |
46+
black . --check --diff
3547
deploy:
3648
# if: ${{ startsWith(github.ref, 'refs/tags/') && github.event.base_ref == 'refs/heads/main' }}
3749
runs-on: ubuntu-latest

.github/workflows/python-test-publish.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install Python 3
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: 3.8
24+
python-version: 3.9
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
@@ -34,10 +34,22 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- uses: actions/checkout@v4
37-
- name: Black Python linting
38-
uses: lgeiger/[email protected]
37+
- name: Set up Python 3.9
38+
uses: actions/setup-python@v4
3939
with:
40-
args: . --check
40+
python-version: 3.9
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install \
45+
isort~=5.12.0 \
46+
black~=23.9.1
47+
- name: Check import style with isort
48+
run: |
49+
isort . --check --profile black --diff
50+
- name: Check code style with Black
51+
run: |
52+
black . --check --diff
4153
4254
deploy:
4355
runs-on: ubuntu-latest

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.9.17
1+
3.9.18

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<a href="#license">License</a>
3838
</p>
3939

40-
Aries Cloud Controller Python is a client library written in Python for interacting with an [Aries Cloud Agent Python](https://github.com/hyperledger/aries-cloudagent-python) instance. It is generated based on the OpenAPI definition provided by ACA-Py, giving a fully-typed rich API for interacting the cloud agent.
40+
The Aries CloudController is a client library, written in Python, for interacting with an [Aries Cloud Agent](https://github.com/hyperledger/aries-cloudagent-python) instance. It is generated based on the OpenAPI definition provided by ACA-Py, giving a fully-typed, rich API for interacting with the cloud agent.
4141

4242
Each Cloud Controller version maps to a specific ACA-Py version, which is outlined in the table below. Although not strictly adhered to in the past, a new ACA-Py version will result in a new Minor version bump for the Cloud Controller, as there are often times breaking changes.
4343

SECURITY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Yoma Security Policy
1+
# Security Policy
22

33
## Reporting a Security Bug
44

5-
If you think you have discovered a security issue in any of the Yoma projects, we'd love to
5+
If you think you have discovered a security issue in any of our projects, we'd love to
66
hear from you. We will take all security bugs seriously and if confirmed upon investigation we will
77
patch it within a reasonable amount of time and release a public security announcement discussing the
88
bug and credit the discoverer.
@@ -13,7 +13,7 @@ Security bugs can be reported via email. The process is as follows:
1313

1414
(email) Content: Description of the bug + how to reproduce the bug
1515

16-
Email Yoma at: [tech at yoma dot world](mailto:[email protected]).
16+
Email us at: [info at didx.co.za](mailto:[email protected])
1717

1818
*Note. It is not necessary to include the type of bug if you are not sure how to classify it.*
1919
*A detailed description will be adequate.*

0 commit comments

Comments
 (0)