satpy
satpy copied to clipboard
Automatic list with overviews of inlcuded area definitions for the documentation
Based on https://github.com/pytroll/pyresample/pull/450 this generates overviews for all AreaDefinitions
included with Satpy and adds them to the resampling section.
I noticed that a quite large number of AreaDefinitions
are included which make the section really long now.
Some areas are not included because only AreaDefinitions
currently have _repr_html_
(see PR above).
- [x] Closes #1206
- [x] Fully documented
Codecov Report
Merging #2167 (f766457) into main (1f97c0b) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #2167 +/- ##
=======================================
Coverage 94.84% 94.84%
=======================================
Files 337 337
Lines 49571 49571
=======================================
Hits 47016 47016
Misses 2555 2555
Flag | Coverage Δ | |
---|---|---|
behaviourtests | 4.41% <ø> (ø) |
|
unittests | 95.46% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
satpy/resample.py | 79.31% <ø> (ø) |
This looks interesting. How easy would it be for users to use this feature to generate overviews of areas from their own local YAML files?
@gerritholl Curently not that easy I guess. But could easily be refactored to be available to users I think.
@gerritholl Curently not that easy I guess. But could easily be refactored to be available to users I think.
Especially if it was in pyresample :wink:
@mraspaud @gerritholl ok so where should this go in pyresample? Should I include it in https://github.com/pytroll/pyresample/pull/450 or make a separate PR?
Coverage increased (+0.2%) to 94.948% when pulling 6edf540767498f79ec684661646eff94fb57d0b5 on BENR0:feat_automatic_area_def_overview into 5cc09e025e7fd134df16a07fce42333193407e65 on pytroll:main.
Since this is based on the area html representation is has the same features (properties list/ foldable map). So this is how it looks like:
Folded
Unfolded
There are some problems with building the documentation, but they seem to be because https://github.com/pytroll/pyresample/pull/450 needs to be merged and released first.
There are some problems with building the documentation, but they seem to be because pytroll/pyresample#450 needs to be merged and released first.
Yes correct. Based on some discussions and ideas I had I am working on making this more useable/pretty so please wait with merging this even if https://github.com/pytroll/pyresample/pull/450 gets merged in the meantime.
Since there are quite a few AreaDefinition
s in the yaml file I added a searchable table similar to the reader table with links to the definitions so the user does not have to scroll through the whole document. Currently this is still a bit messy since I just included the generation in the conf.py
of the documentation for demonstration purposes. If this is wanted I will refactor this. It could be integrated into the generation function I already moved to pyresample but there on its own it would just generated a static table because the searching and sorting depends on the datatable css and js which is integrated in the satpy documentation.
Below you can see how it would look like. One think to note is that all the area definitions also appear in the toc tree which is not a huge deal but not that nice I guess. I think that has something to do with the toc maxdepth setting but I couldn't get that fixed somehow. So if somebody has an idea about that please share.
Apart from that I notice that there are two area definitions I think belong to DynamicAreaDefinition
s?:
- omerc_bb
- laea_bb Right now these produce broken links in the table because obviously there can be no overview generated for those.
Just as a reminder for whoever is looking for a status update, this is waiting for completion of https://github.com/pytroll/pyresample/pull/450
Pull Request Test Coverage Report for Build 5176646861
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 95.414%
Totals | |
---|---|
Change from base Build 5141473420: | 0.0% |
Covered Lines: | 47129 |
Relevant Lines: | 49394 |
💛 - Coveralls
https://github.com/pytroll/pyresample/pull/450 is now merged. Do we need a pyresample release before this can work?
I think so because if I see correctly read the docs uses a conda installed pyresample to build the docs. While the table should build fine in either case it would be nice to have the area names in the yaml file fixed (even if there is no agreement on a file naming pattern yet) #2310.
You can add yourself to AUTHORS.md
while you're at it :)