satpy icon indicating copy to clipboard operation
satpy copied to clipboard

Make documentation generation faster

Open djhoese opened this issue 1 year ago • 6 comments

Closes #2864

Requires https://github.com/pytroll/pyresample/pull/615

  • [x] Closes #2864
  • [ ] Tests added
  • [ ] Fully documented
  • [ ] Add your name to AUTHORS.md if not there already

djhoese avatar Aug 06 '24 15:08 djhoese

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.06%. Comparing base (084b114) to head (f93e768). Report is 412 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2875   +/-   ##
=======================================
  Coverage   96.06%   96.06%           
=======================================
  Files         370      370           
  Lines       54320    54320           
=======================================
  Hits        52185    52185           
  Misses       2135     2135           
Flag Coverage Δ
behaviourtests 3.99% <ø> (ø)
unittests 96.16% <ø> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 06 '24 15:08 codecov[bot]

Pull Request Test Coverage Report for Build 10655171223

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on doc-mas-rapido at 96.166%

Totals Coverage Status
Change from base Build 10654375136: 96.2%
Covered Lines: 52416
Relevant Lines: 54506

💛 - Coveralls

coveralls avatar Aug 06 '24 15:08 coveralls

Ok, pyresample 1.30.0 is now out, do you think this is ready?

mraspaud avatar Aug 29 '24 12:08 mraspaud

Not really. Once I get RTD builds working then we have to decide if we like the eay it looks. Then I need to update the documentation to explain how to run the script before running the normal sphinx build commands.

djhoese avatar Aug 29 '24 13:08 djhoese

@mraspaud @BENR0 What do you think (scroll down and expand the "Map" sections):

https://satpy--2875.org.readthedocs.build/en/2875/resample.html#area-definitions-included-in-satpy

djhoese avatar Aug 29 '24 14:08 djhoese

@mraspaud I kind of wonder if I should make it so the area list is only generated from the main branch. It seems super wasteful to build it on every commit of every PR. It adds 2+ minutes to every documentation run.

djhoese avatar Aug 29 '24 16:08 djhoese

That seems reasonable. We just need to make sure we generate it locally whenever we change that code...

mraspaud avatar Aug 29 '24 20:08 mraspaud

@mraspaud so I did the bare minimum and (if it works) told RTD to only generate the file on "latest" or "stable" documentation builds. Otherwise it just creates an empty version of the file. I could maybe create the file and commit it to the repository with some basic placeholder text like "Area definition list has not been generated. Run 'python generate_area_def_list.py' to generate it. The list is automatically generated when creating the 'latest' and 'stable' builds of the website on readthedocs.io". But I'd also need to then .gitignore that file after committing it so that users generating it don't commit the large version of the file with all the area overviews. Is that overkill?

djhoese avatar Sep 01 '24 15:09 djhoese

Yepp like what you did with the template. Although in the link you posted there are now area defs listed for me.

BENR0 avatar Sep 04 '24 06:09 BENR0

Yes, sorry @BENR0. I realized that right after I made the commit. I'll merge this to make sure my technique works and then any requested changes can go in a future PR. I'll comment when the build finishes so you can review the area overviews.

djhoese avatar Sep 04 '24 14:09 djhoese

@BENR0 Here you go: https://satpy.readthedocs.io/en/latest/resample.html#area-definitions-included-in-satpy

Looks like based on my time log messages that it takes ~4 minutes to generate these.

djhoese avatar Sep 04 '24 15:09 djhoese

Thanks for fixing this!

mraspaud avatar Sep 04 '24 16:09 mraspaud

Yepp nice, thanks for the fix.

BENR0 avatar Sep 05 '24 07:09 BENR0