In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

Unverified Commit 9668b4dc authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix syntax issues

parent 83d6cc26
Pipeline #16881 failed with stages
in 1 minute and 30 seconds
......@@ -168,8 +168,8 @@ def _get_access_status(graph, record_id):
logging.info("type in resource => {}".format('type' in resource))
logging.info("type == 'access' => {}".format(resource['type'] == 'access'))
logging.info("regulates in resource => {}".format('regulates' in resource))
logging.info("resource['regulates'].startswith('https://memobase.ch/digital/') => {}".format(
resource['regulates'].startswith('https://memobase.ch/digital/')))
logging.info("resource['regulates'].startswith('https://memobase.ch/digital/') => {}"
.format(resource['regulates'].startswith('https://memobase.ch/digital/')))
logging.info("'name' in resource => {}".format('name' in resource))
if 'type' in resource and resource['type'] == 'access' and \
'regulates' in resource and \
......
{"@graph":[{"@id":"https://memobase.ch/digital/Fonoteca-CHRISTEN-18BD1047_A35-1","@type":"https://www.ica.org/standards/RiC/ontology#Instantiation","isDistributedOn":"audio","locator":"http://vault.fonoteca.ch//archive//18BD1001-2000//18BD1047//18BD1047_A35.mp3","identifiedBy":"https://memobase.ch/digital/Fonoteca-CHRISTEN-18BD1047_A35-1#genidbd15eed6-ddef-4caf-9d58-556eb1c859a9","instantiates":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35","isDerivedFromInstantiation":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1","regulatedBy":"https://memobase.ch/digital/Fonoteca-CHRISTEN-18BD1047_A35-1#genid993294c5-7928-490e-bed2-714741cae3b8","type":"digitalObject"},{"@id":"https://memobase.ch/digital/Fonoteca-CHRISTEN-18BD1047_A35-1#genid993294c5-7928-490e-bed2-714741cae3b8","@type":"https://www.ica.org/standards/RiC/ontology#Rule","name":"private","regulates":"https://memobase.ch/digital/Fonoteca-CHRISTEN-18BD1047_A35-1","type":"access"},{"@id":"https://memobase.ch/digital/Fonoteca-CHRISTEN-18BD1047_A35-1#genidbd15eed6-ddef-4caf-9d58-556eb1c859a9","@type":"https://www.ica.org/standards/RiC/ontology#Identifier","identifier":"Fonoteca-CHRISTEN-18BD1047_A35-1","type":"main"},{"@id":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1","@type":"https://www.ica.org/standards/RiC/ontology#Instantiation","duration":"00:00:42","hasCarrierType":["https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genide538fec1-4c84-4136-967a-7cc8eb627c91","https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genid544a294a-9db5-4231-9212-50d411c2d81e"],"hasDerivedInstantiation":"https://memobase.ch/digital/Fonoteca-CHRISTEN-18BD1047_A35-1","identifiedBy":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genida8e2dedf-311f-49bf-8d8f-c823257db009","instantiates":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35","physicalCharacteristics":["Bemerkung: Technische Daten: 11 cm <br /> Technische Daten: 6.35 mm <br /> Technische Daten: Plastikspule <br /> Technische Daten: 270 m <br /> Material: BASF LGS 26 <br /> Spurlage: 2-Spur <br /> Aufnahmegeräte: UHER 4000 Report Monitor <br /> Position: A35 <br /> Bandzählwerk: 339-348 <br /> Anzahl Träger: 1 <br />","Tonaufnahmeverfahren: Mono","Abspielgeschwindigkeit: 9.5 cm/s"],"regulatedBy":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genide8a03c3d-d371-48ad-9994-21afaee699b7","type":"physicalObject"},{"@id":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genid544a294a-9db5-4231-9212-50d411c2d81e","@type":"https://www.ica.org/standards/RiC/ontology#CarrierType","sameAs":"http://www.wikidata.org/entity/Q61996834","name":[{"@language":"it","@value":"GALATEO MANCANTE"},{"@language":"fr","@value":"L'ÉTIQUETTE MANQUANTE"},{"@language":"de","@value":"FEHLENDES LABEL"}],"resultsFrom":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genide46a5264-e1d6-462e-bedf-609f380b0cc0"},{"@id":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genida8e2dedf-311f-49bf-8d8f-c823257db009","@type":"https://www.ica.org/standards/RiC/ontology#Identifier","identifier":"Fonoteca-CHRISTEN-18BD1047_A35-1","type":"main"},{"@id":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genide538fec1-4c84-4136-967a-7cc8eb627c91","@type":"https://www.ica.org/standards/RiC/ontology#CarrierType","name":"1/4 Zoll Magnetband"},{"@id":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1#genide8a03c3d-d371-48ad-9994-21afaee699b7","@type":"https://www.ica.org/standards/RiC/ontology#Rule","name":"onsite","regulates":"https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1","type":"access"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35","@type":"https://www.ica.org/standards/RiC/ontology#Record","eventType":"Create","http://memobase.ch/internal/isPublished":false,"abstract":"Trägertitel: Hanny Christen: Selbsterstellte Kopien ihrer Feldaufnahmen in Macugnaga bei Maria Reich, Maria Burgener und Annunziata Horer, in Fruttwald bei Familie Ferrara und Antonietti, in Leuk bei Romi Grand und Lucie Witschard, in Mörel bei Marie und Josefine Blatter, in Simplon Dorf bei Familie Zenklusen <br /> Details: Kopien aus den Bändern 18BD1017, 18BD1015, 18BD1026 <br />","created":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid04cd24a4-bc40-4126-aef4-60b9fa503858","P60451":"https://memobase.ch/institution/mrv","P60556":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genidee4a7040-c0fe-4eee-b509-53204b1fe674","sameAs":"http://www.fonoteca.ch/cgi-bin/oecgi3.exe/inet_fnbasedetail?REC_ID=8.015","conditionsOfUse":"Alle Rechte der Dokumente aus der Feldforschung sind freigegeben. Die Rechte der mitgeschnittenen Radiosendungen müssen bei der SRG geklärt werden.","descriptiveNote":"Vorhandene Beilagen bei der Institution: Aufnahmebegleitzettel <br /> Dieses Dokument kann online, nur über die FN Base, angeschaut werden – Verwenden Sie den untenstehenden Link.","hasInstantiation":["https://memobase.ch/digital/Fonoteca-CHRISTEN-18BD1047_A35-1","https://memobase.ch/physical/Fonoteca-CHRISTEN-18BD1047_A35-1"],"hasTitle":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid34cd367b-cb1e-4638-a854-9cf8e8e575ae","heldBy":"https://memobase.ch/institution/Fonoteca","identifiedBy":["https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genida5c2bb68-bec4-405b-8eb3-f3c4805c4a84","https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genidea99c694-1344-493f-9e46-17da0b7b458a","https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid805fa77b-4646-4602-917d-aa05ed8263e4"],"isPartOf":"https://memobase.ch/recordSet/Fonoteca-CHRISTEN","recordResourceOrInstantiationIsSourceOfCreationRelation":["https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid3b47644e-b24b-46a2-bc19-2c4a095c7dec","https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid6899ad8c-d272-41f8-8d84-99b0f61a9ce1"],"regulatedBy":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genidc6b9aa95-bf91-4e05-a8d4-470eac4a9ea2","scopeAndContent":"Aufnahme-Bedingung: Feldaufnahme <br /> Musikwerktitel: Det oben am Bergli <br />","title":"Det oben am Bergli","type":"Ton"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid04cd24a4-bc40-4126-aef4-60b9fa503858","@type":"https://www.ica.org/standards/RiC/ontology#DateRange","normalizedDateValue":"1960"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid34cd367b-cb1e-4638-a854-9cf8e8e575ae","@type":"https://www.ica.org/standards/RiC/ontology#Title","title":"Det oben am Bergli","type":"main"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid3b47644e-b24b-46a2-bc19-2c4a095c7dec","@type":"https://www.ica.org/standards/RiC/ontology#CreationRelation","creationRelationHasSource":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35","creationRelationHasTarget":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genida0e957da-f318-46c4-9b8f-2916ba17df8c","name":"Kinderstimmen","type":"contributor"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid6899ad8c-d272-41f8-8d84-99b0f61a9ce1","@type":"https://www.ica.org/standards/RiC/ontology#CreationRelation","creationRelationHasSource":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35","creationRelationHasTarget":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genideacdd4f4-12f5-408e-9367-7075ead3a8af","name":"Author","type":"creator"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid805fa77b-4646-4602-917d-aa05ed8263e4","@type":"https://www.ica.org/standards/RiC/ontology#Identifier","identifier":"Fonoteca-CHRISTEN-18BD1047_A35","type":"main"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genida0e957da-f318-46c4-9b8f-2916ba17df8c","@type":"https://www.ica.org/standards/RiC/ontology#Person","agentIsTargetOfCreationRelation":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid3b47644e-b24b-46a2-bc19-2c4a095c7dec","name":"Unbekannt"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genida5c2bb68-bec4-405b-8eb3-f3c4805c4a84","@type":"https://www.ica.org/standards/RiC/ontology#Identifier","identifier":"18BD1047_A35","type":"original"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genidc6b9aa95-bf91-4e05-a8d4-470eac4a9ea2","@type":"https://www.ica.org/standards/RiC/ontology#Rule","name":"Gesellschaft für die Volksmusik","regulates":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35","type":"holder"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genidea99c694-1344-493f-9e46-17da0b7b458a","@type":"https://www.ica.org/standards/RiC/ontology#Identifier","identifier":"Fonoteca-18BD1047_A35","type":"oldMemobase"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genideacdd4f4-12f5-408e-9367-7075ead3a8af","@type":"https://www.ica.org/standards/RiC/ontology#Person","agentIsTargetOfCreationRelation":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genid6899ad8c-d272-41f8-8d84-99b0f61a9ce1","name":"CHRISTEN, Hanny"},{"@id":"https://memobase.ch/record/Fonoteca-CHRISTEN-18BD1047_A35#genidee4a7040-c0fe-4eee-b509-53204b1fe674","@type":"https://www.ica.org/standards/RiC/ontology#Place","name":"BEI ROMI GRAND UND LUCIA WITSCHARD"}],"@context":{"creationRelationHasTarget":{"@id":"https://www.ica.org/standards/RiC/ontology#creationRelationHasTarget","@type":"@id"},"type":{"@id":"https://www.ica.org/standards/RiC/ontology#type"},"name":{"@id":"https://www.ica.org/standards/RiC/ontology#name"},"creationRelationHasSource":{"@id":"https://www.ica.org/standards/RiC/ontology#creationRelationHasSource","@type":"@id"},"scopeAndContent":{"@id":"https://www.ica.org/standards/RiC/ontology#scopeAndContent"},"eventType":{"@id":"http://memobase.ch/internal/eventType"},"heldBy":{"@id":"https://www.ica.org/standards/RiC/ontology#heldBy","@type":"@id"},"regulatedBy":{"@id":"https://www.ica.org/standards/RiC/ontology#regulatedBy","@type":"@id"},"isPublished":{"@id":"http://memobase.ch/internal/isPublished","@type":"http://www.w3.org/2001/XMLSchema#boolean"},"isPartOf":{"@id":"https://www.ica.org/standards/RiC/ontology#isPartOf","@type":"@id"},"identifiedBy":{"@id":"https://www.ica.org/standards/RiC/ontology#identifiedBy","@type":"@id"},"abstract":{"@id":"http://purl.org/dc/terms/abstract"},"P60451":{"@id":"http://rdaregistry.info/Elements/u/P60451","@type":"@id"},"descriptiveNote":{"@id":"https://www.ica.org/standards/RiC/ontology#descriptiveNote"},"hasInstantiation":{"@id":"https://www.ica.org/standards/RiC/ontology#hasInstantiation","@type":"@id"},"created":{"@id":"http://purl.org/dc/terms/created","@type":"@id"},"recordResourceOrInstantiationIsSourceOfCreationRelation":{"@id":"https://www.ica.org/standards/RiC/ontology#recordResourceOrInstantiationIsSourceOfCreationRelation","@type":"@id"},"sameAs":{"@id":"http://schema.org/sameAs"},"hasTitle":{"@id":"https://www.ica.org/standards/RiC/ontology#hasTitle","@type":"@id"},"title":{"@id":"https://www.ica.org/standards/RiC/ontology#title"},"conditionsOfUse":{"@id":"https://www.ica.org/standards/RiC/ontology#conditionsOfUse"},"P60556":{"@id":"http://rdaregistry.info/Elements/u/P60556","@type":"@id"},"regulates":{"@id":"https://www.ica.org/standards/RiC/ontology#regulates","@type":"@id"},"identifier":{"@id":"https://www.ica.org/standards/RiC/ontology#identifier"},"resultsFrom":{"@id":"https://www.ica.org/standards/RiC/ontology#resultsFrom","@type":"@id"},"isDerivedFromInstantiation":{"@id":"https://www.ica.org/standards/RiC/ontology#isDerivedFromInstantiation","@type":"@id"},"isDistributedOn":{"@id":"http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#isDistributedOn"},"locator":{"@id":"http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#locator"},"instantiates":{"@id":"https://www.ica.org/standards/RiC/ontology#instantiates","@type":"@id"},"agentIsTargetOfCreationRelation":{"@id":"https://www.ica.org/standards/RiC/ontology#agentIsTargetOfCreationRelation","@type":"@id"},"normalizedDateValue":{"@id":"https://www.ica.org/standards/RiC/ontology#normalizedDateValue"},"hasDerivedInstantiation":{"@id":"https://www.ica.org/standards/RiC/ontology#hasDerivedInstantiation","@type":"@id"},"hasCarrierType":{"@id":"https://www.ica.org/standards/RiC/ontology#hasCarrierType","@type":"@id"},"physicalCharacteristics":{"@id":"https://www.ica.org/standards/RiC/ontology#physicalCharacteristics"},"duration":{"@id":"http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#duration"}}}
\ No newline at end of file
......@@ -62,15 +62,6 @@ class Test(TestCase):
Test._load_file_and_get_res('mfk-FLM-167202.json', lambda x: x), 'some_rec')
self.assertEqual(access_status, 'public')
def test__get_access_status(self):
path = Path(__file__).parent / f"../fixtures/value.json"
with path.open('r') as f:
json_msg = json.load(f)
records_json_data = json_msg['@graph']
access_status = MediametadataToDB._get_access_status(
records_json_data, 'some_rec')
access_status
def test__get_values_from_inaccessible_digital_object(self):
res = {
'sig': 'BAB-PA_43-BAB_MC169A-1',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment