Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A slimmed down version of CHEBI sufficient to cover 99% of the term needs across

1. Make a Pull request on https://github.com/obophenotype/chebi_obo_slim/blob/main/seed.txt. In the PR, indicate which terms you are adding (at least the ids) and for which ontology.
2. If you are a member of obophenotype organisation:
- You should make sure seed.txt is sorted alphanumerically
- You should make sure seed.txt is sorted alphanumerically by running `python scripts/sort.py`
- Merge the changes without review at your own discretion
3. If you are not a member of obophenotype organisation:
- Wait until a member of obophenotype deals with your PR
Expand Down
16 changes: 16 additions & 0 deletions scripts/sort.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""Run this script to sort the ``seed.txt`` file."""

from pathlib import Path

HERE = Path(__file__).parent.resolve()
ROOT = HERE.parent.resolve()
SEED_PATH = ROOT.joinpath("seed.txt")


def main():
curies = set(SEED_PATH.read_text().splitlines())
SEED_PATH.write_text("\n".join(sorted(curies)))


if __name__ == "__main__":
main()