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

ENH(UX): silence datalad's metadata while querying for possible metadata for duecredit #4568

Merged
merged 3 commits into from May 22, 2020

Conversation

yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented May 22, 2020

Grave problems (exception raised) would still be logged but now at DEBUG not WARNING level if needed to debug. The other warnings etc would be completely swallowed (FWIW - tried but decided to not over-complicate code there to try to log them after being swallowed).

Closes #4562

yarikoptic added 2 commits May 22, 2020
No need to pester users for now with all the duecredit problems.
exc_str is added to provide details about exception for us to debug
… within datasets

This is highly suboptimal since would complicate debugging etc.  But I see no
other way ATM on how to not flood the user screen with warnings
kyleam
kyleam previously approved these changes May 22, 2020
@kyleam kyleam dismissed their stale review May 22, 2020

Tests need to be adjusted.

@@ -49,7 +49,7 @@ def test_duecredit_dataset(path):
# TODO: possibly reconsider - may be our catch-all should be used there
# as well
with patch.object(due, 'cite') as mcite:
with swallow_logs(new_level=logging.WARNING) as cml:
with swallow_logs(new_level=logging.DEBUG) as cml:
Copy link
Member Author

@yarikoptic yarikoptic May 22, 2020

Choose a reason for hiding this comment

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

THANK YOU @kyleam !

@codecov
Copy link

@codecov codecov bot commented May 22, 2020

Codecov Report

Merging #4568 into maint will increase coverage by 47.72%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##            maint    #4568       +/-   ##
===========================================
+ Coverage   42.38%   90.11%   +47.72%     
===========================================
  Files         275      275               
  Lines       37137    37139        +2     
===========================================
+ Hits        15741    33467    +17726     
+ Misses      21396     3672    -17724     
Impacted Files Coverage Δ
datalad/support/due_utils.py 91.11% <100.00%> (+74.83%) ⬆️
datalad/support/tests/test_due_utils.py 78.04% <100.00%> (+78.04%) ⬆️
datalad/core/local/create.py 94.77% <0.00%> (+0.74%) ⬆️
datalad/core/local/tests/test_create.py 100.00% <0.00%> (+0.90%) ⬆️
datalad/ui/progressbars.py 83.10% <0.00%> (+1.35%) ⬆️
datalad/support/external_versions.py 95.62% <0.00%> (+1.45%) ⬆️
datalad/dochelpers.py 87.40% <0.00%> (+1.48%) ⬆️
datalad/support/tests/test_network.py 100.00% <0.00%> (+1.79%) ⬆️
datalad/core/local/status.py 98.03% <0.00%> (+1.96%) ⬆️
datalad/support/tests/test_external_versions.py 91.94% <0.00%> (+2.01%) ⬆️
... and 188 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69c7fae...b7e62b5. Read the comment docs.

@kyleam kyleam merged commit dc254f0 into datalad:maint May 22, 2020
11 checks passed
@yarikoptic yarikoptic deleted the bf-duecredit branch Oct 7, 2020
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.

None yet

2 participants