diff --git a/CHANGELOG.md b/CHANGELOG.md index 748b785..d8ef1de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v24.32.1 + +- Minor fix to accept file_pattern arg in list_files method. + ## v24.32.0 - List all files on GCP bucket and perform regex pattern matching to return files. diff --git a/pyproject.toml b/pyproject.toml index 1798cf1..0a5a4eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "otf-addons-gcp" -version = "v24.32.0" +version = "v24.32.1" authors = [{ name = "Aldo Troiano", email = "a.troiano@reply.com" }] license = { text = "GPLv3" } classifiers = [ @@ -51,7 +51,7 @@ dev = [ profile = 'black' [tool.bumpver] -current_version = "v24.32.0" +current_version = "v24.32.1" version_pattern = "vYY.WW.PATCH[-TAG]" commit_message = "bump version {old_version} -> {new_version}" commit = true diff --git a/src/opentaskpy/addons/gcp/remotehandlers/bucket.py b/src/opentaskpy/addons/gcp/remotehandlers/bucket.py index 0118e65..8fcbfaf 100644 --- a/src/opentaskpy/addons/gcp/remotehandlers/bucket.py +++ b/src/opentaskpy/addons/gcp/remotehandlers/bucket.py @@ -264,18 +264,20 @@ def create_flag_files(self) -> int: """Not implemented for this transfer type.""" raise NotImplementedError - def list_files(self, directory: str | None = None) -> list: + def list_files( + self, directory: str | None = None, file_pattern: str | None = None + ) -> list: """List Files in GCP with pagination and local regex matching. Args: directory (str): A directory to list on the bucket. + file_pattern (str): File pattern to match files. Returns: list: A list of filenames if successful, an empty list if not. """ self.logger.info("Listing Files in Bucket.") try: - file_pattern = self.spec["fileRegex"] directory = directory or self.spec.get("directory", "") base_url = (