|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | | - "execution_count": null, |
| 5 | + "execution_count": 1, |
6 | 6 | "metadata": {}, |
7 | | - "outputs": [], |
| 7 | + "outputs": [ |
| 8 | + { |
| 9 | + "name": "stdout", |
| 10 | + "output_type": "stream", |
| 11 | + "text": [ |
| 12 | + "Requirement already satisfied: rohub in /opt/anaconda3/lib/python3.12/site-packages (1.2.1)\n", |
| 13 | + "Requirement already satisfied: requests in /opt/anaconda3/lib/python3.12/site-packages (from rohub) (2.32.5)\n", |
| 14 | + "Requirement already satisfied: pandas in /opt/anaconda3/lib/python3.12/site-packages (from rohub) (2.2.2)\n", |
| 15 | + "Requirement already satisfied: numpy>=1.26.0 in /opt/anaconda3/lib/python3.12/site-packages (from pandas->rohub) (1.26.4)\n", |
| 16 | + "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/anaconda3/lib/python3.12/site-packages (from pandas->rohub) (2.9.0.post0)\n", |
| 17 | + "Requirement already satisfied: pytz>=2020.1 in /opt/anaconda3/lib/python3.12/site-packages (from pandas->rohub) (2024.1)\n", |
| 18 | + "Requirement already satisfied: tzdata>=2022.7 in /opt/anaconda3/lib/python3.12/site-packages (from pandas->rohub) (2023.3)\n", |
| 19 | + "Requirement already satisfied: charset_normalizer<4,>=2 in /opt/anaconda3/lib/python3.12/site-packages (from requests->rohub) (3.4.4)\n", |
| 20 | + "Requirement already satisfied: idna<4,>=2.5 in /opt/anaconda3/lib/python3.12/site-packages (from requests->rohub) (3.11)\n", |
| 21 | + "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/anaconda3/lib/python3.12/site-packages (from requests->rohub) (2.6.3)\n", |
| 22 | + "Requirement already satisfied: certifi>=2017.4.17 in /opt/anaconda3/lib/python3.12/site-packages (from requests->rohub) (2026.1.4)\n", |
| 23 | + "Requirement already satisfied: six>=1.5 in /opt/anaconda3/lib/python3.12/site-packages (from python-dateutil>=2.8.2->pandas->rohub) (1.17.0)\n" |
| 24 | + ] |
| 25 | + } |
| 26 | + ], |
8 | 27 | "source": [ |
9 | 28 | "!pip install rohub" |
10 | 29 | ] |
|
44 | 63 | }, |
45 | 64 | { |
46 | 65 | "cell_type": "code", |
47 | | - "execution_count": 4, |
| 66 | + "execution_count": 11, |
48 | 67 | "metadata": {}, |
49 | 68 | "outputs": [], |
50 | 69 | "source": [ |
51 | 70 | "if USE_DEVELOPMENT_VERSION:\n", |
52 | | - " rohub.settings.API_URL = \"ttps://rohub2020-devel.apps.bst2.paas.psnc.pl/api/\"\n", |
| 71 | + " rohub.settings.API_URL = \"https://rohub2020-devel.apps.bst2.paas.psnc.pl/api/\"\n", |
53 | 72 | " rohub.settings.KEYCLOAK_CLIENT_ID = \"rohub2020-cli\"\n", |
54 | 73 | " rohub.settings.KEYCLOAK_CLIENT_SECRET = \"714617a7-87bc-4a88-8682-5f9c2f60337d\"\n", |
55 | 74 | " rohub.settings.KEYCLOAK_URL = \"https://keycloak-dev.apps.paas-dev.psnc.pl/auth/realms/rohub/protocol/openid-connect/token\"\n", |
|
73 | 92 | "rohub.login(username=username, password=password)" |
74 | 93 | ] |
75 | 94 | }, |
| 95 | + { |
| 96 | + "cell_type": "code", |
| 97 | + "execution_count": 14, |
| 98 | + "metadata": {}, |
| 99 | + "outputs": [ |
| 100 | + { |
| 101 | + "name": "stdout", |
| 102 | + "output_type": "stream", |
| 103 | + "text": [ |
| 104 | + "Trying to confirm status of the job. It can take a while...\n" |
| 105 | + ] |
| 106 | + }, |
| 107 | + { |
| 108 | + "ename": "SystemExit", |
| 109 | + "evalue": "Job failed with the following info: The job failed with errors: Archive /tmp/tmpexlqglgj.zip contains duplicated RO crate manifest.", |
| 110 | + "output_type": "error", |
| 111 | + "traceback": [ |
| 112 | + "An exception has occurred, use %tb to see the full traceback.\n", |
| 113 | + "\u001b[0;31mSystemExit\u001b[0m\u001b[0;31m:\u001b[0m Job failed with the following info: The job failed with errors: Archive /tmp/tmpexlqglgj.zip contains duplicated RO crate manifest.\n" |
| 114 | + ] |
| 115 | + } |
| 116 | + ], |
| 117 | + "source": [ |
| 118 | + "research_areas = [\"Environmental research\"]\n", |
| 119 | + "title = \"Merged RoCrates\"\n", |
| 120 | + "description = f\"Description for {title}\"\n", |
| 121 | + "zip_path = \"/Users/mahdi/Documents/GitHub/NFDI4IngModelValidationPlatform/examples/linear-elastic-plate-with-hole/RoCrates/Merged.zip\"\n", |
| 122 | + "RO = rohub.ros_upload(path_to_zip=zip_path)\n", |
| 123 | + "print(f\"Identifier: {RO.identifier}\")" |
| 124 | + ] |
| 125 | + }, |
76 | 126 | { |
77 | 127 | "cell_type": "code", |
78 | 128 | "execution_count": 6, |
|
0 commit comments