From 176332251b6c29523bf2c6718ed4745bd9c5aeda Mon Sep 17 00:00:00 2001 From: shamly majeed Date: Fri, 15 Mar 2024 14:22:00 +0100 Subject: [PATCH] updating package structure by moving 'schemas' to 'ingest' --- ingest/api/ingest.py | 2 +- ingest/pyproject.toml | 2 +- ingest/src/__init__.py | 0 ingest/src/{ => ingest}/schemas/bufr_to_e_soh_message.json | 0 ingest/src/{ => ingest}/schemas/e-soh-ingest-spec.json | 0 ingest/src/{ => ingest}/schemas/e-soh-message-spec.json | 0 ingest/src/{ => ingest}/schemas/institution_mapping.json | 0 .../src/{ => ingest}/schemas/netcdf_to_e_soh_message_knmi.json | 0 .../src/{ => ingest}/schemas/netcdf_to_e_soh_message_metno.json | 0 9 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 ingest/src/__init__.py rename ingest/src/{ => ingest}/schemas/bufr_to_e_soh_message.json (100%) rename ingest/src/{ => ingest}/schemas/e-soh-ingest-spec.json (100%) rename ingest/src/{ => ingest}/schemas/e-soh-message-spec.json (100%) rename ingest/src/{ => ingest}/schemas/institution_mapping.json (100%) rename ingest/src/{ => ingest}/schemas/netcdf_to_e_soh_message_knmi.json (100%) rename ingest/src/{ => ingest}/schemas/netcdf_to_e_soh_message_metno.json (100%) diff --git a/ingest/api/ingest.py b/ingest/api/ingest.py index f56b8cbe..649b0aae 100644 --- a/ingest/api/ingest.py +++ b/ingest/api/ingest.py @@ -33,7 +33,7 @@ def __init__( self.uuid_prefix = uuid_prefix if not schema_path: - self.schema_path = pkg_resources.resource_filename("src", "schemas") + self.schema_path = pkg_resources.resource_filename("ingest", "schemas") else: self.schema_path = schema_path if not schema_file: diff --git a/ingest/pyproject.toml b/ingest/pyproject.toml index 8e3e6de9..5a5bce9b 100644 --- a/ingest/pyproject.toml +++ b/ingest/pyproject.toml @@ -24,7 +24,7 @@ classifiers = ["Programming Language :: Python :: 3"] where = ["src"] [tool.setuptools.package-data] -"ingest.schemas" = ["schemas/*.json"] +"ingest.schemas" = ["ingest/schemas/*.json"] [tool.pytest.ini_options] pythonpath = "." diff --git a/ingest/src/__init__.py b/ingest/src/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/ingest/src/schemas/bufr_to_e_soh_message.json b/ingest/src/ingest/schemas/bufr_to_e_soh_message.json similarity index 100% rename from ingest/src/schemas/bufr_to_e_soh_message.json rename to ingest/src/ingest/schemas/bufr_to_e_soh_message.json diff --git a/ingest/src/schemas/e-soh-ingest-spec.json b/ingest/src/ingest/schemas/e-soh-ingest-spec.json similarity index 100% rename from ingest/src/schemas/e-soh-ingest-spec.json rename to ingest/src/ingest/schemas/e-soh-ingest-spec.json diff --git a/ingest/src/schemas/e-soh-message-spec.json b/ingest/src/ingest/schemas/e-soh-message-spec.json similarity index 100% rename from ingest/src/schemas/e-soh-message-spec.json rename to ingest/src/ingest/schemas/e-soh-message-spec.json diff --git a/ingest/src/schemas/institution_mapping.json b/ingest/src/ingest/schemas/institution_mapping.json similarity index 100% rename from ingest/src/schemas/institution_mapping.json rename to ingest/src/ingest/schemas/institution_mapping.json diff --git a/ingest/src/schemas/netcdf_to_e_soh_message_knmi.json b/ingest/src/ingest/schemas/netcdf_to_e_soh_message_knmi.json similarity index 100% rename from ingest/src/schemas/netcdf_to_e_soh_message_knmi.json rename to ingest/src/ingest/schemas/netcdf_to_e_soh_message_knmi.json diff --git a/ingest/src/schemas/netcdf_to_e_soh_message_metno.json b/ingest/src/ingest/schemas/netcdf_to_e_soh_message_metno.json similarity index 100% rename from ingest/src/schemas/netcdf_to_e_soh_message_metno.json rename to ingest/src/ingest/schemas/netcdf_to_e_soh_message_metno.json