Skip to content

Commit

Permalink
chore: deploy api when ontology_info.json changes (#194)
Browse files Browse the repository at this point in the history
## Reason for Change

The API needs to be updated whenever ontology_info.json or any ontology
sources files are updates. This is so it is always has the most recent
cellxgene-schema and ontology files supported by COG.

## Changes
- modify generate_all_ontology.yml, to update
ontology-assets-version.txt in the python API. This will trigger a
release of the API as well as the ontology-assets when the PR merged.

## Testing steps

- ran the GHA and verified ontology-assets-versions.txt was created when
generate_all_ontology.yml runs.

## Notes for Reviewer

---------

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
Bento007 and github-actions authored Apr 11, 2024
1 parent d38ba65 commit 40d58f6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/generate_all_ontology.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
python3 ./tools/ontology-builder/src/all_ontology_generator.py
git add ./ontology-assets/*.json.gz
git add ./ontology-assets/ontology_info.json
- name: update API
run: |
echo "${{ github.sha }}" > ./api/python/ontology-assets-version.txt
git add ./api/python/ontology-assets-version.txt
- name: Commit
run: |
git commit -m "AUTO: update ontologies"
Expand Down
2 changes: 2 additions & 0 deletions api/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ The [release.yml](../../.github/workflows/release.yml) GHA should handle the rel
make build
make release/pypi
```

The file [ontology-assets-version.json](./ontology-assets-version.json) will be automatically updated with a new version number whenever new ontology-assets are released. This will trigger a new release of the pypi package with the new ontology-assets.
1 change: 1 addition & 0 deletions api/python/ontology-assets-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
da5ad20b326bd7e5c5ae2569cab3aa70d38e2a0e
2 changes: 1 addition & 1 deletion ontology-assets/ontology_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@
}
}
}
}
}

0 comments on commit 40d58f6

Please sign in to comment.