Skip to content

Commit

Permalink
adapt scripts to new directory structure, update to new files
Browse files Browse the repository at this point in the history
  • Loading branch information
SArndt-TIB committed Jun 13, 2024
1 parent 83b29dc commit 24eaebd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions scripts/create_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
'''
dfg_onto_metadata_fn = Path(__file__).parent.parent / 'metadata.ttl'
dfg_onto_fn = Path(__file__).parent.parent / 'dfgfo.ttl'
dfg_csv_en = Path(__file__).parent.parent / 'csv' / 'Fachsystematik_2020-2024.csv'
#dfg_csv_en = Path(__file__).parent.parent / 'csv' / '2020-2024' / 'Fachsystematik_2020-2024.csv'
dfg_csv_en = Path(__file__).parent.parent / 'csv' / '2024-2028' / 'Fachsystematik_2024-2028.csv'
print(dfg_csv_en)

g_metadata = Graph()
Expand Down Expand Up @@ -96,7 +97,7 @@ def create_class(graph, ns, node_name, labels, parent):
cell_label_de = 'DE'
cell_id_de, cell_label_de = split_id_label(id_n_label=cell_de)
current = f'{cell_id} - {cell_label}'
print(f'CEL ID: <<<<{cell_id}>>>')
print(f'CELL ID: <<<<{cell_id}>>>')
# parent
if index == 0:
parent_id = None
Expand Down
5 changes: 3 additions & 2 deletions scripts/parse_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from pprint import pprint


dfg_csv = Path(__file__).parent.parent / 'csv' / 'Fachsystematik_2020-2024.csv'
#dfg_csv = Path(__file__).parent.parent / 'csv' / '2020-2024' / 'Fachsystematik_2020-2024.csv'
dfg_csv = Path(__file__).parent.parent / 'csv' / '2024-2028' / 'Fachsystematik_2024-2028.csv'
print(dfg_csv)


Expand All @@ -12,4 +13,4 @@
for row in csvfile:
pprint(row)
# test: EN and DE subject match
assert row['Subject Number'] == row['Fachnummer']
assert row['Subject Number'] == row['Fachnummer']

0 comments on commit 24eaebd

Please sign in to comment.