-
Notifications
You must be signed in to change notification settings - Fork 5
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/ted4 82 #515
Feature/ted4 82 #515
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #515 +/- ##
==========================================
+ Coverage 96.47% 96.53% +0.06%
==========================================
Files 112 113 +1
Lines 5978 6173 +195
==========================================
+ Hits 5767 5959 +192
- Misses 211 214 +3 ☔ View full report in Codecov by Sentry. |
ted_sws/core/model/metadata.py
Outdated
@@ -81,6 +81,7 @@ class NormalisedMetadata(Metadata): | |||
eforms_subtype: str | |||
xsd_version: str | |||
published_in_cellar_counter: int = Field(default=0) | |||
is_eForm: Optional[bool] |
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.
- Keep snake style in code, rename is_eForm to is_eform.
- Provide default value as False.
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.
replaced name and added default value
namespaces = dict([node for _, node in ET.iterparse(source=StringIO(xml_manifestation.object_data), | ||
events=['start-ns'])]) | ||
|
||
namespaces["manifestation_ns"] = namespaces.pop("") if "" in namespaces.keys() else "" |
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.
define and use constants instead of string literals
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.
I did this
tmp_dict = namespaces.copy() | ||
items = tmp_dict.items() | ||
for key, value in items: | ||
if value.endswith("nuts"): |
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.
define and use constants instead of string literals
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.
did this
@@ -55,6 +55,7 @@ def a_notice(normalised_notice): | |||
@given('the notice is with form number F03') | |||
def the_notice_is_with_form_number_f03(normalised_notice): | |||
"""the notice is with form number F03.""" | |||
print(normalised_notice.normalised_metadata) |
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.
why we have print in tests?
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.
removed print statement
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.
Revise comments
No description provided.