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

Clean-up of docstrings and log messages related to meta #402

Merged
merged 8 commits into from
Jun 30, 2020

Conversation

danielhuppmann
Copy link
Member

@danielhuppmann danielhuppmann commented Jun 20, 2020

Please confirm that this PR has done the following:

  • Tests Added
  • Documentation Added
  • Description in RELEASE_NOTES.md Added

Description of PR

This PR cleans up a few inconsistencies in the documentation of the meta indicators and changes the recommended arg of as_pandas() to meta_cols (deprecating with_metadata).

@danielhuppmann
Copy link
Member Author

@gidden, this PR refactors (among other clean-up operations) the arg of as_pandas() from with_metadata to with_meta for consistency - but looking at the function and its uses, I'm wondering if it wouldn't make more sense to change the behavior:

  • return data merged with all meta columns by default
  • return data merged with specific meta columns (by passing a list, used by the plotting functions)

If a user just wants data (current default), she/he can just use df.data.copy() directly, no need to use this wrapper... Any objections?

pyam/core.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

Merging #402 into master will increase coverage by 0.08%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #402      +/-   ##
==========================================
+ Coverage   93.42%   93.50%   +0.08%     
==========================================
  Files          35       35              
  Lines        4046     4067      +21     
==========================================
+ Hits         3780     3803      +23     
+ Misses        266      264       -2     
Impacted Files Coverage Δ
pyam/core.py 92.36% <77.27%> (-0.02%) ⬇️
pyam/plotting.py 95.47% <100.00%> (+0.07%) ⬆️
tests/test_admin.py 95.00% <100.00%> (ø)
tests/test_core.py 99.66% <100.00%> (+<0.01%) ⬆️
pyam/logging.py 100.00% <0.00%> (+16.66%) ⬆️

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 7ff834f...4054b86. Read the comment docs.

@danielhuppmann danielhuppmann marked this pull request as ready for review June 29, 2020 11:42
@danielhuppmann
Copy link
Member Author

As there were no objections against the changed behavior of as_pandas() - I'm going to merge this PR tomorrow...

@danielhuppmann danielhuppmann merged commit 509923c into master Jun 30, 2020
@danielhuppmann danielhuppmann deleted the docs/meta branch June 30, 2020 19:02
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.

2 participants