Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added sparql queries and mapping files for metadata normaliser #32

Merged
merged 2 commits into from
Mar 18, 2022

Conversation

Dragos0000
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Mar 18, 2022

Codecov Report

Merging #32 (e402fa9) into main (ad00f3e) will decrease coverage by 0.31%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
- Coverage   97.18%   96.87%   -0.32%     
==========================================
  Files          34       37       +3     
  Lines        1103     1153      +50     
==========================================
+ Hits         1072     1117      +45     
- Misses         31       36       +5     
Impacted Files Coverage Δ
ted_sws/metadata_normaliser/resources/__init__.py 84.61% <84.61%> (ø)
...ata_normaliser/resources/mapping_files_registry.py 90.00% <90.00%> (ø)
...rmaliser/entrypoints/generate_mapping_resources.py 94.11% <94.11%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b1e204...e402fa9. Read the comment docs.

@@ -197,7 +197,8 @@ prod-dotenv-file: guard-VAULT_ADDR guard-VAULT_TOKEN vault-installed
@ vault kv get -format="json" ted-prod/airflow | jq -r ".data.data | keys[] as \$$k | \"\(\$$k)=\(.[\$$k])\"" >> .env
@ vault kv get -format="json" ted-prod/mongo-db | jq -r ".data.data | keys[] as \$$k | \"\(\$$k)=\(.[\$$k])\"" >> .env


refresh-normaliser-mapping-files:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a solution as well!
You will, however, need to take into account the location of those resources.

import json

try:
import importlib.resources as pkg_resources
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good practice

return json.loads(path.read_bytes())


RESOURCES_PATH = pathlib.Path(__file__).parent.resolve()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice setup

@Dragos0000 Dragos0000 merged commit 900a067 into main Mar 18, 2022
@Dragos0000 Dragos0000 deleted the feature/TED-150 branch March 18, 2022 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants