diff --git a/.dockerignore b/.dockerignore index c113e1b37ff356aa2b218b51a4b95f09909e9b55..a0f5111a86689c013f1777d0d9220c0a1f033c6f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,7 @@ config notes dist +tmp .venv .vscode .idea diff --git a/notebooks/create_pids.ipynb b/notebooks/create_pids.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..9ac777bcb76ac673cc048626c69268ca7b7c0f35 --- /dev/null +++ b/notebooks/create_pids.ipynb @@ -0,0 +1,100 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "initial_id", + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "from fairnb.util import Util\n", + "import yaml\n", + "\n", + "from definitions import BASE_PATH\n", + "CONFIG_PATH = BASE_PATH / \"config\"\n", + "\n", + "util = Util.get_instance()" + ] + }, + { + "cell_type": "code", + "outputs": [], + "source": [ + "table_metadata = yaml.safe_load(open(BASE_PATH / \"resource\" / \"default_table_metadata.yml\", \"r\"))" + ], + "metadata": { + "collapsed": false + }, + "id": "8a363bf6de5b510a", + "execution_count": null + }, + { + "cell_type": "code", + "outputs": [], + "source": [ + "table_metadata" + ], + "metadata": { + "collapsed": false + }, + "id": "86af67b40b3bab5e", + "execution_count": null + }, + { + "cell_type": "code", + "outputs": [], + "source": [ + "connector = util.get_dbrepo_connector(CONFIG_PATH / \"dbrepo_config.yml\") " + ], + "metadata": { + "collapsed": false + }, + "id": "7ff8267450a061ec", + "execution_count": null + }, + { + "cell_type": "code", + "outputs": [], + "source": [ + "connector.create_pid(table_metadata)" + ], + "metadata": { + "collapsed": false + }, + "id": "e714830b64f427bd", + "execution_count": null + }, + { + "cell_type": "code", + "outputs": [], + "source": [], + "metadata": { + "collapsed": false + }, + "id": "d7153f3fa2a916d0" + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/resource/default_table_metadata.yml b/resource/default_table_metadata.yml index 529e2bbbb1cb94d00d74e0f5ebba228be906a5dc..6350d660a40ed7b7c01b387e8903284bbfaa1492 100644 --- a/resource/default_table_metadata.yml +++ b/resource/default_table_metadata.yml @@ -1,16 +1,16 @@ -# database_id: 2 +database_id: 23 query_id: view_id: -# table_id: 2 +# table_id: 116 type: table # titles: -# - title: resource title +# - title: Entity dependencies # language: en -# type: +# type: null # descriptions: -# - description: resource description +# - description: "Entity dependencies, tracking the lineage of entities, according to wasDerivedFrom relation of PROV-O" # language: en -# type: +# type: null funders: [] publisher: TU Wien language: en @@ -24,14 +24,17 @@ creators: affiliation: affiliation_identifier: affiliation_identifier_scheme: -publication_day: 25 -publication_month: 3 +publication_day: 19 +publication_month: 2 publication_year: 2024 licenses: -- description: "The Creative Commons Attribution license allows re-distribution and re-use of a licensed work on the condition that the creator is appropriately credited." - identifier: "CC-BY-4.0" - uri: "https://creativecommons.org/licenses/by/4.0/legalcode" -# related_identifiers: -# - value: https://dbrepo1.ec.tuwien.ac.at/database/23/table/117 -# type: URL -# relation: References +- identifier: "Apache-2.0" + uri: "https://opensource.org/licenses/Apache-2.0" + description: null +related_identifiers: +- value: "https://doi.org/10.48436/f0kah-nnc65" + type: "DOI" + relation: "IsDerivedFrom" +- value: "https://gitlab.tuwien.ac.at/martin.weise/fairnb" + type: "URL" + relation: "IsSupplementTo" \ No newline at end of file