Skip to content

Commit

Permalink
Release 1.0.0 (openwallet-foundation#567)
Browse files Browse the repository at this point in the history
* In progress updates to support aca-py v1.0.0

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Update multitenant_provider with breaking name change

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* General upgrades

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Manually update RELEASES.md

Signed-off-by: jamshale <jamiehalebc@gmail.com>

* Point aries-cloudagent dep to pip repo

Signed-off-by: jamshale <jamiehalebc@gmail.com>

---------

Signed-off-by: jamshale <jamiehalebc@gmail.com>
  • Loading branch information
jamshale authored Aug 20, 2024
1 parent 0a7bf0a commit 423efd1
Show file tree
Hide file tree
Showing 112 changed files with 11,045 additions and 13,748 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
#----------------------------------------------
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.12'
#----------------------------------------------
# Install poetry
#----------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# ----------------------------------------------
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.12'
#----------------------------------------------
# Check the latest version from plugins_global lock file
#----------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-linting-and-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
id: setup-poetry
- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.12"
cache: "poetry"
#----------------------------------------------
# Get changed files
Expand Down
26 changes: 26 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
# Plugin Release Status
## ACA-Py Release 1.0.0

| Plugin Name | Supported ACA-Py Release |
| --- | --- |
|basicmessage_storage | 1.0.0|
|connection_update | 1.0.0|
|firebase_push_notifications | 1.0.0|
|jwt_vc_json | 1.0.0|
|kafka_events | 0.12.2|
|mso_mdoc | 1.0.0|
|multitenant_provider | 1.0.0|
|oid4vci | 1.0.0|
|redis_events | 1.0.0|
|rpc | 1.0.0|

### Plugins Upgraded For ACA-Py Release 1.0.0
- basicmessage_storage
- connection_update
- firebase_push_notifications
- jwt_vc_json
- mso_mdoc
- multitenant_provider
- oid4vci
- redis_events
- rpc

## ACA-Py Release 0.12.2

| Plugin Name | Supported ACA-Py Release |
Expand Down
6 changes: 3 additions & 3 deletions basicmessage_storage/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/python-3/.devcontainer/base.Dockerfile
ARG VARIANT="3.9-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
ARG VARIANT="3.12"
FROM mcr.microsoft.com/devcontainers/python:${VARIANT}

ARG POETRY_VERSION="1.7.1"
ARG POETRY_VERSION="1.8.3"
ENV POETRY_HOME="/opt/poetry" \
POETRY_VERSION=${POETRY_VERSION}

Expand Down
21 changes: 15 additions & 6 deletions basicmessage_storage/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"VARIANT": "3.9-bullseye",
"POETRY_VERSION": "1.7.1"
"VARIANT": "3.12-bullseye",
"POETRY_VERSION": "1.8.3"
}
},
"customizations": {
Expand All @@ -21,11 +21,20 @@
"editor.defaultFormatter": null,
"editor.formatOnSave": false, // enable per language
"[python]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
},
"editor.defaultFormatter": "charliermarsh.ruff",
"ruff.organizeImports": true
},
"python.formatting.provider": "black",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.blackArgs": []
"ruff.codeAction.fixViolation": {
"enable": true
},
"ruff.fixAll": true,
"ruff.format.args": ["--config=./pyproject.toml"],
"ruff.lint.args": ["--config=./pyproject.toml"]
}
}
},
Expand Down
3 changes: 0 additions & 3 deletions basicmessage_storage/.devcontainer/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ WORKSPACE_DIR=$(pwd)

# install all ACA-Py requirements
python -m pip install --upgrade pip

# install black for formatting
pip3 install black
12 changes: 7 additions & 5 deletions basicmessage_storage/basicmessage_storage/v1_0/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Config:
"""Inner class for configuration."""

alias_generator = _alias_generator
allow_population_by_field_name = True
populate_by_name = True

@classmethod
def default(cls):
Expand All @@ -33,7 +33,7 @@ def default(cls):

def process_config_dict(config_dict: dict) -> dict:
"""Remove any keys that are not in the config class."""
_filter = BasicMessageStorageConfig.default().dict().keys()
_filter = BasicMessageStorageConfig.default().model_dump().keys()
for key, value in config_dict.items():
if key in _filter:
config_dict[key] = value
Expand All @@ -57,7 +57,7 @@ def get_config(settings: Mapping[str, Any]) -> BasicMessageStorageConfig:
tenant_plugin_config_dict = process_config_dict(tenant_plugin_config_dict)
LOGGER.debug("Parsed (global): %s", global_plugin_config_dict)
LOGGER.debug("Parsed (tenant): %s", tenant_plugin_config_dict)
default_config = BasicMessageStorageConfig.default().dict()
default_config = BasicMessageStorageConfig.default().model_dump()
LOGGER.debug("Default Config: %s", default_config)
config_dict = merge(
{}, default_config, global_plugin_config_dict, tenant_plugin_config_dict
Expand All @@ -68,6 +68,8 @@ def get_config(settings: Mapping[str, Any]) -> BasicMessageStorageConfig:
LOGGER.warning("Using default configuration")
config = BasicMessageStorageConfig.default()

LOGGER.debug("Returning config: %s", config.json(indent=2))
LOGGER.debug("Returning config(aliases): %s", config.json(by_alias=True, indent=2))
LOGGER.debug("Returning config: %s", config.model_dump_json(indent=2))
LOGGER.debug(
"Returning config(aliases): %s", config.model_dump_json(by_alias=True, indent=2)
)
return config
4 changes: 4 additions & 0 deletions basicmessage_storage/basicmessage_storage/v1_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
request_schema,
response_schema,
)
from aries_cloudagent.admin.decorators.auth import tenant_authentication
from aries_cloudagent.admin.request_context import AdminRequestContext
from aries_cloudagent.messaging.models.base import BaseModelError
from aries_cloudagent.messaging.models.openapi import OpenAPISchema
Expand Down Expand Up @@ -102,6 +103,7 @@ class BasicMessageListQueryStringSchema(OpenAPISchema):
@match_info_schema(BasicConnIdMatchInfoSchema())
@request_schema(SendMessageSchema())
@response_schema(BasicMessageModuleResponseSchema(), 200, description="")
@tenant_authentication
@error_handler
async def plugin_connections_send_message(request: web.BaseRequest):
"""Request handler for sending a basic message to a connection.
Expand Down Expand Up @@ -150,6 +152,7 @@ async def plugin_connections_send_message(request: web.BaseRequest):
)
@querystring_schema(BasicMessageListQueryStringSchema())
@response_schema(BasicMessageListSchema(), 200, description="")
@tenant_authentication
@error_handler
async def all_messages_list(request: web.BaseRequest):
"""Request handler for searching basic message records from All agents/connections.
Expand Down Expand Up @@ -193,6 +196,7 @@ async def all_messages_list(request: web.BaseRequest):
)
@match_info_schema(BasicMessageIdMatchInfoSchema())
@response_schema(DeleteResponseSchema(), 200, description="")
@tenant_authentication
@error_handler
async def delete_message(request: web.BaseRequest):
"""Request handler for searching basic message record by id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from aries_cloudagent.admin.request_context import AdminRequestContext
from aries_cloudagent.protocols.basicmessage.v1_0 import routes as base_module
from aries_cloudagent.core.in_memory.profile import InMemoryProfile

from basicmessage_storage.v1_0.models import BasicMessageRecord

Expand All @@ -15,7 +16,13 @@
class TestRoutes(IsolatedAsyncioTestCase):
async def asyncSetUp(self) -> None:
self.session_inject = {}
self.context = AdminRequestContext.test_context(self.session_inject)
self.profile = InMemoryProfile.test_profile(
settings={
"admin.admin_api_key": "admin_api_key",
"admin.admin_insecure_mode": False,
}
)
self.context = AdminRequestContext.test_context(self.session_inject, self.profile)
self.request_dict = {
"context": self.context,
"outbound_message_router": AsyncMock(),
Expand All @@ -25,6 +32,7 @@ async def asyncSetUp(self) -> None:
match_info={},
query={},
__getitem__=lambda _, k: self.request_dict[k],
headers={"x-api-key": "admin_api_key"}
)
self.test_conn_id = "connection-id"

Expand Down
4 changes: 2 additions & 2 deletions basicmessage_storage/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim AS base
FROM python:3.12-slim AS base
WORKDIR /usr/src/app

# Install and configure poetry
Expand All @@ -19,7 +19,7 @@ ARG install_flags='--with integration --extras aca-py'
RUN poetry install ${install_flags}
USER $user

FROM python:3.9-bullseye
FROM python:3.12-bullseye
WORKDIR /usr/src/app
COPY --from=base /usr/src/app/.venv /usr/src/app/.venv
ENV PATH="/usr/src/app/.venv/bin:$PATH"
Expand Down
3 changes: 3 additions & 0 deletions basicmessage_storage/docker/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ genesis-url: http://test.bcovrin.vonx.io/genesis

# Wallet
wallet-type: askar
wallet-name: basicmessage_storage
wallet-key: basicmessage_storage

log-level: info
auto-provision: true

Expand Down
2 changes: 1 addition & 1 deletion basicmessage_storage/integration/Dockerfile.test.runner
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.12-slim
WORKDIR /usr/src/app

# install poetry
Expand Down
31 changes: 2 additions & 29 deletions basicmessage_storage/integration/poetry.lock

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

4 changes: 2 additions & 2 deletions basicmessage_storage/integration/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description = ""
authors = []

[tool.poetry.dependencies]
python = "^3.9"
pytest = "^8.2.0"
python = "^3.12"
pytest = "^8.2.2"
pytest-asyncio = "~0.23.7"
requests = "^2.31.0"

Expand Down
Loading

0 comments on commit 423efd1

Please sign in to comment.