Skip to content

Commit

Permalink
Merge pull request #60 from meaningfy-ws/feature/TED-192
Browse files Browse the repository at this point in the history
moved resources out of metadata normaliser
  • Loading branch information
Dragos0000 authored Apr 14, 2022
2 parents 98d0811 + 7646d6e commit 11d18ff
Show file tree
Hide file tree
Showing 24 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ logging-add-dotenv-file:
@ sed -i '/^LOGGING_TYPE/d' .env
@ echo LOGGING_TYPE=PY,ELK >> .env

refresh-normaliser-mapping-files:
@ python -m ted_sws.metadata_normaliser.entrypoints.generate_mapping_resources
refresh-mapping-files:
@ python -m ted_sws.data_manager.entrypoints.generate_mapping_resources

#clean-mongo-db:
# @ export PYTHONPATH=$(PWD) && python ./tests/clean_mongo_db.py
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def open_local(paths, mode="r", encoding="utf8"):
entry_points={
"console_scripts": [
"transformer = ted_sws.notice_transformer.entrypoints.cmd_mapping_suite_transformer:main",
"normalisation_resource_generator = ted_sws.metadata_normaliser.entrypoints.generate_mapping_resources:main"
"normalisation_resource_generator = ted_sws.data_manager.entrypoints.generate_mapping_resources:main"
],
},
include_package_data=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import click
from ted_sws.core.adapters.sparql_triple_store import SPARQLTripleStore, TripleStoreABC
from ted_sws.metadata_normaliser.resources import MAPPING_FILES_PATH, QUERIES_PATH
from ted_sws.resources import MAPPING_FILES_PATH, QUERIES_PATH

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ted_sws.core.service.metadata_constraints import filter_df_by_variables
from ted_sws.data_manager.adapters.notice_repository import NoticeRepositoryABC
from ted_sws.metadata_normaliser.model.metadata import ExtractedMetadata
from ted_sws.metadata_normaliser.resources.mapping_files_registry import MappingFilesRegistry
from ted_sws.resources.mapping_files_registry import MappingFilesRegistry
from ted_sws.metadata_normaliser.services.xml_manifestation_metadata_extractor import XMLManifestationMetadataExtractor

JOIN_SEP = " :: "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Try backported to PY<37 `importlib_resources`.
import importlib_resources as pkg_resources

import ted_sws.metadata_normaliser.resources.mapping_files
import ted_sws.resources.mapping_files


def get_mapping_json_file(mapping_file_name: str) -> dict:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ted_sws.metadata_normaliser.resources import get_mapping_json_file, get_mapping_csv_file
from ted_sws.resources import get_mapping_json_file, get_mapping_csv_file


class MappingFilesRegistry:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from click.testing import CliRunner


from ted_sws.metadata_normaliser.entrypoints.generate_mapping_resources import generate_mapping_files, main as cli_main
from ted_sws.data_manager.entrypoints.generate_mapping_resources import generate_mapping_files, main as cli_main
from tests import TEST_DATA_PATH
from tests.fakes.fake_triple_store import FakeTripleStore

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pandas as pd

from ted_sws.metadata_normaliser.resources.mapping_files_registry import MappingFilesRegistry
from ted_sws.resources.mapping_files_registry import MappingFilesRegistry


def test_mapping_file_registry():
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/metadata_normaliser/test_metadata_normaliser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from ted_sws.core.model.notice import NoticeStatus
from ted_sws.core.service.metadata_constraints import filter_df_by_variables
from ted_sws.metadata_normaliser.resources.mapping_files_registry import MappingFilesRegistry
from ted_sws.resources.mapping_files_registry import MappingFilesRegistry
from ted_sws.metadata_normaliser.services.metadata_normalizer import normalise_notice, normalise_notice_by_id, \
MetadataNormaliser, ExtractedMetadataNormaliser
from ted_sws.metadata_normaliser.services.xml_manifestation_metadata_extractor import XMLManifestationMetadataExtractor
Expand Down

0 comments on commit 11d18ff

Please sign in to comment.