Skip to content

Commit

Permalink
update workflows (#17)
Browse files Browse the repository at this point in the history
* Delete .github/workflows/conventional-prs.yml
* update test workflow based on scattr
* limit to python 3.11, since 3.12 was failing tests
* add dev dependencies with updated snakefmt (needed for github action)
* formatting with updated snakefmt
  • Loading branch information
akhanf authored Apr 3, 2024
1 parent df5008c commit 495790e
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 73 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/conventional-prs.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/main.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Lint and test workflow
on:
push:
branches: ['*', '!push-action/*']
pull_request:
branches: ['*', '!push-action/*']
jobs:
quality:
name: Lint code
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- name: Setup Python environment
uses: khanlab/actions/.github/actions/[email protected]
with:
python-version: '3.11'
- name: snakemake lint
run: poetry run snakemake --lint
- name: snakefmt
run: poetry run snakefmt --check workflow
test:
runs-on: ubuntu-latest
needs: [quality]
strategy:
matrix:
python-version: ['3.11']
steps:
- name: Setup Python environments
uses: khanlab/actions/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
install-library: true
- name: Integration dry-run test
run: poetry run snakemake -np
93 changes: 89 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ readme = "README.md"
packages = []

[tool.poetry.dependencies]
python = ">=3.11,<3.13"
python = ">=3.11,<3.12"
snakemake = "<8.0.0"
pulp = "2.7.0"
snakebids = "0.11.0"

[tool.poetry.group.dev.dependencies]
snakefmt = "^0.10.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
6 changes: 3 additions & 3 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def get_all_targets():
subject=datasets.loc[i, "subject"],
sample=datasets.loc[i, "sample"],
acq=datasets.loc[i, "acq"],
extension="ome.zarr.zip"
if config["ome_zarr"]["use_zipstore"]
else "ome.zarr",
extension=(
"ome.zarr.zip" if config["ome_zarr"]["use_zipstore"] else "ome.zarr"
),
)
)
targets.extend(
Expand Down

0 comments on commit 495790e

Please sign in to comment.