Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 79ee58c

Browse files
authored
Merge branch 'main' into dependabot/bundler/docs/nokogiri-1.12.5
2 parents 0442a0d + d1abe09 commit 79ee58c

21 files changed

+784
-508
lines changed

.github/workflows/publish-release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Upload Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
env:
8+
POETRY_VERSION: 1.1.7
9+
PYTHON_VERSION: 3.7
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ env.PYTHON_VERSION }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ env.PYTHON_VERSION }}
20+
- name: Cache poetry installation
21+
id: cache-poetry
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.local
25+
key: poetry-${{ runner.os }}-${{ env.POETRY_VERSION }}-${{ hashFiles('.github/workflows/pubilsh-release.yml') }}
26+
- name: Install poetry
27+
if: steps.cache-poetry.outputs.cache-hit != 'true'
28+
run: |
29+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - --version=${{ env.POETRY_VERSION }}
30+
- name: Setup poetry environment
31+
id: setup-poetry-env
32+
run: |
33+
poetry env use $(which python)
34+
echo "::set-output name=poetry-env::$(poetry env info --path)"
35+
- name: Cache poetry virtual environment
36+
id: cache-poetry-venv
37+
uses: actions/cache@v2
38+
with:
39+
path: ${{ steps.setup-poetry-env.outputs.poetry-env }}
40+
key: poetry-env-${{ runner.os }}-${{ env.POETRY_VERSION }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('.github/workflows/publish-release.yml') }}
41+
- name: Install dependencies
42+
if: steps.cache-poetry-venv.outputs.cache-hit != 'true'
43+
run: |
44+
poetry install
45+
- name: Sanity check (run tests)
46+
run: |
47+
poetry run pytest
48+
- name: Build package
49+
run: |
50+
poetry build
51+
- name: Publish package
52+
env:
53+
POETRY_PYPI_TOKEN_PYPI: ${{secrets.pypi_upload}}
54+
run: |
55+
poetry publish

.github/workflows/publish_release.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ Where appropriate, PRs that impact the end-user and developer demos in the repo
1919
should include updates or extensions to those demos to cover the new
2020
capabilities.
2121

22-
All contributors retain the original copyright to their stuff, but by
23-
contributing to this project, you grant a world-wide, royalty-free, perpetual,
24-
irrevocable, non-exclusive, transferable license to all users **under the terms
25-
of the [license](./LICENSE) under which this project is distributed.**
22+
Contributions are made pursuant to the Developer's Certificate of Origin, available at [https://developercertificate.org](https://developercertificate.org), and licensed under the Apache License, version 2.0 (Apache-2.0).
2623

2724
[tutorial]: https://help.github.com/articles/set-up-git
2825
[prs]: https://help.github.com/articles/using-pull-requests/

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
Static Agent Library
2-
====================
1+
# Static Agent Library
2+
3+
[![pypi release](https://img.shields.io/pypi/v/aries-staticagent)](https://pypi.org/project/aries-staticagent/)
4+
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
5+
[![Tests](https://github.com/hyperledger/aries-staticagent-python/actions/workflows/tests.yml/badge.svg)](https://github.com/hyperledger/aries-staticagent-python/actions/workflows/tests.yml)
6+
37

48
This repo contains an example Aries Static Agent Library in Python.
59

aries_staticagent/__init__.py

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,40 @@
22
"""
33

44
from .connection import Connection, Keys, Target, MessageDeliveryError
5-
from .module import Module
6-
from .message import Message
5+
from .module import Module, ModuleRouter
6+
from .message import (
7+
Message,
8+
MsgType,
9+
MsgVersion,
10+
ProtocolIdentifier,
11+
InvalidProtocolIdentifier,
12+
InvalidType,
13+
)
14+
from .dispatcher import Dispatcher, HandlerDispatcher, QueueDispatcher
15+
from .dispatcher.queue_dispatcher import MsgQueue
16+
from . import operators
717

818
from . import crypto
919

1020
__all__ = [
1121
"Connection",
22+
"Dispatcher",
23+
"HandlerDispatcher",
24+
"InvalidProtocolIdentifier",
25+
"InvalidType",
1226
"Keys",
13-
"Target",
27+
"Message",
1428
"MessageDeliveryError",
1529
"Module",
16-
"Message",
30+
"ModuleRouter",
31+
"MsgQueue",
32+
"MsgType",
33+
"MsgVersion",
34+
"ProtocolIdentifier",
35+
"QueueDispatcher",
36+
"Target",
1737
"keygen",
38+
"operators",
1839
]
1940

2041

@@ -33,12 +54,8 @@ def keygen():
3354
did = crypto.bytes_to_b58(did_bytes)
3455

3556
print(
36-
"Static Agent Connection info for full agent:\n\tDID: {}\n\tVK: {}\n".format(
37-
did, my_vk
38-
)
57+
f"Static Agent Connection info for full agent:\n\tDID: {did}\n\tVK: {my_vk}\n"
3958
)
4059
print(
41-
"Static Agent Connection info for static agent:\n\tVK: {}\n\tSK: {}".format(
42-
my_vk, my_sk
43-
)
60+
f"Static Agent Connection info for static agent:\n\tVK: {my_vk}\n\tSK: {my_sk}"
4461
)

0 commit comments

Comments
 (0)