You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The URN's are changed/merged/squashed from the measures from AK.
Option to
(1) Remove existing projecten verwijderen and make them again
OR
(2)
#!/usr/bin/env python3
import os
import psycopg2
import requests
def find_urns(data):
urns = []
if isinstance(data, dict):
for key, value in data.items():
if key.lower() == 'urn':
urns.append(value)
else:
urns.extend(find_urns(value))
elif isinstance(data, list):
for item in data:
urns.extend(find_urns(item))
return urns
if __name__ == '__main__':
conn = psycopg2.connect(database = "amt",
user = "postgres",
host= 'localhost',
password = os.environ.get('POSTGRES_PASSWORD'),
port = 5432)
cur = conn.cursor()
cur.execute("SELECT name, system_card_json FROM algorithm")
rows = cur.fetchall()
cur.close()
for row in rows:
print(f"Analying algor:{row[0]}")
data = row[1]
urns = find_urns(data)
for urn in urns:
html_encoded_urn = urn.replace(":", "%3A")
resulta = requests.get(f"https://task-registry.apps.digilab.network/requirements/urn/{html_encoded_urn}?version=latest")
resultb = requests.get(f"https://task-registry.apps.digilab.network/measures/urn/{html_encoded_urn}?version=latest")
resultc = requests.get(f"https://task-registry.apps.digilab.network/instruments/urn/{html_encoded_urn}?version=latest")
result = [results.status_code for results in [resulta, resultb, resultc]]
if not 200 in result:
print(f"URN {urn} is invalid")
print(" ")
The text was updated successfully, but these errors were encountered:
Description
The URN's are changed/merged/squashed from the measures from AK.
Option to
(1) Remove existing projecten verwijderen and make them again
OR
(2)
The text was updated successfully, but these errors were encountered: