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

Feature/ted4 82 #515

Merged
merged 7 commits into from
Jan 24, 2024
Merged

Feature/ted4 82 #515

merged 7 commits into from
Jan 24, 2024

Conversation

Dragos0000
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (92c34d0) 96.47% compared to head (9261199) 96.53%.

Files Patch % Lines
...a_processor/adapters/notice_metadata_normaliser.py 97.33% 4 Missing ⚠️
...ta_processor/adapters/notice_metadata_extractor.py 99.09% 1 Missing ⚠️

❗ 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.
📢 Have feedback on the report? Share it here.

@@ -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]
Copy link
Collaborator

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.

Copy link
Collaborator Author

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 ""
Copy link
Collaborator

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

Copy link
Collaborator Author

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"):
Copy link
Collaborator

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

Copy link
Collaborator Author

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)
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed print statement

Copy link
Collaborator

@CaptainOfHacks CaptainOfHacks left a comment

Choose a reason for hiding this comment

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

Revise comments

@Dragos0000 Dragos0000 merged commit fa1a4eb into main Jan 24, 2024
2 of 3 checks passed
@Dragos0000 Dragos0000 deleted the feature/TED4-82 branch January 24, 2024 16:06
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.

3 participants