-
Notifications
You must be signed in to change notification settings - Fork 15
Improve progress bar updating in xml creation tasks on backend #322
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
base: master
Are you sure you want to change the base?
Improve progress bar updating in xml creation tasks on backend #322
Conversation
Codecov Report
@@ Coverage Diff @@
## master #322 +/- ##
=========================================
- Coverage 54.7% 54.3% -0.41%
=========================================
Files 160 160
Lines 11534 11563 +29
Branches 1493 1507 +14
=========================================
- Hits 6310 6279 -31
- Misses 5031 5085 +54
- Partials 193 199 +6
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #322 +/- ##
==========================================
- Coverage 54.7% 54.56% -0.15%
==========================================
Files 160 160
Lines 11534 11559 +25
Branches 1493 1503 +10
==========================================
- Hits 6310 6307 -3
- Misses 5031 5058 +27
- Partials 193 194 +1
Continue to review full report at Codecov.
|
ESSArch_Core/ip/utils.py
Outdated
@@ -79,7 +79,8 @@ def generate_content_mets(ip): | |||
algorithm = ip.get_checksum_algorithm() | |||
|
|||
generator = XMLGenerator() | |||
generator.generate(files_to_create, folderToParse=ip.object_path, algorithm=algorithm) | |||
for _ in generator.generate(files_to_create, folderToParse=ip.object_path, algorithm=algorithm): |
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.
We can probably use yield from
here instead of the loop. (Note that the loop body also can be deleted, it's just that Github doesn't allow multi line suggestions atm)
for _ in generator.generate(files_to_create, folderToParse=ip.object_path, algorithm=algorithm): | |
yield from generator.generate(files_to_create, folderToParse=ip.object_path, algorithm=algorithm) |
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.
Very pythonic! 👍 Me like! :)
No description provided.