Generate Ontology Descendant Mappings #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is a github actions that run every monday at 12am. It will run generate_decendant_mapping.py off the main | |
# github branch and open a pull request to commit the new ontology_decendant files to cellxgene-ontology-guide | |
name: Generate Ontology Descendant Mappings | |
on: | |
schedule: | |
- cron: "0 0 * * 1" | |
push: | |
paths: | |
- "**/ontology-assets/**.json" | |
- "**/ontology-assets/**.gz" | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
jobs: | |
generate-ontology-descendant-mappings: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
fetch-depth: 1 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Python cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: setup git | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
- name: install requirements | |
run: | | |
cd ./tools/ontology-builder/ | |
pip install -r requirements.txt | |
- name: generate ontology descendant mappings | |
run: | | |
python3 tools/ontology-builder/src/descendent_mapping_generator.py | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
add-paths: | | |
./ontology-assets/*.json | |
commit-message: "chore: update ontology descendant mappings" | |
title: "chore: update ontology descendant mappings" | |
branch: update-ontology-descendant-mappings | |
base: main | |
signoff: true | |
draft: false |