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

Fix/obs unit db ids #72

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Fix/obs unit db ids #72

wants to merge 28 commits into from

Conversation

nlakmouri
Copy link
Collaborator

No description provided.

@nlakmouri nlakmouri requested a review from cpommier June 24, 2024 14:59
@nlakmouri nlakmouri self-assigned this Jun 24, 2024
nlakmouri and others added 22 commits July 9, 2024 17:24
removing extra deprecated modules and files.
Pipfile is now the reference, no more Requirements.txt
Add the make_hashable method to resolve unhashable type error
if document_type != "observationVariable":
document[document_type + 'DbId'] = get_generated_uri_from_dict(source, document_type, document, True)
# transform other DbIds , skip observationVariable
# create a stack for the current document
stackDocument = [document]
Copy link
Member

Choose a reason for hiding this comment

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

stackDocument is slightly misleading. Rename for isntance to "stackDocumentFields" or "stackDocumentProperties"

True)
while stackDocument:
# Retrieve the top item of the stack
currentItem = stackDocument.pop()
Copy link
Member

Choose a reason for hiding this comment

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

Same: currentDocumentItem or currentDocumentField

currentItem = stackDocument.pop()

if isinstance(currentItem, dict):
for key, value in list(currentItem.items()):
Copy link
Member

Choose a reason for hiding this comment

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

Same: replace key with "fieldKey" or "fieldName" or something like that
replace value with "fieldValue" or something like that

@@ -2,8 +2,16 @@
from etl.transform.utils import get_generated_uri_from_str


def make_hashable(obj):
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment explaining the origin of this method: synonyms were either list(string) or list(obj) which generate hash error. This methods solv the problem but the real problem was the data model that had changed.

@@ -51,11 +48,11 @@ def handler(*_):
if 'transform_rdf' in options or 'etl_virtuoso' in options:
etl.transform.rdf.main(config)

if 'load_elasticsearch' in options or 'etl_es' in options:
etl.load.elasticsearch.main(config)
#if 'load_elasticsearch' in options or 'etl_es' in options:
Copy link
Member

Choose a reason for hiding this comment

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

Those can be deleted

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