Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: create standalone gha for updating ontology mappings powering dp fe filters #705

Merged
merged 2 commits into from
Dec 13, 2023
Merged
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
53 changes: 53 additions & 0 deletions .github/workflows/update-ontology-mappings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Run Scripts and Update FE Filter Ontology Mappings

on:
workflow_dispatch

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
update-ontology-mappings:
runs-on: macos-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-west-2
role-to-assume: ${{ secrets.AWS_PROD_ROLE_TO_ASSUME }}
role-duration-seconds: 1800
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Python cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: install homebrew requirements
run: brew install graphviz
- name: install requirements
run: |
pip install -r scripts/compute_mappings/requirements.txt
- name: Generate Ontology Scripts
run: |
./scripts/compute_mappings/compute_tissue_and_cell_type_mappings.py
./scripts/compute_mappings/compute_ancestor_mapping.py
- name: Push Updated Ontology Mappings to S3
run: |
aws s3 sync --exclude="*" --include="*ontology_mapping.json" scripts/compute_mappings s3://cellxgene-schema-ref-files-prod/ontology-mappings/backend
aws s3 sync --exclude="*" --include="*descendants.json" scripts/compute_mappings s3://cellxgene-schema-ref-files-prod/ontology-mappings/frontend
aws s3 sync --exclude="*" --include="*.gz" cellxgene_schema_cli/cellxgene_schema/ontology_files s3://cellxgene-schema-ref-files-prod/ontology-mappings/gzips
- name: Trigger Data Portal to pull latest ontology mappings
run: |
curl -X POST https://api.github.com/repos/chanzuckerberg/single-cell-data-portal/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
--header 'authorization: Bearer ${{ secrets.CZIBUILDBOT_GITHUB_TOKEN }}' \
--data '{"event_type": "pull-ontology-mappings"}'
Loading