From 21a7ff052008beeda81f2aa060540e5c66944419 Mon Sep 17 00:00:00 2001 From: erinhmclark Date: Mon, 27 Jan 2025 08:43:18 +0000 Subject: [PATCH] Fix types in manifests --- src/auto_archiver/modules/atlos/__manifest__.py | 4 ++-- src/auto_archiver/modules/atlos_db/__manifest__.py | 2 +- .../modules/atlos_feeder/__manifest__.py | 4 ++-- .../modules/gsheet_feeder/gsheet_feeder.py | 14 +++++++------- .../modules/hash_enricher/__manifest__.py | 1 + 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/auto_archiver/modules/atlos/__manifest__.py b/src/auto_archiver/modules/atlos/__manifest__.py index ec356a5..459fefe 100644 --- a/src/auto_archiver/modules/atlos/__manifest__.py +++ b/src/auto_archiver/modules/atlos/__manifest__.py @@ -15,12 +15,12 @@ "api_token": { "default": None, "help": "An Atlos API token. For more information, see https://docs.atlos.org/technical/api/", - "type": str, + "type": "str", }, "atlos_url": { "default": "https://platform.atlos.org", "help": "The URL of your Atlos instance (e.g., https://platform.atlos.org), without a trailing slash.", - "type": str, + "type": "str", }, }, "description": """ diff --git a/src/auto_archiver/modules/atlos_db/__manifest__.py b/src/auto_archiver/modules/atlos_db/__manifest__.py index 941206f..42ce560 100644 --- a/src/auto_archiver/modules/atlos_db/__manifest__.py +++ b/src/auto_archiver/modules/atlos_db/__manifest__.py @@ -15,7 +15,7 @@ "atlos_url": { "default": "https://platform.atlos.org", "help": "The URL of your Atlos instance (e.g., https://platform.atlos.org), without a trailing slash.", - "type": str + "type": "str" }, }, "description": """ diff --git a/src/auto_archiver/modules/atlos_feeder/__manifest__.py b/src/auto_archiver/modules/atlos_feeder/__manifest__.py index 91fed32..0d90c8b 100644 --- a/src/auto_archiver/modules/atlos_feeder/__manifest__.py +++ b/src/auto_archiver/modules/atlos_feeder/__manifest__.py @@ -9,12 +9,12 @@ "api_token": { "default": None, "help": "An Atlos API token. For more information, see https://docs.atlos.org/technical/api/", - "type": str + "type": "str" }, "atlos_url": { "default": "https://platform.atlos.org", "help": "The URL of your Atlos instance (e.g., https://platform.atlos.org), without a trailing slash.", - "type": str + "type": "str" }, }, "description": """ diff --git a/src/auto_archiver/modules/gsheet_feeder/gsheet_feeder.py b/src/auto_archiver/modules/gsheet_feeder/gsheet_feeder.py index 321711e..b57174f 100644 --- a/src/auto_archiver/modules/gsheet_feeder/gsheet_feeder.py +++ b/src/auto_archiver/modules/gsheet_feeder/gsheet_feeder.py @@ -22,13 +22,13 @@ from . import GWorksheet class GsheetsFeeder(Feeder): name = "gsheet_feeder" - # def __init__(self, config: dict) -> None: - # """ - # Initializes the GsheetsFeeder with preloaded configurations. - # """ - # super().__init__(config) - # # Initialize the gspread client with the provided service account file - # self.gsheets_client = gspread.service_account(filename=config["service_account"]) + def __init__(self) -> None: + """ + Initializes the GsheetsFeeder with preloaded configurations. + """ + super().__init__() + # Initialize the gspread client with the provided service account file + # self.gsheets_client = gspread.service_account(filename=self.config["service_account"]) # # # Set up feeder-specific configurations from the config # self.sheet_name = config.get("sheet") diff --git a/src/auto_archiver/modules/hash_enricher/__manifest__.py b/src/auto_archiver/modules/hash_enricher/__manifest__.py index eef1963..a7697b9 100644 --- a/src/auto_archiver/modules/hash_enricher/__manifest__.py +++ b/src/auto_archiver/modules/hash_enricher/__manifest__.py @@ -7,6 +7,7 @@ }, "configs": { "algorithm": {"default": "SHA-256", "help": "hash algorithm to use", "choices": ["SHA-256", "SHA3-512"]}, + # TODO add non-negative requirement to match previous implementation? "chunksize": {"default": 1.6e7, "help": "number of bytes to use when reading files in chunks (if this value is too large you will run out of RAM), default is 16MB"}, }, "description": """