Skip to content

Commit

Permalink
Merge branch 'main' into fix--ci-python-version
Browse files Browse the repository at this point in the history
  • Loading branch information
jakevc authored Nov 15, 2023
2 parents 53bf834 + 44b3790 commit 7cdadbf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion poetry_snakemake_plugin/templates/storage-plugins/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ async def inventory(self, cache: IOCacheStorageInterface):
# This is optional and can be left as is

# If this is implemented in a storage object, results have to be stored in
# the given IOCache object.
# the given IOCache object, using self.cache_key() as key.
# Optionally, this can take a custom local suffix, needed e.g. when you want
# to cache more items than the current query: self.cache_key(local_suffix=...)
pass

def get_inventory_parent(self) -> Optional[str]:
Expand Down Expand Up @@ -168,4 +170,6 @@ def list_candidate_matches(self) -> Iterable[str]:
"""Return a list of candidate matches in the storage for the query."""
# This is used by glob_wildcards() to find matches for wildcards in the query.
# The method has to return concretized queries without any remaining wildcards.
# Use snakemake_executor_plugins.io.get_constant_prefix(self.query) to get the
# prefix of the query before the first wildcard.
...
7 changes: 6 additions & 1 deletion poetry_snakemake_plugin/templates/storage-plugins/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@

class TestStorageNoSettings(TestStorageBase):
__test__ = True
retrieve_only = True
retrieve_only = False # set to True if the storage is read-only

def get_query(self) -> str:
# Return a query. If retrieve_only is True, this should be a query that
# is present in the storage, as it will not be created.
...

def get_query_not_existing(self) -> str:
...

def get_storage_provider_cls(self) -> Type[StorageProviderBase]:
Expand Down

0 comments on commit 7cdadbf

Please sign in to comment.