Skip to content

Commit 1be875e

Browse files
committed
updating tests
1 parent bab5223 commit 1be875e

10 files changed

Lines changed: 14 additions & 13 deletions

File tree

ted_sws/data_manager/entrypoints/cli/cmd_generate_mapping_resources.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from ted_sws.event_manager.adapters.logger import LOG_INFO_TEXT
1111
from ted_sws.data_manager.adapters.mapping_suite_repository import TRANSFORM_PACKAGE_NAME, RESOURCES_PACKAGE_NAME
1212

13-
13+
CELLAR_SPARQL_ENDPOINT_URL = "http://publications.europa.eu/webapi/rdf/sparql"
1414
DEFAULT_OUTPUT_PATH = '{mappings_path}/{mapping_suite_id}/' + TRANSFORM_PACKAGE_NAME + '/' + RESOURCES_PACKAGE_NAME
1515
CMD_NAME = "NORMALISATION_RESOURCE_GENERATOR"
1616

@@ -29,7 +29,7 @@ def __init__(
2929
self,
3030
queries_folder,
3131
output_folder,
32-
triple_store: TripleStoreEndpointABC = SPARQLTripleStoreEndpoint()
32+
triple_store: TripleStoreEndpointABC
3333
):
3434
super().__init__(name=CMD_NAME)
3535
self.queries_folder_path = Path(os.path.realpath(queries_folder))
@@ -59,7 +59,7 @@ def run(mapping_suite_id=None,
5959
opt_queries_folder: str = str(QUERIES_PATH),
6060
opt_output_folder: str = str(MAPPING_FILES_PATH),
6161
opt_mappings_folder: str = DEFAULT_MAPPINGS_PATH,
62-
triple_store: TripleStoreEndpointABC = SPARQLTripleStoreEndpoint()):
62+
triple_store: TripleStoreEndpointABC = SPARQLTripleStoreEndpoint(endpoint_url=CELLAR_SPARQL_ENDPOINT_URL)):
6363
"""
6464
This method will generate a json file for each ran SPARQL query in the resources folder
6565
:param mapping_suite_id:
@@ -94,7 +94,7 @@ def run(mapping_suite_id=None,
9494
help="Use to overwrite default OUTPUT")
9595
@click.option('-m', '--opt-mappings-folder', default=DEFAULT_MAPPINGS_PATH)
9696
def main(mapping_suite_id, opt_queries_folder, opt_output_folder, opt_mappings_folder):
97-
run(mapping_suite_id, opt_queries_folder, opt_output_folder, opt_mappings_folder, SPARQLTripleStoreEndpoint())
97+
run(mapping_suite_id, opt_queries_folder, opt_output_folder, opt_mappings_folder, SPARQLTripleStoreEndpoint(CELLAR_SPARQL_ENDPOINT_URL))
9898

9999

100100
if __name__ == '__main__':
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"head": {"link": [], "vars": ["code", "conceptURI"]}, "results": {"distinct": false, "ordered": true, "bindings": [{"code": {"type": "literal", "value": "OP_DATPRO"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/OP_DATPRO"}}, {"code": {"type": "literal", "value": "cga"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/cga"}}, {"code": {"type": "literal", "value": "la"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/la"}}, {"code": {"type": "literal", "value": "body-pl"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl"}}, {"code": {"type": "literal", "value": "body-pl-cga"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-cga"}}, {"code": {"type": "literal", "value": "body-pl-la"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-la"}}, {"code": {"type": "literal", "value": "body-pl-ra"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-ra"}}, {"code": {"type": "literal", "value": "def-cont"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/def-cont"}}, {"code": {"type": "literal", "value": "eu-ins-bod-ag"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/eu-ins-bod-ag"}}, {"code": {"type": "literal", "value": "int-org"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/int-org"}}, {"code": {"type": "literal", "value": "org-sub"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub"}}, {"code": {"type": "literal", "value": "org-sub-cga"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-cga"}}, {"code": {"type": "literal", "value": "org-sub-la"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-la"}}, {"code": {"type": "literal", "value": "org-sub-ra"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-ra"}}, {"code": {"type": "literal", "value": "pub-undert"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert"}}, {"code": {"type": "literal", "value": "pub-undert-cga"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-cga"}}, {"code": {"type": "literal", "value": "pub-undert-la"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-la"}}, {"code": {"type": "literal", "value": "pub-undert-ra"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-ra"}}, {"code": {"type": "literal", "value": "ra"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/ra"}}, {"code": {"type": "literal", "value": "spec-rights-entity"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/spec-rights-entity"}}, {"code": {"type": "literal", "value": "eu-int-org"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/eu-int-org"}}, {"code": {"type": "literal", "value": "rl-aut"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/rl-aut"}}, {"code": {"type": "literal", "value": "grp-p-aut"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/grp-p-aut"}}]}}
1+
{"head": {"link": [], "vars": ["code", "conceptURI"]}, "results": {"distinct": false, "ordered": true, "bindings": [{"code": {"type": "literal", "value": "OP_DATPRO"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/OP_DATPRO"}}, {"code": {"type": "literal", "value": "body-pl"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl"}}, {"code": {"type": "literal", "value": "body-pl-cga"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-cga"}}, {"code": {"type": "literal", "value": "body-pl-la"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-la"}}, {"code": {"type": "literal", "value": "body-pl-ra"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/body-pl-ra"}}, {"code": {"type": "literal", "value": "cga"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/cga"}}, {"code": {"type": "literal", "value": "def-cont"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/def-cont"}}, {"code": {"type": "literal", "value": "eu-ins-bod-ag"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/eu-ins-bod-ag"}}, {"code": {"type": "literal", "value": "int-org"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/int-org"}}, {"code": {"type": "literal", "value": "la"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/la"}}, {"code": {"type": "literal", "value": "org-sub"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub"}}, {"code": {"type": "literal", "value": "org-sub-cga"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-cga"}}, {"code": {"type": "literal", "value": "org-sub-la"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-la"}}, {"code": {"type": "literal", "value": "org-sub-ra"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/org-sub-ra"}}, {"code": {"type": "literal", "value": "pub-undert"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert"}}, {"code": {"type": "literal", "value": "pub-undert-cga"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-cga"}}, {"code": {"type": "literal", "value": "pub-undert-la"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-la"}}, {"code": {"type": "literal", "value": "pub-undert-ra"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/pub-undert-ra"}}, {"code": {"type": "literal", "value": "ra"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/ra"}}, {"code": {"type": "literal", "value": "spec-rights-entity"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/spec-rights-entity"}}, {"code": {"type": "literal", "value": "eu-int-org"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/eu-int-org"}}, {"code": {"type": "literal", "value": "rl-aut"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/rl-aut"}}, {"code": {"type": "literal", "value": "grp-p-aut"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/buyer-legal-type/grp-p-aut"}}]}}

tests/test_data/notice_transformer/mapping_suite_processor_repository/test_package_fake/transformation/resources/country.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/test_data/notice_transformer/mapping_suite_processor_repository/test_package_fake/transformation/resources/cpv.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/test_data/notice_transformer/mapping_suite_processor_repository/test_package_fake/transformation/resources/cpvsuppl.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/test_data/notice_transformer/mapping_suite_processor_repository/test_package_fake/transformation/resources/currency.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"head": {"link": [], "vars": ["code", "conceptURI"]}, "results": {"distinct": false, "ordered": true, "bindings": [{"code": {"type": "literal", "value": "OP_DATPRO"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/OP_DATPRO"}}, {"code": {"type": "literal", "value": "bri"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/bri"}}, {"code": {"type": "literal", "value": "change"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/change"}}, {"code": {"type": "literal", "value": "competition"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/competition"}}, {"code": {"type": "literal", "value": "cont-modif"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/cont-modif"}}, {"code": {"type": "literal", "value": "dir-awa-pre"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/dir-awa-pre"}}, {"code": {"type": "literal", "value": "result"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/result"}}, {"code": {"type": "literal", "value": "planning"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/planning"}}]}}
1+
{"head": {"link": [], "vars": ["code", "conceptURI"]}, "results": {"distinct": false, "ordered": true, "bindings": [{"code": {"type": "literal", "value": "planning"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/planning"}}, {"code": {"type": "literal", "value": "OP_DATPRO"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/OP_DATPRO"}}, {"code": {"type": "literal", "value": "change"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/change"}}, {"code": {"type": "literal", "value": "competition"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/competition"}}, {"code": {"type": "literal", "value": "cont-modif"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/cont-modif"}}, {"code": {"type": "literal", "value": "dir-awa-pre"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/dir-awa-pre"}}, {"code": {"type": "literal", "value": "result"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/result"}}, {"code": {"type": "literal", "value": "bri"}, "conceptURI": {"type": "uri", "value": "http://publications.europa.eu/resource/authority/form-type/bri"}}]}}

0 commit comments

Comments
 (0)