Skip to content

Commit

Permalink
Add yamlfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Sep 26, 2023
1 parent 03f9a25 commit fcb8900
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 56 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:


lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ~3
- run: pip install snakefmt
- run: snakefmt --check --compact-diff .
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ~3
- run: pip install snakefmt
- run: snakefmt --check --compact-diff .
64 changes: 32 additions & 32 deletions .github/workflows/fetch-and-ingest-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,38 @@ jobs:
fetch-and-ingest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nextstrain/.github/actions/setup-nextstrain-cli@master
with:
cli-version: ">=7.1.0"
python-version: "3.10"
- uses: actions/checkout@v3
- uses: nextstrain/.github/actions/setup-nextstrain-cli@master
with:
cli-version: ">=7.1.0"
python-version: "3.10"

- name: install-pyyaml
run: python3 -m pip install pyyaml
- name: install-pyyaml
run: python3 -m pip install pyyaml

- name: run_pipeline
run: |
GITHUB_BRANCH=${GITHUB_REF#refs/heads/}
./bin/set-branch-ingest-config \
--config-yaml ingest/config/optional.yaml \
--s3-dst s3://nextstrain-data/files/workflows/monkeypox/branch/"${GITHUB_BRANCH}" \
> ingest/config/optional-branch.yaml
- name: run_pipeline
run: |
GITHUB_BRANCH=${GITHUB_REF#refs/heads/}
./bin/set-branch-ingest-config \
--config-yaml ingest/config/optional.yaml \
--s3-dst s3://nextstrain-data/files/workflows/monkeypox/branch/"${GITHUB_BRANCH}" \
> ingest/config/optional-branch.yaml
nextstrain build \
--aws-batch \
--detach \
--no-download \
--cpus 32 \
--memory 64gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
ingest \
--configfiles config/config.yaml config/optional-branch.yaml \
--config trigger_rebuild=False
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_RUN_ID: ${{ github.run_id }}
nextstrain build \
--aws-batch \
--detach \
--no-download \
--cpus 32 \
--memory 64gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
ingest \
--configfiles config/config.yaml config/optional-branch.yaml \
--config trigger_rebuild=False
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_RUN_ID: ${{ github.run_id }}
2 changes: 1 addition & 1 deletion .github/workflows/fetch-and-ingest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
# - https://crontab.guru/
#
# Runs at 4pm UTC (12pm EDT) since curation by NCBI happens on the East Coast.
- cron: '0 16 * * *'
- cron: '0 16 * * *'

repository_dispatch:
types:
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/rebuild-hmpxv1-big.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ jobs:
GITHUB_RUN_ID: ${{ github.run_id }}
SLACK_CHANNELS: monkeypox-updates
run: |
nextstrain build \
--detach \
--no-download \
--cpus 8 \
--memory 68gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
--env SLACK_TOKEN \
--env SLACK_CHANNELS \
phylogenetic \
notify_on_deploy \
--configfiles config/hmpxv1_big/config.yaml config/nextstrain_automation.yaml \
--config auspice_prefix=$TRIAL_NAME
nextstrain build \
--detach \
--no-download \
--cpus 8 \
--memory 68gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
--env SLACK_TOKEN \
--env SLACK_CHANNELS \
phylogenetic \
notify_on_deploy \
--configfiles config/hmpxv1_big/config.yaml config/nextstrain_automation.yaml \
--config auspice_prefix=$TRIAL_NAME
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ repos:
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/google/yamlfmt
rev: v0.10.0
hooks:
- id: yamlfmt
7 changes: 7 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
exclude:
- ingest/
formatter:
type: basic
line_ending: lf
retain_line_breaks: true
max_line_length: 120

0 comments on commit fcb8900

Please sign in to comment.