diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1de70ae1..e0827564 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -107,7 +107,7 @@ positional arguments: optional arguments: -h, --help show this help message and exit --okapi_password OKAPI_PASSWORD - pasword for the tenant in the configuration file + password for the tenant in the configuration file --base_folder_path BASE_FOLDER_PATH path to the base folder for this library. Built on migration_repo_template ``` diff --git a/pyproject.toml b/pyproject.toml index 4a2db66a..7ff8e31f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ argparse-prompt = "^0.0.5" deepdiff = "^6.2.3" pyaml = "^21.10.1" httpx = "^0.23.3" +ipykernel = "^6.25.2" python-i18n = "^0.3.9" [tool.poetry.group.dev.dependencies] diff --git a/src/fetch_default_ref_data.py b/src/fetch_default_ref_data.py index 00f8b44a..63252113 100644 --- a/src/fetch_default_ref_data.py +++ b/src/fetch_default_ref_data.py @@ -87,7 +87,7 @@ def main(): def get_ref_data_from_github_folder(owner, repo, folder_path: str): ret_arr = [] try: - logging.info("Using GITHB_TOKEN environment variable for Gihub API Access") + logging.info("Using GITHUB_TOKEN environment variable for Github API Access") github_headers = { "content-type": "application/json", "User-Agent": "Folio Client (https://github.com/FOLIO-FSE/FolioClient)", diff --git a/src/folio_migration_tools/__main__.py b/src/folio_migration_tools/__main__.py index 89016fac..d06fe85b 100644 --- a/src/folio_migration_tools/__main__.py +++ b/src/folio_migration_tools/__main__.py @@ -29,7 +29,7 @@ def parse_args(): ) parser.add_argument( "--okapi_password", - help="pasword for the tenant in the configuration file", + help="password for the tenant in the configuration file", secure=True, ) parser.add_argument( diff --git a/src/folio_migration_tools/mapping_file_transformation/mapping_file_mapper_base.py b/src/folio_migration_tools/mapping_file_transformation/mapping_file_mapper_base.py index 51b458fd..fa0d28c8 100644 --- a/src/folio_migration_tools/mapping_file_transformation/mapping_file_mapper_base.py +++ b/src/folio_migration_tools/mapping_file_transformation/mapping_file_mapper_base.py @@ -788,7 +788,7 @@ def verify_legacy_record(self, legacy_object, idx): missing_keys_in_record, ) else: - logging.info("All maped legacy fields are in the legacy object") + logging.info("All mapped legacy fields are in the legacy object") def get_ref_data_tuple_by_code(self, ref_data, ref_name, code): return self.get_ref_data_tuple(ref_data, ref_name, code, "code") diff --git a/src/folio_migration_tools/mapping_file_transformation/order_mapper.py b/src/folio_migration_tools/mapping_file_transformation/order_mapper.py index a4abb4f7..6b5a98d6 100644 --- a/src/folio_migration_tools/mapping_file_transformation/order_mapper.py +++ b/src/folio_migration_tools/mapping_file_transformation/order_mapper.py @@ -141,7 +141,7 @@ def get_latest_acq_schemas_from_github(owner, repo, module, object): } if os.environ.get("GITHUB_TOKEN"): - logging.info("Using GITHB_TOKEN environment variable for Gihub API Access") + logging.info("Using GITHUB_TOKEN environment variable for Github API Access") github_headers["authorization"] = f"token {os.environ.get('GITHUB_TOKEN')}" # Start talkign to GitHub... diff --git a/src/folio_migration_tools/mapping_file_transformation/organization_mapper.py b/src/folio_migration_tools/mapping_file_transformation/organization_mapper.py index ede8541a..b0a996c8 100644 --- a/src/folio_migration_tools/mapping_file_transformation/organization_mapper.py +++ b/src/folio_migration_tools/mapping_file_transformation/organization_mapper.py @@ -31,7 +31,7 @@ def __init__( ): # Build composite organization schema if os.environ.get("GITHUB_TOKEN"): - logging.info("Using GITHB_TOKEN environment variable for Gihub API Access") + logging.info("Using GITHUB_TOKEN environment variable for Github API Access") organization_schema = OrganizationMapper.get_latest_acq_schemas_from_github( "folio-org", "mod-organizations-storage", "mod-orgs", "organization" ) @@ -131,38 +131,26 @@ def set_up_reference_data_mapping( "categories", ) - if address_categories_map: - self.address_categories_map = RefDataMapping( - *categories_shared_args, address_categories_map, "value", "CategoriesMapping" - ) - else: - self.address_categories_map = None + self.address_categories_map = RefDataMapping( + *categories_shared_args, address_categories_map, "value", "CategoriesMapping" + ) - if email_categories_map: - self.email_categories_map = RefDataMapping( - *categories_shared_args, email_categories_map, "value", "CategoriesMapping" - ) - else: - self.email_categories_map = None + self.email_categories_map = RefDataMapping( + *categories_shared_args, email_categories_map, "value", "CategoriesMapping" + ) - if phone_categories_map: - self.phone_categories_map = RefDataMapping( - *categories_shared_args, phone_categories_map, "value", "CategoriesMapping" - ) - else: - self.phone_categories_map = None - - if organization_types_map: - self.organization_types_map = RefDataMapping( - self.folio_client, - "/organizations-storage/organization-types", - "organizationTypes", - organization_types_map, - "name", - "OrganizationTypeMapping", - ) - else: - self.organization_types_map = None + self.phone_categories_map = RefDataMapping( + *categories_shared_args, phone_categories_map, "value", "CategoriesMapping" + ) + + self.organization_types_map = RefDataMapping( + self.folio_client, + "/organizations-storage/organization-types", + "organizationTypes", + organization_types_map, + "name", + "OrganizationTypeMapping", + ) @staticmethod def get_latest_acq_schemas_from_github(owner, repo, module, object): diff --git a/src/folio_migration_tools/migration_tasks/migration_task_base.py b/src/folio_migration_tools/migration_tasks/migration_task_base.py index 676b9477..8ae6d7d5 100644 --- a/src/folio_migration_tools/migration_tasks/migration_task_base.py +++ b/src/folio_migration_tools/migration_tasks/migration_task_base.py @@ -297,7 +297,7 @@ def load_ref_data_mapping_file( ), ) logging.info( - "%s will be used for determinig %s", + "%s will be used for determining %s", ", ".join(ref_data_map[0].keys()), folio_property_name, )