Compare commits

..

2 Commits

3 changed files with 9 additions and 4 deletions

5
.gitignore vendored
View File

@@ -1,6 +1,9 @@
# ignora log di h5tojson e jsontoh5 # ignores logs of h5tojson, jsontoh5
*.log *.log
# ignores output json of main.py
output/*.json
# ---> Python # ---> Python
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/

0
output/placeholder Normal file
View File

View File

@@ -198,7 +198,7 @@ def make_nexus_schema_dictionary(substrate_object, layers):
"duration": layer.post_annealing_duration, "duration": layer.post_annealing_duration,
}, },
} }
return json.dumps(pld_fabrication, indent=2) return pld_fabrication
if __name__=="__main__": if __name__=="__main__":
# TO-DO: place the API base URL somewhere else. # TO-DO: place the API base URL somewhere else.
@@ -209,5 +209,7 @@ if __name__=="__main__":
sample = Entrypoint(data) sample = Entrypoint(data)
substrate_object = chain_entrypoint_to_batch(sample) # Substrate-class object substrate_object = chain_entrypoint_to_batch(sample) # Substrate-class object
layers = chain_entrypoint_to_layers(sample) # list of Layer-class objects layers = chain_entrypoint_to_layers(sample) # list of Layer-class objects
print(make_nexus_schema_dictionary(substrate_object, layers)) # debug result = make_nexus_schema_dictionary(substrate_object, layers)
# print(make_nexus_schema_dictionary(substrate_object, layers)) # debug
with open (f"output/sample-{elabid}.json", "w") as f:
json.dump(result, f, indent=3)