From 284d86f38955122df10be993c9ff6a6aa07b14f0 Mon Sep 17 00:00:00 2001 From: Harriet Dashnow Date: Mon, 9 Dec 2024 11:20:41 -0700 Subject: [PATCH 1/2] add short CI workflow (requires python only, no R) --- .github/workflows/update-loci.yaml | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/update-loci.yaml diff --git a/.github/workflows/update-loci.yaml b/.github/workflows/update-loci.yaml new file mode 100644 index 0000000..59bc23f --- /dev/null +++ b/.github/workflows/update-loci.yaml @@ -0,0 +1,55 @@ +name: Update data + +on: + pull_request: + branches: main + paths: + - "data/**" + - "scripts/**" + - "workflow/**" + - ".github/workflows/**" + workflow_dispatch: + +jobs: + update: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + strategy: + fail-fast: false + + steps: + - name: Debug dump + uses: crazy-max/ghaction-dump-context@v2 + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Miniconda environment + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + activate-environment: strchive + environment-file: scripts/environment.yml + python-version: 3.12 + auto-activate-base: false + - run: | + conda info + + - name: Check loci and update bed files (short) + if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'}} + run: snakemake --config stages="skip-refs" + + - name: Open pull request with updated files + if: ${{ !(github.event_name == 'pull_request') }} + uses: peter-evans/create-pull-request@v7 + with: + branch: update-data + title: Update data + + - name: Commit updated files to current pull request + if: ${{ github.event_name == 'pull_request' }} + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Update data \ No newline at end of file From cb667c812a6fbdce3bce74c4206a36a11adc8246 Mon Sep 17 00:00:00 2001 From: hdashnow Date: Mon, 9 Dec 2024 19:40:32 +0000 Subject: [PATCH 2/2] Update data --- .../setup-miniconda-patched-environment.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 scripts/setup-miniconda-patched-environment.yml diff --git a/scripts/setup-miniconda-patched-environment.yml b/scripts/setup-miniconda-patched-environment.yml new file mode 100644 index 0000000..52c06b7 --- /dev/null +++ b/scripts/setup-miniconda-patched-environment.yml @@ -0,0 +1,23 @@ +name: strchive +channels: + - bioconda + - conda-forge +dependencies: + - pandas + - numpy + - biopython + - defopt + - snakemake + - jsbeautifier + - r-base + - r-essentials + - r-jsonlite + - r-dplyr + - r-rentrez + - r-easypubmed + - r-stringr + - r-purrr + - pip + - pip: + - manubot + - python=3.12