Skip to content

Commit

Permalink
fix: adapt to interface change
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Dec 5, 2023
1 parent c15b862 commit 490493d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage = "https://github.com/snakemake/snakemake-storage-plugin-s3"
[tool.poetry.dependencies]
python = "^3.11"
snakemake-interface-common = "^1.12.0"
snakemake-interface-storage-plugins = "^2.0.0"
snakemake-interface-storage-plugins = "^3.0.0"
boto3 = "^1.28.55"
botocore = "^1.31.55"

Expand Down
14 changes: 8 additions & 6 deletions snakemake_storage_plugin_s3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dataclasses import dataclass, field
from typing import Iterable, Optional
from typing import Iterable, List, Optional
from urllib.parse import urlparse

import boto3
Expand Down Expand Up @@ -140,12 +140,14 @@ def __post_init__(self):
)

@classmethod
def example_query(cls) -> ExampleQuery:
def example_queries(cls) -> List[ExampleQuery]:
"""Return an example query with description for this storage provider."""
return ExampleQuery(
query="s3://mybucket/myfile.txt",
description="A file in an S3 bucket",
)
return [
ExampleQuery(
query="s3://mybucket/myfile.txt",
description="A file in an S3 bucket",
)
]

def use_rate_limiter(self) -> bool:
"""Return False if no rate limiting is needed for this provider."""
Expand Down

0 comments on commit 490493d

Please sign in to comment.