Generate Conversion Script #2
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
name: Generate Conversion Script | |
on: | |
workflow_dispatch | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
jobs: | |
generate-conversion-script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} # checking out the last commit to this branch | |
- 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 dependencies | |
run: | | |
pip install -r scripts/migration_assistant/requirements.txt | |
- name: Retrieve Replaced By Ontology Term Mapping | |
uses: actions/cache/restore@v3 | |
with: | |
path: ./replaced-by.json | |
key: replaced-by-map | |
- name: Run Conversion Script Generator | |
run: | | |
make generate-conversion-script | |
- name: Get Version | |
id: get_version | |
run: | | |
echo "old_version=$(make show-current-version)" >> $GITHUB_ENV | |
- name: setup git | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: remove diff files | |
run: | | |
git rm --ignore-unmatch ./cellxgene_schema_cli/cellxgene_schema/ontology_files/*_diff.txt | |
- name: Bump RC to Major Version | |
run: | | |
pip install bumpversion | |
pip install wheel | |
bumpversion --config-file .bumpversion.cfg prerel --allow-dirty --tag | |
echo "new_version=$(make show-current-version)" >> $GITHUB_ENV | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: 'AUTO: update migrate.py schema_version ${{ env.old_version }}->${{ env.new_version }}' | |
title: 'AUTO: update migrate.py schema_version ${{ env.old_version }}->${{ env.new_version }}' | |
body: 'This is an automated PR to update migrate.py from schema_version ${{ env.old_version }}->${{ env.new_version }}.' | |
branch: auto/update-convert-py-to-${{ env.new_version }} | |
base: main | |
reviewers: ${{ vars.MIGRATION_REVIEWERS }} | |
add-paths: | | |
cellxgene_schema_cli/setup.py | |
cellxgene_schema_cli/cellxgene_schema/__init__.py | |
cellxgene_schema_cli/cellxgene_schema/migrate.py | |
.bumpversion.cfg |