diff --git a/.invenio/api_query/api/table_data_endpoint_api.py b/.invenio/api_query/api/table_data_endpoint_api.py index 12101dabc2a0badc252bd2c4801258eed30cd414..34b6434bf0480fb38772c7920fab94c0754393de 100644 --- a/.invenio/api_query/api/table_data_endpoint_api.py +++ b/.invenio/api_query/api/table_data_endpoint_api.py @@ -259,7 +259,7 @@ class TableDataEndpointApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'HEAD', + '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'GET', path_params, query_params, header_params, @@ -380,7 +380,7 @@ class TableDataEndpointApi(object): auth_settings = [] # noqa: E501 return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'GET', + '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'HEAD', path_params, query_params, header_params, diff --git a/.invenio/deposit.ipynb b/.invenio/deposit.ipynb index 743aa6b60336119d74869c3225475e1c02f693b2..cdc53eebc51ec60aff9ed9f88951ae04444afcdb 100644 --- a/.invenio/deposit.ipynb +++ b/.invenio/deposit.ipynb @@ -3,7 +3,9 @@ { "cell_type": "markdown", "source": [ - "# Deposit" + "# Deposit\n", + "\n", + "Please create an account at [http://localhost:3000/register](http://localhost:3000/register) with `user:user` before executing." ], "metadata": { "collapsed": false @@ -81,10 +83,10 @@ "{'access': {'embargo': {'active': False, 'reason': None, 'until': None},\n", " 'files': 'public',\n", " 'record': 'public'},\n", - " 'created': datetime.datetime(2022, 6, 28, 19, 47, 36, 289193, tzinfo=tzutc()),\n", - " 'expires_at': datetime.datetime(2022, 6, 28, 19, 47, 36, 289218),\n", + " 'created': datetime.datetime(2022, 6, 29, 10, 23, 1, 849279, tzinfo=tzutc()),\n", + " 'expires_at': datetime.datetime(2022, 6, 29, 10, 23, 1, 849305),\n", " 'files': {'default_preview': None, 'enabled': True},\n", - " 'id': 'a13x6-2wz51',\n", + " 'id': 'w37m8-dx896',\n", " 'is_published': False,\n", " 'metadata': {'creators': [{'affiliations': [{'id': None, 'name': 'TU Wien'}],\n", " 'person_or_org': {'family_name': 'Weise',\n", @@ -99,7 +101,7 @@ " 'title': 'Jupyter Notebook Test'},\n", " 'pids': {'doi': None},\n", " 'revision_id': 4,\n", - " 'updated': datetime.datetime(2022, 6, 28, 19, 47, 36, 304744, tzinfo=tzutc()),\n", + " 'updated': datetime.datetime(2022, 6, 29, 10, 23, 1, 866243, tzinfo=tzutc()),\n", " 'versions': {'index': 1, 'is_latest': False, 'is_latest_draft': True}}\n" ] } @@ -212,10 +214,10 @@ "{'access': {'embargo': {'active': False, 'reason': None, 'until': None},\n", " 'files': 'public',\n", " 'record': 'public'},\n", - " 'created': datetime.datetime(2022, 6, 28, 19, 47, 42, 416073, tzinfo=tzutc()),\n", + " 'created': datetime.datetime(2022, 6, 29, 10, 23, 3, 488874, tzinfo=tzutc()),\n", " 'expires_at': None,\n", " 'files': {'default_preview': None, 'enabled': True},\n", - " 'id': 'a13x6-2wz51',\n", + " 'id': 'w37m8-dx896',\n", " 'is_published': True,\n", " 'metadata': {'creators': [{'affiliations': [{'id': None, 'name': 'TU Wien'}],\n", " 'person_or_org': {'family_name': 'Weise',\n", @@ -229,10 +231,10 @@ " 'resource_type': {'id': 'other'},\n", " 'title': 'Jupyter Notebook Test'},\n", " 'pids': {'doi': {'client': 'datacite',\n", - " 'identifier': '10.70124/a13x6-2wz51',\n", + " 'identifier': '10.70124/w37m8-dx896',\n", " 'provider': 'datacite'}},\n", " 'revision_id': 3,\n", - " 'updated': datetime.datetime(2022, 6, 28, 19, 47, 42, 490667, tzinfo=tzutc()),\n", + " 'updated': datetime.datetime(2022, 6, 29, 10, 23, 3, 555616, tzinfo=tzutc()),\n", " 'versions': {'index': 1, 'is_latest': True, 'is_latest_draft': True}}\n" ] } diff --git a/.invenio/feature_extract.ipynb b/.invenio/feature_extract.ipynb index 6cd6ab8ba97dca60b9475cc4f0a8b313bafc5a45..80f15c031783c3de3c62bd198cb2083c02681c89 100644 --- a/.invenio/feature_extract.ipynb +++ b/.invenio/feature_extract.ipynb @@ -19,12 +19,14 @@ " 4. Create a mariadb container\n", " 5. Start the mariadb container\n", " 6. Create a database within the mariadb container\n", - " 7. Import the feature .csv (manually)" + " 7. Import the feature .csv (manually)\n", + "\n", + "Please create an account at [http://localhost:3000/register](http://localhost:3000/register) with `user:user` before executing." ] }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 4, "outputs": [], "source": [ "import os.path\n", @@ -58,7 +60,7 @@ { "cell_type": "markdown", "source": [ - " 8. Download wav\n", + " 9. Download wav\n", "\n", "Resolve the DOI to URI" ], @@ -68,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 5, "outputs": [ { "name": "stdout", @@ -102,7 +104,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 6, "outputs": [ { "name": "stdout", @@ -114,11 +116,6 @@ "... feature extract from https://zenodo.org/api/files/22d69a63-2aff-47ae-b818-be78a23e9889/colive.0066_20200611134530_2_m4a_0.wav\n", "... feature extract from https://zenodo.org/api/files/22d69a63-2aff-47ae-b818-be78a23e9889/colive.0066_20200612072315_1_m4a_0.wav\n", "... feature extract from https://zenodo.org/api/files/22d69a63-2aff-47ae-b818-be78a23e9889/colive.0066_20200612072315_2_m4a_0.wav\n", - "... feature extract from https://zenodo.org/api/files/22d69a63-2aff-47ae-b818-be78a23e9889/colive.0066_20200613082517_1_m4a_0.wav\n", - "... feature extract from https://zenodo.org/api/files/22d69a63-2aff-47ae-b818-be78a23e9889/colive.0066_20200613082517_2_m4a_0.wav\n", - "... feature extract from https://zenodo.org/api/files/22d69a63-2aff-47ae-b818-be78a23e9889/colive.0066_20200614080017_1_m4a_0.wav\n", - "... feature extract from https://zenodo.org/api/files/22d69a63-2aff-47ae-b818-be78a23e9889/colive.0066_20200614080017_2_m4a_0.wav\n", - "... feature extract from https://zenodo.org/api/files/22d69a63-2aff-47ae-b818-be78a23e9889/colive.0066_20200615070238_1_m4a_0.wav\n", "Generated a feature .csv in your home directory\n" ] } @@ -127,6 +124,7 @@ "response = rq.get(\"https://\" + host + \"/api/records/\" + id)\n", "record = response.json()\n", "\n", + "i = 0\n", "with open(os.path.expanduser(\"~/features.csv\"), \"w\") as f:\n", " writer = csv.writer(f)\n", " writer.writerow([\"key\", \"size\", \"link\"])\n", @@ -134,6 +132,9 @@ " rq.get(file[\"links\"][\"self\"])\n", " print(\"... feature extract from\", file[\"links\"][\"self\"])\n", " writer.writerow([file[\"key\"], file[\"size\"], file[\"links\"][\"self\"]])\n", + " i += 1\n", + " if i > 5:\n", + " break\n", "print(\"Generated a feature .csv in your home directory\")" ], "metadata": { @@ -154,7 +155,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 7, "outputs": [], "source": [ "response = authentication.authenticate_user1({\n", @@ -183,17 +184,17 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 8, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'hash': 'f5a649a71aae3748e62228721c44627ffc866f665d677bb890c37b9111590ffa',\n", - " 'id': 2,\n", - " 'internal_name': 'fda-userdb-mir-1010b964-f6fa-11ec-9f77-64bc58900b78',\n", + "{'hash': 'a431232a07efc4027cf71beaf38e7465984985ded1d4a67a94d092b49bd4d65e',\n", + " 'id': 1,\n", + " 'internal_name': 'fda-userdb-mir-529d42b0-f796-11ec-ad95-64bc58900b78',\n", " 'is_public': None,\n", - " 'name': 'MIR 1010b964-f6fa-11ec-9f77-64bc58900b78'}\n" + " 'name': 'MIR 529d42b0-f796-11ec-ad95-64bc58900b78'}\n" ] } ], @@ -224,17 +225,17 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 9, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "{'hash': 'f5a649a71aae3748e62228721c44627ffc866f665d677bb890c37b9111590ffa',\n", - " 'id': 2,\n", - " 'internal_name': 'fda-userdb-mir-1010b964-f6fa-11ec-9f77-64bc58900b78',\n", + "{'hash': 'a431232a07efc4027cf71beaf38e7465984985ded1d4a67a94d092b49bd4d65e',\n", + " 'id': 1,\n", + " 'internal_name': 'fda-userdb-mir-529d42b0-f796-11ec-ad95-64bc58900b78',\n", " 'is_public': None,\n", - " 'name': 'MIR 1010b964-f6fa-11ec-9f77-64bc58900b78'}\n" + " 'name': 'MIR 529d42b0-f796-11ec-ad95-64bc58900b78'}\n" ] } ], @@ -263,7 +264,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 10, "outputs": [], "source": [ "response = database.create({\n",