Skip to content

Commit

Permalink
fix: adapt to API changes in Snakemake 8
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Oct 27, 2023
1 parent e44c1e1 commit 4c12093
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,24 @@ jobs:
- name: Check out the code
uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install poetry
run: pipx install poetry
run: pip install poetry

- name: Determine dependencies
run: poetry lock

- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
cache: poetry

- name: Install Dependencies using Poetry
run: poetry install
- name: Install dependencies
run: |
poetry install
- name: Check formatting
run: poetry run black --check .
Expand All @@ -36,19 +41,24 @@ jobs:
- name: Check out the code
uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install poetry
run: pipx install poetry
run: pip install poetry

- name: Determine dependencies
run: poetry lock

- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
cache: poetry

- name: Install Dependencies using Poetry
run: poetry install
- name: Install dependencies
run: |
poetry install
- name: Check code
run: poetry run flake8
Expand All @@ -68,15 +78,19 @@ jobs:

- uses: koesterlab/setup-slurm-action@v1

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install poetry
run: pipx install poetry
run: pip install poetry

- name: Determine dependencies
run: poetry lock

- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
cache: poetry

- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ authors = [
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
snakemake-interface-common = "^1.12.0"
snakemake-interface-executor-plugins = "^6.0.0"
snakemake-executor-plugin-slurm-jobstep = "^0.1.0"
python = "^3.11"
snakemake-interface-common = "^1.13.0"
snakemake-interface-executor-plugins = "^7.0.0"
snakemake-executor-plugin-slurm-jobstep = "^0.1.4"
throttler = "^1.2.2"

[tool.poetry.group.dev.dependencies]
Expand Down
25 changes: 7 additions & 18 deletions snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,19 @@
# filesystem (True) or not (False).
# This is e.g. the case for cloud execution.
implies_no_shared_fs=False,
pass_default_storage_provider_args=True,
pass_default_resources_args=True,
pass_envvar_declarations_to_cmd=False,
auto_deploy_default_storage_provider=False,
# wait a bit until slurmdbd has job info available
init_seconds_before_status_checks=40
)


# Required:
# Implementation of your executor
class Executor(RemoteExecutor):
def __init__(
self,
workflow: WorkflowExecutorInterface,
logger: LoggerExecutorInterface,
):
super().__init__(
workflow,
logger,
# configure behavior of RemoteExecutor below
# whether arguments for setting the remote provider shall be passed to jobs
pass_default_storage_provider_args=True,
# whether arguments for setting default resources shall be passed to jobs
pass_default_resources_args=True,
# whether environment variables shall be passed to jobs
pass_envvar_declarations_to_cmd=False,
# wait a bit until slurmdbd has job info available
init_seconds_before_status_checks=40,
)
def __post_init__(self):
self.run_uuid = str(uuid.uuid4())
self._fallback_account_arg = None
self._fallback_partition = None
Expand Down

0 comments on commit 4c12093

Please sign in to comment.