-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/sckan-312 - add flag to neurondm ingestion script to disable the overwrite of KSs #317
Conversation
Keep the defaults, if not provided manually
…nd_new_statements
backend/composer/services/cs_ingestion/helpers/overwritable_helper.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
backend/composer/services/cs_ingestion/helpers/overwritable_helper.py
Outdated
Show resolved
Hide resolved
backend/composer/services/cs_ingestion/helpers/overwritable_helper.py
Outdated
Show resolved
Hide resolved
The base branch was changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@D-GopalKrishna could we add a test for this? thanks
@D-GopalKrishna both 311 and 312 are good for me, the only thing I would like to see are tests for both the features. Thanks a lot and great work :) |
NOTE: added tests. This increases the time to run the tests significantly - from literally under 1s to more than 400s. |
Jira Link - SCKAN-312
Task description:
More on the previous vs updated logic:
After the changes the definition of
overwritable_and_new_statements
changes. Whether the statements are overwritable or not depends on two utils -has_invalid_sentence
andhas_invalid_sentence
.(Previously and now) if the statement/sentence didn't exist we say it's not invalid. And therefore overwritable (new statement/sentence). This logic stays the same.
Previously - if the statement/sentence exists, and was overwritable (depending on if it is invalid/exported/compose_now) - then it is not invalid, and hence overwritable.
Now (after the change) - WE ONLY CHANGE THIS LOGIC above. This check only happens --disable_overwrite flag is not passed. If the flag is passed - we do not check this, and say the statement/sentence is invalid and hence - not overwritable.
Short demo video to showcase the same.
2024-10-11.14-26-48.mp4
demo after the logic is enabled.
2024-10-11.14-34-30.mp4