Skip to content

Commit e60ecfc

Browse files
authored
Merge pull request #7 from snakemake/feat--refactor
feat: refactor
2 parents 512a9dd + 4ef219a commit e60ecfc

File tree

15 files changed

+750
-339
lines changed

15 files changed

+750
-339
lines changed

.github/workflows/ci_mocked_api.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
env:
1010
PYTHON_VERSION: 3.11
1111

12+
permissions:
13+
id-token: write
14+
contents: read
15+
1216
jobs:
1317
formatting:
1418
runs-on: ubuntu-latest
@@ -84,10 +88,37 @@ jobs:
8488
python-version: ${{ env.PYTHON_VERSION }}
8589
cache: poetry
8690

91+
- name: Set up Docker Compose
92+
run: |
93+
sudo apt-get update
94+
sudo apt-get install docker-compose
95+
- name: Start MinIO service
96+
run: docker-compose -f tests/docker-compose.yml up -d
97+
98+
- name: Install MinIO Client CLI
99+
run: |
100+
curl -O https://dl.min.io/client/mc/release/linux-amd64/mc
101+
chmod +x mc
102+
sudo mv mc /usr/local/bin/
103+
- name: Configure MinIO client
104+
run: |
105+
mc alias set minio http://localhost:9000 minio minio123
106+
87107
- name: Install dependencies
88108
run: poetry install
89109

110+
- name: Configure AWS Credentials
111+
uses: aws-actions/configure-aws-credentials@v4
112+
with:
113+
aws-region: "${{ secrets.SNAKEMAKE_AWS_BATCH_REGION }}"
114+
role-to-assume: "${{ secrets.GH_AWS_ROLE_ARN }}"
115+
role-session-name: "GitHubActions"
116+
90117
- name: Run pytest
118+
env:
119+
SNAKEMAKE_AWS_BATCH_REGION: "${{ secrets.SNAKEMAKE_AWS_BATCH_REGION }}"
120+
SNAKEMAKE_AWS_BATCH_JOB_QUEUE: "${{ secrets.SNAKEMAKE_AWS_BATCH_JOB_QUEUE }}"
121+
SNAKEMAKE_AWS_BATCH_JOB_ROLE: "${{ secrets.SNAKEMAKE_AWS_BATCH_JOB_ROLE }}"
91122
run: poetry run coverage run -m pytest tests/tests_mocked_api.py -v
92123

93124
- name: Run Coverage

.github/workflows/ci_true_api.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
env:
77
PYTHON_VERSION: "3.11"
88

9+
permissions:
10+
id-token: write
11+
contents: read
12+
913
jobs:
1014
testing-true-api:
1115
runs-on: ubuntu-latest
@@ -30,6 +34,17 @@ jobs:
3034
- name: Install Dependencies using Poetry
3135
run: poetry install
3236

37+
- name: Configure AWS Credentials
38+
uses: aws-actions/configure-aws-credentials@v4
39+
with:
40+
aws-region: "${{ secrets.SNAKEMAKE_AWS_BATCH_REGION }}"
41+
role-to-assume: "${{ secrets.GH_AWS_ROLE_ARN }}"
42+
role-session-name: "GitHubActions"
43+
3344
- name: Run pytest
45+
env:
46+
SNAKEMAKE_AWS_BATCH_REGION: "${{ secrets.SNAKEMAKE_AWS_BATCH_REGION }}"
47+
SNAKEMAKE_AWS_BATCH_JOB_QUEUE: "${{ secrets.SNAKEMAKE_AWS_BATCH_JOB_QUEUE }}"
48+
SNAKEMAKE_AWS_BATCH_JOB_ROLE: "${{ secrets.SNAKEMAKE_AWS_BATCH_JOB_ROLE }}"
3449
run:
3550
poetry run pytest tests/tests_true_api.py -v

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,7 @@ cython_debug/
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161161

162-
poetry.lock
162+
poetry.lock
163+
164+
.terraform*
165+
terraform.tfstate*

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"black-formatter.interpreter": [
3+
"./.venv/bin/python"
4+
],
5+
"flake8.interpreter": [
6+
"./.venv/bin/python"
7+
],
8+
"files.saveConflictResolution": "overwriteFileOnDisk"
9+
}

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ keywords = ["snakemake", "plugin", "executor", "aws-batch"]
1010

1111
[tool.poetry.dependencies]
1212
python = "^3.11"
13-
snakemake-interface-common = "^1.15.0"
14-
snakemake-interface-executor-plugins = "^9.0.0"
15-
boto3 = "^1.33.11"
13+
snakemake-interface-common = "^1.17.4"
14+
snakemake-interface-executor-plugins = "^9.3.2"
15+
boto3 = "^1.36.5"
1616

1717
[tool.poetry.group.dev.dependencies]
1818
black = "^23.11.0"

0 commit comments

Comments
 (0)