-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fix bugs and use real data in the plotting docs #251
Fix bugs and use real data in the plotting docs #251
Conversation
…doctesting Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Should be ready now.
and a jpeg file I actually have these four files in my local directory:
Probably only |
docs/source/plot.rst
Outdated
>>> tb37v = np.arange(1000) | ||
>>> area_def = load_area('areas.yaml', 'pc_world') | ||
>>> swath_def = SwathDefinition(lons, lats) | ||
>>> area_def = load_area('areas.yaml', 'pc_world') # doctest: +SKIP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this area load just overwriting the area_def created in the lines above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, right. But the stuff above is hidden, and does not show up on RTD. Therefore the additional line for RTD. The area is not defined and on Travis we don't have access to areas.yaml
and certainly not in the home dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, pyresample doesn't have a builtin areas 🤦♂️ Got it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at this Adam. I'm a little confused by the doctest skips. Does doctest only run the code in .. doctest
sections or do it run all code that it finds? Can we just not doctest some of these parts? It seems like some lines have a skipped doctest and others don't, but shouldn't they work? Like the load_area
calls should be loading the areas.yaml from the package, right?
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
I am also not pleased with it really. I am using this doctest-hide to help doctesting but hiding it for the user. |
Looks like there are some import issues on the tests. @adybbroe Could you look at these? |
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Codecov Report
@@ Coverage Diff @@
## master #251 +/- ##
==========================================
+ Coverage 91.94% 91.99% +0.04%
==========================================
Files 42 42
Lines 8098 8181 +83
==========================================
+ Hits 7446 7526 +80
- Misses 652 655 +3
Continue to review full report at Codecov.
|
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
Closing and reopening the PR to try trigger a RTD build |
@mraspaud @adybbroe I think this should be good now. I made one important change to the code that could cause issues for some people: I remove the |
Fix bugs and use real data in the doc pages but hide code needed for doc testing
There was also one duplicated section which is now fixed.
The idea is that the user should be able more or less to generate the same plots by going from top to bottom in a notebook or ipython prompt.
Signed-off-by: Adam.Dybbroe a000680@c21856.ad.smhi.se
git diff origin/master **/*py | flake8 --diff