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 dynamic colormap generation to docs #137

Merged
merged 8 commits into from Aug 30, 2023

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Aug 28, 2023

This PR adds a custom sphinx directory so that anywhere in the docs you can do .. trollimage_colormap: trollimage.colormap.cmap_name (or point to a list or dict of colormaps) and it will make a list of the images. This way the colormaps on the site are always correct with what the code products.

I still have refactoring to do but the main idea is there.

  • 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)

@djhoese djhoese added the documentation Docstrings or Sphinx Documentation label Aug 28, 2023
@djhoese djhoese requested review from mraspaud and pnuu August 28, 2023 18:42
@djhoese djhoese self-assigned this Aug 28, 2023
@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #137 (1e36aae) into main (3550c58) will increase coverage by 0.01%.
Report is 4 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #137      +/-   ##
==========================================
+ Coverage   91.17%   91.18%   +0.01%     
==========================================
  Files          11       11              
  Lines        3852     3847       -5     
==========================================
- Hits         3512     3508       -4     
+ Misses        340      339       -1     
Flag Coverage Δ
unittests 91.18% <100.00%> (+0.01%) ⬆️

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

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

... and 1 file with indirect coverage changes

@coveralls
Copy link

coveralls commented Aug 28, 2023

Coverage Status

coverage: 91.374% (-0.05%) from 91.42% when pulling 6648200 on djhoese:feature-cmap-docs into 3550c58 on pytroll:main.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

Very cool idea, looks great so far!

@djhoese
Copy link
Member Author

djhoese commented Aug 29, 2023

Any last comments? Otherwise I'll merge this tomorrow.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM!

@mraspaud mraspaud merged commit bd079b6 into pytroll:main Aug 30, 2023
23 of 24 checks passed
@djhoese djhoese deleted the feature-cmap-docs branch August 31, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Docstrings or Sphinx Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants