Skip to content

Commit

Permalink
Merge pull request #235 from rkvst/mmwilder26/jpn_createartist_albuminfo
Browse files Browse the repository at this point in the history
Renaming Create Asset and Events Notebook
  • Loading branch information
mmwilder26 authored Jun 2, 2023
2 parents 447b58c + 5bd6432 commit dd82d11
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "2370bfb7",
"metadata": {},
"source": [
"## Create Asset and Events"
"## Create Artist and Album Release Info"
]
},
{
Expand Down Expand Up @@ -186,30 +186,30 @@
"output_type": "stream",
"text": [
"Asset {\n",
" \"identity\": \"assets/cbd21a61-c126-4c02-b525-add1a74fb802\",\n",
" \"identity\": \"assets/63b6c2ae-c8f8-4e3b-93ae-e78339f56647\",\n",
" \"behaviours\": [\n",
" \"RecordEvidence\",\n",
" \"Builtin\",\n",
" \"AssetCreator\",\n",
" \"Attachments\"\n",
" ],\n",
" \"attributes\": {\n",
" \"arc_description\": \"British Soul Singer\",\n",
" \"arc_display_name\": \"Adele Laurie Blue Adkins\",\n",
" \"arc_display_type\": \"Artists\",\n",
" \"artistid\": \"666769323\",\n",
" \"artistid\": \"973434267\",\n",
" \"genre\": \"Soul\",\n",
" \"stage_name\": \"Adele\",\n",
" \"arc_description\": \"British Soul Singer\",\n",
" \"arc_display_name\": \"Adele Laurie Blue Adkins\"\n",
" \"stage_name\": \"Adele\"\n",
" },\n",
" \"confirmation_status\": \"CONFIRMED\",\n",
" \"tracked\": \"TRACKED\",\n",
" \"owner\": \"0xe889E67FdBa658C6f27ccBDa98D9d1B5500Dbbce\",\n",
" \"at_time\": \"2023-01-16T11:50:50Z\",\n",
" \"owner\": \"0x5284e740A744F075E402f7fB0c4485532ddf4Af8\",\n",
" \"at_time\": \"2023-06-01T19:55:06Z\",\n",
" \"storage_integrity\": \"TENANT_STORAGE\",\n",
" \"proof_mechanism\": \"SIMPLE_HASH\",\n",
" \"chain_id\": \"827586838445807967\",\n",
" \"chain_id\": \"8275868384\",\n",
" \"public\": false,\n",
" \"tenant_identity\": \"tenant/9bfb80ee-81f6-40dc-b5c7-1c7fb2fb9866\"\n",
" \"tenant_identity\": \"tenant/0a62f7c9-fd7b-4791-8041-01218d839ec1\"\n",
"}\n"
]
}
Expand Down Expand Up @@ -239,72 +239,72 @@
"text": [
"Creating Events\n",
"Event for Album 19 {\n",
" \"identity\": \"assets/cbd21a61-c126-4c02-b525-add1a74fb802/events/dff5e8e1-0933-4dbb-a122-a6a422b5a27e\",\n",
" \"asset_identity\": \"assets/cbd21a61-c126-4c02-b525-add1a74fb802\",\n",
" \"identity\": \"assets/63b6c2ae-c8f8-4e3b-93ae-e78339f56647/events/58483156-1c9c-4e9e-be57-d65672ea70d9\",\n",
" \"asset_identity\": \"assets/63b6c2ae-c8f8-4e3b-93ae-e78339f56647\",\n",
" \"event_attributes\": {\n",
" \"relase_year\": \"2008\",\n",
" \"album_name\": \"19\",\n",
" \"arc_description\": \"Artist Information\",\n",
" \"arc_display_type\": \"Album Release\"\n",
" \"arc_display_type\": \"Album Release\",\n",
" \"relase_year\": \"2008\"\n",
" },\n",
" \"asset_attributes\": {},\n",
" \"operation\": \"Record\",\n",
" \"behaviour\": \"RecordEvidence\",\n",
" \"timestamp_declared\": \"2023-01-16T11:50:56Z\",\n",
" \"timestamp_accepted\": \"2023-01-16T11:50:56Z\",\n",
" \"timestamp_committed\": \"2023-01-16T11:50:56.619910777Z\",\n",
" \"timestamp_declared\": \"2023-06-01T19:55:12Z\",\n",
" \"timestamp_accepted\": \"2023-06-01T19:55:12Z\",\n",
" \"timestamp_committed\": \"2023-06-01T19:55:12.467938549Z\",\n",
" \"principal_declared\": {\n",
" \"issuer\": \"https://app.rkvst.io/appidpv1\",\n",
" \"subject\": \"437bd138-dade-4346-aadd-dfdfee51ddf4\",\n",
" \"display_name\": \"Test Notebooks\",\n",
" \"subject\": \"43a271b9-5b25-4740-aa9f-1cbd51ed3625\",\n",
" \"display_name\": \"mwilder26\",\n",
" \"email\": \"\"\n",
" },\n",
" \"principal_accepted\": {\n",
" \"issuer\": \"https://app.rkvst.io/appidpv1\",\n",
" \"subject\": \"437bd138-dade-4346-aadd-dfdfee51ddf4\",\n",
" \"display_name\": \"Test Notebooks\",\n",
" \"subject\": \"43a271b9-5b25-4740-aa9f-1cbd51ed3625\",\n",
" \"display_name\": \"mwilder26\",\n",
" \"email\": \"\"\n",
" },\n",
" \"confirmation_status\": \"CONFIRMED\",\n",
" \"transaction_id\": \"\",\n",
" \"block_number\": 0,\n",
" \"transaction_index\": 0,\n",
" \"from\": \"0xe889E67FdBa658C6f27ccBDa98D9d1B5500Dbbce\",\n",
" \"tenant_identity\": \"tenant/9bfb80ee-81f6-40dc-b5c7-1c7fb2fb9866\"\n",
" \"from\": \"0x5284e740A744F075E402f7fB0c4485532ddf4Af8\",\n",
" \"tenant_identity\": \"tenant/0a62f7c9-fd7b-4791-8041-01218d839ec1\"\n",
"}\n",
"Event for Album 21 {\n",
" \"identity\": \"assets/cbd21a61-c126-4c02-b525-add1a74fb802/events/f74099ab-aab4-48aa-9654-0a09ad324d9b\",\n",
" \"asset_identity\": \"assets/cbd21a61-c126-4c02-b525-add1a74fb802\",\n",
" \"identity\": \"assets/63b6c2ae-c8f8-4e3b-93ae-e78339f56647/events/c637cfca-df4e-48ae-b434-6a04e9bf2a50\",\n",
" \"asset_identity\": \"assets/63b6c2ae-c8f8-4e3b-93ae-e78339f56647\",\n",
" \"event_attributes\": {\n",
" \"arc_description\": \"Artist Information\",\n",
" \"arc_display_type\": \"Album Release\",\n",
" \"relase_year\": \"2011\",\n",
" \"album_name\": \"21\"\n",
" \"album_name\": \"21\",\n",
" \"arc_description\": \"Artist Information\"\n",
" },\n",
" \"asset_attributes\": {},\n",
" \"operation\": \"Record\",\n",
" \"behaviour\": \"RecordEvidence\",\n",
" \"timestamp_declared\": \"2023-01-16T11:50:57Z\",\n",
" \"timestamp_accepted\": \"2023-01-16T11:50:57Z\",\n",
" \"timestamp_committed\": \"2023-01-16T11:50:57.963815260Z\",\n",
" \"timestamp_declared\": \"2023-06-01T19:55:13Z\",\n",
" \"timestamp_accepted\": \"2023-06-01T19:55:13Z\",\n",
" \"timestamp_committed\": \"2023-06-01T19:55:13.931375941Z\",\n",
" \"principal_declared\": {\n",
" \"issuer\": \"https://app.rkvst.io/appidpv1\",\n",
" \"subject\": \"437bd138-dade-4346-aadd-dfdfee51ddf4\",\n",
" \"display_name\": \"Test Notebooks\",\n",
" \"subject\": \"43a271b9-5b25-4740-aa9f-1cbd51ed3625\",\n",
" \"display_name\": \"mwilder26\",\n",
" \"email\": \"\"\n",
" },\n",
" \"principal_accepted\": {\n",
" \"issuer\": \"https://app.rkvst.io/appidpv1\",\n",
" \"subject\": \"437bd138-dade-4346-aadd-dfdfee51ddf4\",\n",
" \"display_name\": \"Test Notebooks\",\n",
" \"subject\": \"43a271b9-5b25-4740-aa9f-1cbd51ed3625\",\n",
" \"display_name\": \"mwilder26\",\n",
" \"email\": \"\"\n",
" },\n",
" \"confirmation_status\": \"CONFIRMED\",\n",
" \"transaction_id\": \"\",\n",
" \"block_number\": 0,\n",
" \"transaction_index\": 0,\n",
" \"from\": \"0xe889E67FdBa658C6f27ccBDa98D9d1B5500Dbbce\",\n",
" \"tenant_identity\": \"tenant/9bfb80ee-81f6-40dc-b5c7-1c7fb2fb9866\"\n",
" \"from\": \"0x5284e740A744F075E402f7fB0c4485532ddf4Af8\",\n",
" \"tenant_identity\": \"tenant/0a62f7c9-fd7b-4791-8041-01218d839ec1\"\n",
"}\n"
]
}
Expand All @@ -317,14 +317,6 @@
"event_two = create_release(arch, asset, album_name=\"21\", release=\"2011\")\n",
"print(\"Event for Album 21\", json_dumps(event_two, indent=4))"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "fe9cdd06",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -343,7 +335,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5 (v3.9.5:0a7dcbdb13, May 3 2021, 13:17:02) \n[Clang 6.0 (clang-600.0.57)]"
"version": "3.8.15"
},
"vscode": {
"interpreter": {
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Download the notebooks into a suitable folder:
:maxdepth: 2
:caption: Basic Asset and Event Examples

notebooks/Create Asset and Events
notebooks/Create Artist and Album Release Info
notebooks/Find Asset and Event Creation
notebooks/Find Asset and Create Attachment
notebooks/Create Event with Verified Domain
Expand Down
9 changes: 5 additions & 4 deletions functests/execnotebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ def check_notebook_cell(self, notebook, cellno):
)
LOGGER.debug(out)

def test_01_create_asset_and_events(self):
def test_01_create_artist_albuminfo(self):
"""
Test create_asset_and_events
Test create_artist_albuminfo
"""
with testbook(
"archivist/notebooks/Create Asset and Events.ipynb", execute=True
"archivist/notebooks/Create Artist and Album Release Info.ipynb",
execute=True,
) as notebook:
LOGGER.debug("\ncreate_asset_and_events")
LOGGER.debug("\ncreate_artist_albuminfo")
self.basic_notebook_test(notebook)
self.assertGreater(
int(notebook.ref("RKVST_UNIQUE_ID")),
Expand Down
7 changes: 4 additions & 3 deletions unittests/testnotebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ def basic_notebook_test(self, notebook):
msg="Incorrect cell output",
)

def test_create_asset_and_events(self):
def test_create_artist_albuminfo(self):
"""
Test create_asset_and_events
Test create_artist_albuminfo
"""
with testbook(
"archivist/notebooks/Create Asset and Events.ipynb", execute=(1, 2, 4, 5)
"archivist/notebooks/Create Artist and Album Release Info.ipynb",
execute=(1, 2, 4, 5),
) as notebook:
self.basic_notebook_test(notebook)

Expand Down

0 comments on commit dd82d11

Please sign in to comment.