Skip to content

Commit

Permalink
fix generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bento007 committed Feb 17, 2024
1 parent ad3c2d6 commit 53ac716
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate_curated_lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
- name: ontology-processing
run: |
python3 ./tools/ontology-builder/src/curated_lists.py
- name: Commit
run: |
git add ./tools/ontology-builder/src/ontology-references/tissue_general_list.json
git add ./tools/ontology-builder/src/ontology-references/organ_list.json
git add ./tools/ontology-builder/src/ontology-references/cell_class_list.json
git add ./tools/ontology-builder/src/ontology-references/cell_subclass_list.json
git add ./tools/ontology-builder/src/ontology-references/system_list.json
- name: Commit
run: |
git commit -m "AUTO: update curated_lists"
git push
1 change: 1 addition & 0 deletions tools/ontology-builder/src/curated_lists.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#
# # Hand-Curation of Systems and Organs
# ## Tissue Constants
# ### Hand-curated systems.
Expand Down
4 changes: 2 additions & 2 deletions tools/ontology-builder/src/curation_list_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ def reformat_ontology_term_ids(d: List[str]) -> List[str]:
return [i.replace("_", ":") for i in d]


def main(path: str = "ontology-references") -> None:
def main(path: str = env.ONTOLOGY_REF_DIR) -> None:
"""
Using the dictionarys from curated_list.py, generate a json file that matches the JSON schema in artifact-schemas
:param path: The destination path for the json files
:return:
"""
# Create a dictionary that matches the JSON schema in artifact-schemas
with open(os.path.join(env.ONTOLOGY_REF_DIR, "system_list.json"), "w") as f:
with open(os.path.join(path, "system_list.json"), "w") as f:
json.dump(reformat_ontology_term_ids(SYSTEM_TISSUES), f, indent=0)

with open(os.path.join(path, "organ_list.json"), "w") as f:
Expand Down

0 comments on commit 53ac716

Please sign in to comment.