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

fix Edit on GitHub #4460

Merged
merged 9 commits into from
Oct 4, 2020
Merged

fix Edit on GitHub #4460

merged 9 commits into from
Oct 4, 2020

Conversation

keewis
Copy link
Collaborator

@keewis keewis commented Sep 25, 2020

This uses scanpydoc's github_url jinja filter to fix the github url in our api docs, and to also always point to master (see #4440 (comment)).

This currently does not work because we need support to enable the DONT_OVERWRITE_SPHINX_CONTEXT flag. We also might want to vendor github_url because it is only a small part of scanpydoc.

@dcherian
Copy link
Contributor

vendor github_url because it is only a small part of scanpydoc.

👍

@max-sixty
Copy link
Collaborator

Amazing! Thanks @keewis !

Shall I email RTD support re DONT_OVERWRITE_SPHINX_CONTEXT or do you want to?

@keewis
Copy link
Collaborator Author

keewis commented Sep 25, 2020

Shall I email RTD support re DONT_OVERWRITE_SPHINX_CONTEXT or do you want to?

sorry for not telling, I already did that immediately after creating the PR

@keewis
Copy link
Collaborator Author

keewis commented Sep 25, 2020

I looked at the source of scanpydoc.rtd_github_links. It seems to be a bit larger than I expected, and is also licensed as GPLv3, so I guess it should be fine to keep it as a docs-only dependency (is vendoring GPLv3-licensed code even possible for non-GPL projects?).

@keewis
Copy link
Collaborator Author

keewis commented Sep 25, 2020

okay, so support enabled the flag, but RTD times out while downloading something in plotting.rst (and not just for this branch). Does anyone know what's going on?

@dcherian
Copy link
Contributor

These natural earth URLs time out sometimes.

It's timing out on the browser for me now: https://naciscdn.org/naturalearth/110m/physical/ne_110m_coastline.zip

@keewis
Copy link
Collaborator Author

keewis commented Sep 25, 2020

yes, it seems https://naciscdn.org is down.

@keewis
Copy link
Collaborator Author

keewis commented Sep 25, 2020

to fix this, should we try to use cartopy_offlinedata?

@dcherian
Copy link
Contributor

Does that help on CI?

@keewis
Copy link
Collaborator Author

keewis commented Sep 25, 2020

not sure, I'm trying that right now

Edit: unfortunately it doesn't (unless I need to configure something?)

Edit: So I guess we have to wait for https://naciscdn.org to respond again?

Edit: see nvkelso/natural-earth-vector#416

@keewis keewis closed this Sep 26, 2020
@keewis keewis reopened this Sep 26, 2020
@keewis
Copy link
Collaborator Author

keewis commented Sep 26, 2020

naciscdn.org is up again so the build passes and the Edit on Github links are fixed (for injected methods, the link points to the outermost wrapper).

However, since the version is set to master the line numbers github_url determines might be wrong for other versions. Should we remove those?

Apart from that, this should be ready for review?

@shoyer
Copy link
Member

shoyer commented Sep 28, 2020

Let's keep scanpydoc as a docs only dependency, which I think is the easiest option from a GPL compliance perspective (we don't want to make all of xarray GPL)

@keewis
Copy link
Collaborator Author

keewis commented Oct 2, 2020

if I remember the meeting correctly, this should be ready for merging?

@dcherian
Copy link
Contributor

dcherian commented Oct 4, 2020

Thanks @keewis.

@dcherian dcherian merged commit 45aab42 into pydata:master Oct 4, 2020
@keewis keewis deleted the edit-on-github branch October 4, 2020 18:00
@max-sixty
Copy link
Collaborator

Thanks @keewis — it's great this is solved 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Broken links from generated documentation to github
4 participants