Skip to content

Commit 61f5667

Browse files
authored
Merge pull request Reed-CompBio#239 from tristan-f-r/yamlfmt
style: yamlfmt
2 parents 8278f17 + a3ceb11 commit 61f5667

12 files changed

Lines changed: 468 additions & 485 deletions

File tree

.github/workflows/test-spras.yml

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ jobs:
1111
matrix:
1212
os: [macos-latest, windows-latest]
1313
steps:
14-
- name: Checkout repository
15-
uses: actions/checkout@v2
16-
- name: Install conda environment
17-
uses: conda-incubator/setup-miniconda@v2
18-
with:
19-
activate-environment: spras
20-
environment-file: environment.yml
21-
auto-activate-base: false
22-
miniconda-version: 'latest'
23-
# Log conda environment contents
24-
- name: Log conda environment
25-
shell: bash --login {0}
26-
run: conda list
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
- name: Install conda environment
17+
uses: conda-incubator/setup-miniconda@v2
18+
with:
19+
activate-environment: spras
20+
environment-file: environment.yml
21+
auto-activate-base: false
22+
miniconda-version: 'latest'
23+
# Log conda environment contents
24+
- name: Log conda environment
25+
shell: bash --login {0}
26+
run: conda list
2727

2828
# Runs the test code and Snakemake workflow in the conda environment
2929
test:
@@ -34,47 +34,47 @@ jobs:
3434
matrix:
3535
os: [ubuntu-latest]
3636
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v2
39-
- name: Install conda environment
40-
uses: conda-incubator/setup-miniconda@v2
41-
with:
42-
activate-environment: spras
43-
environment-file: environment.yml
44-
auto-activate-base: false
45-
miniconda-version: 'latest'
46-
# Install spras in the environment using pip
47-
- name: Install spras in conda env
48-
shell: bash --login {0}
49-
run: pip install .
50-
# Log conda environment contents
51-
- name: Log conda environment
52-
shell: bash --login {0}
53-
run: conda list
54-
# Formerly used Singularity instead of Apptainer (see https://github.com/eWaterCycle/setup-singularity/issues/6)
55-
- name: Install Apptainer
56-
uses: eWaterCycle/setup-apptainer@v2
57-
with:
58-
# Choose version from https://github.com/apptainer/apptainer/releases
59-
apptainer-version: 1.3.6
60-
- name: Run tests
61-
shell: bash --login {0}
62-
# Verbose output and disable stdout and stderr capturing
63-
run: pytest -vs
64-
- name: Run Snakemake workflow
65-
shell: bash --login {0}
66-
run: snakemake --cores 2 --configfile config/config.yaml --show-failed-logs
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
- name: Install conda environment
40+
uses: conda-incubator/setup-miniconda@v2
41+
with:
42+
activate-environment: spras
43+
environment-file: environment.yml
44+
auto-activate-base: false
45+
miniconda-version: 'latest'
46+
# Install spras in the environment using pip
47+
- name: Install spras in conda env
48+
shell: bash --login {0}
49+
run: pip install .
50+
# Log conda environment contents
51+
- name: Log conda environment
52+
shell: bash --login {0}
53+
run: conda list
54+
# Formerly used Singularity instead of Apptainer (see https://github.com/eWaterCycle/setup-singularity/issues/6)
55+
- name: Install Apptainer
56+
uses: eWaterCycle/setup-apptainer@v2
57+
with:
58+
# Choose version from https://github.com/apptainer/apptainer/releases
59+
apptainer-version: 1.3.6
60+
- name: Run tests
61+
shell: bash --login {0}
62+
# Verbose output and disable stdout and stderr capturing
63+
run: pytest -vs
64+
- name: Run Snakemake workflow
65+
shell: bash --login {0}
66+
run: snakemake --cores 2 --configfile config/config.yaml --show-failed-logs
6767

6868
# Run pre-commit checks on source files
6969
pre-commit:
7070
name: Run pre-commit checks
7171
runs-on: ubuntu-latest
7272
steps:
73-
- name: Checkout repository
74-
uses: actions/checkout@v3
75-
- name: Setup Python
76-
uses: actions/setup-python@v4
77-
with:
78-
python-version: '3.11' # Match this to the version specified in environment.yml
79-
- name: Run pre-commit checks
80-
uses: pre-commit/action@v3.0.0
73+
- name: Checkout repository
74+
uses: actions/checkout@v3
75+
- name: Setup Python
76+
uses: actions/setup-python@v4
77+
with:
78+
python-version: '3.11' # Match this to the version specified in environment.yml
79+
- name: Run pre-commit checks
80+
uses: pre-commit/action@v3.0.0

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default_language_version:
66
python: python3.11
77
repos:
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v4.4.0 # Use the ref you want to point at
9+
rev: v4.4.0 # Use the ref you want to point at
1010
hooks:
1111
# Attempts to load all yaml files to verify syntax.
1212
- id: check-yaml
@@ -24,3 +24,7 @@ repos:
2424
rev: 'v0.0.269'
2525
hooks:
2626
- id: ruff
27+
- repo: https://github.com/google/yamlfmt
28+
rev: v0.17.0
29+
hooks:
30+
- id: yamlfmt

.yamlfmt.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
formatter:
2+
retain_line_breaks_single: true

0 commit comments

Comments
 (0)