Skip to content

Commit

Permalink
fix: adapt to interface changes
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Nov 20, 2023
1 parent dd8e432 commit b7f3219
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 30 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ 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

Expand All @@ -21,7 +25,7 @@ jobs:

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

- name: Install Dependencies using Poetry
Expand All @@ -36,6 +40,10 @@ 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

Expand All @@ -44,7 +52,7 @@ jobs:

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

- name: Install Dependencies using Poetry
Expand All @@ -58,6 +66,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install poetry
run: pipx install poetry

Expand All @@ -66,12 +78,11 @@ jobs:

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

- name: Install dependencies
run: |
poetry install
- name: Install Dependencies using Poetry
run: poetry install

- name: Run pytest
run: poetry run coverage run -m pytest tests/tests.py
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install poetry
run: pipx install poetry
Expand All @@ -36,13 +36,11 @@ jobs:

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

- name: Install Dependencies using Poetry
run: |
pip install connection-pool # because it is incompatible with poetry
poetry install
run: poetry install

- name: Publish to PyPi
env:
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ authors = ["Johannes Koester <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
python = "^3.11"
snakemake-interface-common = "^1.13.0"
snakemake-interface-executor-plugins = "^7.0.0"

snakemake-interface-executor-plugins = "^8.0.0"

[tool.poetry.group.dev.dependencies]
black = "^23.7.0"
Expand Down
20 changes: 5 additions & 15 deletions snakemake_executor_plugin_cluster_sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,17 @@ class ExecutorSettings(ExecutorSettingsBase):
# filesystem (True) or not (False).
# This is e.g. the case for cloud execution.
implies_no_shared_fs=False,
job_deploy_sources=False,
pass_default_storage_provider_args=True,
pass_default_resources_args=True,
pass_envvar_declarations_to_cmd=True,
auto_deploy_default_storage_provider=False,
)


# Required:
# Implementation of your executor
class Executor(RemoteExecutor):
def __init__(
self,
workflow: WorkflowExecutorInterface,
logger: LoggerExecutorInterface,
):
super().__init__(
workflow,
logger,
# 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=True,
)

def run_job(self, job: JobExecutorInterface):
# Implement here how to run a job.
Expand Down

0 comments on commit b7f3219

Please sign in to comment.