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

Add to_csv/from_csv to Colormap #101

Merged
merged 4 commits into from
Feb 23, 2022
Merged

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Feb 20, 2022

This is needed by #99 so that a colormap can be fully reconstructed with minimal information. This is a fairly useful feature by itself so I thought I'd make a separate PR for it. This is not as flexible as the loading logic in Satpy for colormaps, but I'm not sure if it should be. It would require extra keyword arguments like colormap_mode, etc. Maybe it should be added?

  • Closes #xxxx (remove if there is no corresponding issue, which should only be the case for minor changes)
  • Tests added (for all bug fixes or enhancements)
  • Tests passed (for all non-documentation changes)
  • Passes git diff origin/master **/*py | flake8 --diff (remove if you did not edit any Python files)
  • Fully documented (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later)

@codecov
Copy link

codecov bot commented Feb 20, 2022

Codecov Report

Merging #101 (66d17af) into main (eb54137) will increase coverage by 0.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   91.84%   92.21%   +0.36%     
==========================================
  Files          10       10              
  Lines        3239     3389     +150     
==========================================
+ Hits         2975     3125     +150     
  Misses        264      264              
Flag Coverage Δ
unittests 92.21% <100.00%> (+0.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
trollimage/colormap.py 100.00% <100.00%> (ø)
trollimage/tests/test_colormap.py 100.00% <100.00%> (ø)

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 eb54137...66d17af. Read the comment docs.

@djhoese
Copy link
Member Author

djhoese commented Feb 21, 2022

I've ported all of the "from file" style from satpy and included it in this PR.

@djhoese djhoese merged commit 4c1bc5b into pytroll:main Feb 23, 2022
@djhoese djhoese deleted the feature-cmap-to-csv branch February 23, 2022 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant