Skip to content

Commit

Permalink
Merge pull request #2169 from swcurran/0.8.0
Browse files Browse the repository at this point in the history
0.8.0 release
  • Loading branch information
swcurran authored Mar 15, 2023
2 parents 5445a3e + 5f7b8ec commit dab1f30
Show file tree
Hide file tree
Showing 161 changed files with 2,647 additions and 2,310 deletions.
86 changes: 71 additions & 15 deletions CHANGELOG.md

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,18 @@ s/^/- /
release (using in the GitHub UI a filter such as `is:pr is:merged sort:updated
merged:>2022-04-07`) and for each page, highlight, and copy the text
of only the list of PRs on the page to use in the following step.
- For each page, run the command `sed -e :a -e '$!N;s/\n#/ #/;ta' -e 'P;D' <<EOF
| sed -f changelog.sed`, paste in the copied text and then type `EOF`.
- For each page, run the command
`sed -e :a -e '$!N;s/\n#/ #/;ta' -e 'P;D' <<EOF | sed -f changelog.sed`,
paste in the copied text and then type `EOF`.
Redirect the output to a file, appending each page of output to the file.
- The first `sed` command in the pipeline merges the PR title and PR number
plus author lines onto a single line. The commands in the `changelog.sed`
file just clean up the data, removing unwanted lines, etc.
- At the end of that process, you should have a list of all of the PRs in a form you can
use in the CHANGELOG.md file.
- To verify you have right contents, you can do a `wc` of the file and there
- To verify you have right number of PRs, you can do a `wc` of the file and there
should be one line per PR. You should scan the file as well, looking for
anomalies. It's a pretty ugly process.
anomalies, such as missing `\`s before `#` characters. It's a pretty ugly process.
- Using a `curl` command and the GitHub API is probably a much better and more
robust way to do this, but this was quick and dirty...

Expand Down Expand Up @@ -96,9 +97,11 @@ Once you have the list of PRs:
please update this document to note where the tag can be found.

7. Double check all of these steps above, and then submit a PR from the branch.
Add this new PR to CHANGELOG.md so that all the PRs are included.
If there are still further changes to be merged, mark the PR as "Draft",
repeat **ALL** of the steps again, and then mark this PR as ready and then
wait until it is merged.
wait until it is merged. It's embarrassing when you have to do a whole new
release just becaused you missed something silly...I know!

8. Immediately after it is merged, create a new GitHub tag representing the
version. The tag name and title of the release should be the same as the
Expand Down
11 changes: 5 additions & 6 deletions aries_cloudagent/commands/tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,11 @@ async def test_upgrade_x_same_version(self):
)
),
):
with self.assertRaises(UpgradeError):
await test_module.upgrade(
{
"upgrade.config_path": "./aries_cloudagent/commands/default_version_upgrade_config.yml",
}
)
await test_module.upgrade(
{
"upgrade.config_path": "./aries_cloudagent/commands/default_version_upgrade_config.yml",
}
)

async def test_upgrade_missing_from_version(self):
with async_mock.patch.object(
Expand Down
108 changes: 55 additions & 53 deletions aries_cloudagent/commands/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,66 +137,68 @@ async def upgrade(settings: dict):
"the config."
)
if upgrade_from_version == upgrade_to_version:
raise UpgradeError(
print(
f"Version {upgrade_from_version} to upgrade from and "
f"current version to upgrade to {upgrade_to_version} "
"are same."
)
if upgrade_from_version not in sorted_versions_found_in_config:
raise UpgradeError(
f"No upgrade configuration found for {upgrade_from_version}"
else:
if upgrade_from_version not in sorted_versions_found_in_config:
raise UpgradeError(
f"No upgrade configuration found for {upgrade_from_version}"
)
upgrade_from_version_index = sorted_versions_found_in_config.index(
upgrade_from_version
)
upgrade_from_version_index = sorted_versions_found_in_config.index(
upgrade_from_version
)
for config_from_version in sorted_versions_found_in_config[
upgrade_from_version_index:
]:
print(f"Running upgrade process for {config_from_version}")
upgrade_config = upgrade_configs.get(config_from_version)
# Step 1 re-saving all BaseRecord and BaseExchangeRecord
if "resave_records" in upgrade_config:
resave_record_paths = upgrade_config.get("resave_records")
for record_path in resave_record_paths:
try:
record_type = ClassLoader.load_class(record_path)
except ClassNotFoundError as err:
raise UpgradeError(
f"Unknown Record type {record_path}"
) from err
if not issubclass(record_type, BaseRecord):
raise UpgradeError(
f"Only BaseRecord can be resaved, found: {str(record_type)}"
)
async with root_profile.session() as session:
all_records = await record_type.query(session)
for record in all_records:
await record.save(
session,
reason="re-saving record during ACA-Py upgrade process",
)
if len(all_records) == 0:
print(f"No records of {str(record_type)} found")
else:
print(
f"All records of {str(record_type)} successfully re-saved"
for config_from_version in sorted_versions_found_in_config[
upgrade_from_version_index:
]:
print(f"Running upgrade process for {config_from_version}")
upgrade_config = upgrade_configs.get(config_from_version)
# Step 1 re-saving all BaseRecord and BaseExchangeRecord
if "resave_records" in upgrade_config:
resave_record_paths = upgrade_config.get("resave_records")
for record_path in resave_record_paths:
try:
rec_type = ClassLoader.load_class(record_path)
except ClassNotFoundError as err:
raise UpgradeError(
f"Unknown Record type {record_path}"
) from err
if not issubclass(rec_type, BaseRecord):
raise UpgradeError(
f"Only BaseRecord can be resaved, found: {str(rec_type)}"
)
# Step 2 Update existing records, if required
if (
"update_existing_records" in upgrade_config
and upgrade_config.get("update_existing_records") is True
):
update_existing_recs_callable = (
version_upgrade_config_inst.get_update_existing_func(
config_from_version
)
)
if not update_existing_recs_callable:
raise UpgradeError(
"No update_existing_records function "
f"specified for {config_from_version}"
async with root_profile.session() as session:
all_records = await rec_type.query(session)
for record in all_records:
await record.save(
session,
reason="re-saving record during the upgrade process",
)
if len(all_records) == 0:
print(f"No records of {str(rec_type)} found")
else:
print(
f"All recs of {str(rec_type)} successfully re-saved"
)
# Step 2 Update existing records, if required
if (
"update_existing_records" in upgrade_config
and upgrade_config.get("update_existing_records") is True
):
update_existing_recs_callable = (
version_upgrade_config_inst.get_update_existing_func(
config_from_version
)
)
await update_existing_recs_callable(root_profile)
if not update_existing_recs_callable:
raise UpgradeError(
"No update_existing_records function "
f"specified for {config_from_version}"
)
await update_existing_recs_callable(root_profile)

# Update storage version
async with root_profile.session() as session:
storage = session.inject(BaseStorage)
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Library version information."""

__version__ = "0.8.0-rc0"
__version__ = "0.8.0"
RECORD_TYPE_ACAPY_VERSION = "acapy_version"
12 changes: 5 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ updated, as noted below.
### Before you start

To test generate and view the RTD documentation locally, you must install [Sphinx](https://www.sphinx-doc.org/en/master/) and the
[Sphinx RTD theme](https://pypi.org/project/sphinx-rtd-theme/). Both can be installed from PyPi using pip. For example:

``` bash
pip install -U sphinx
pip install -U sphinx-rtd-theme
```
[Sphinx RTD theme](https://pypi.org/project/sphinx-rtd-theme/). Follow the instructions on the respective pages to install
and verify the installation on your system.

### Generate Module Files

Expand Down Expand Up @@ -54,6 +50,8 @@ Once generated, go into the `_build` folder and open `index.html` in a browser.

This is the hard part; looking for errors in docstrings added by devs. Some tips:

- missing imports (`No module named 'async_timeout'`) can be solved by adding the module to the
list of `autodoc_mock_imports` in the [conf.py](./conf.py) file.
- Ignore any errors in .md files
- Ignore the warnings about including `docs/README.md`
- Ignore an dist-package errors
Expand All @@ -78,4 +76,4 @@ You will see there are already several instances of that, notably "connections"
The RTD documentation is **not** currently auto-generated, so a manual re-generation of the documentation
is still required.

> TODO: Automate this when new tags are applied to the repository.
> TODO: Automate this when new tags are applied to the repository.
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"qrcode",
"rlp",
"nest_asyncio",
"marshmallow",
"typing_extensions",
"async_timeout",
]

# "aries_cloudagent.tests.test_conductor",
Expand Down
32 changes: 17 additions & 15 deletions docs/generated/aries_cloudagent.admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ aries\_cloudagent.admin package
===============================

.. automodule:: aries_cloudagent.admin
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

Submodules
----------
Expand All @@ -13,30 +13,32 @@ aries\_cloudagent.admin.base\_server module
-------------------------------------------

.. automodule:: aries_cloudagent.admin.base_server
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

aries\_cloudagent.admin.error module
------------------------------------

.. automodule:: aries_cloudagent.admin.error
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

aries\_cloudagent.admin.request\_context module
-----------------------------------------------

.. automodule:: aries_cloudagent.admin.request_context
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

aries\_cloudagent.admin.server module
-------------------------------------

.. automodule:: aries_cloudagent.admin.server
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:


20 changes: 11 additions & 9 deletions docs/generated/aries_cloudagent.askar.didcomm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ aries\_cloudagent.askar.didcomm package
=======================================

.. automodule:: aries_cloudagent.askar.didcomm
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

Submodules
----------
Expand All @@ -13,14 +13,16 @@ aries\_cloudagent.askar.didcomm.v1 module
-----------------------------------------

.. automodule:: aries_cloudagent.askar.didcomm.v1
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

aries\_cloudagent.askar.didcomm.v2 module
-----------------------------------------

.. automodule:: aries_cloudagent.askar.didcomm.v2
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:


23 changes: 12 additions & 11 deletions docs/generated/aries_cloudagent.askar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ aries\_cloudagent.askar package
===============================

.. automodule:: aries_cloudagent.askar
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 4

aries_cloudagent.askar.didcomm
aries_cloudagent.askar.didcomm

Submodules
----------
Expand All @@ -21,14 +20,16 @@ aries\_cloudagent.askar.profile module
--------------------------------------

.. automodule:: aries_cloudagent.askar.profile
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

aries\_cloudagent.askar.store module
------------------------------------

.. automodule:: aries_cloudagent.askar.store
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:


20 changes: 11 additions & 9 deletions docs/generated/aries_cloudagent.cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ aries\_cloudagent.cache package
===============================

.. automodule:: aries_cloudagent.cache
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

Submodules
----------
Expand All @@ -13,14 +13,16 @@ aries\_cloudagent.cache.base module
-----------------------------------

.. automodule:: aries_cloudagent.cache.base
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

aries\_cloudagent.cache.in\_memory module
-----------------------------------------

.. automodule:: aries_cloudagent.cache.in_memory
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:


Loading

0 comments on commit dab1f30

Please sign in to comment.