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

[Docs] Change links to d.py docs to use pinned version instead of v1.0.1. #3053

Merged
merged 4 commits into from Oct 17, 2019

Conversation

jack1142
Copy link
Member

@jack1142 jack1142 commented Oct 12, 2019

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

I grepped for discordpy to find all files that needed to be updated.

@Flame442 Flame442 added the Type: Enhancement label Oct 12, 2019
Copy link
Contributor

@mikeshardmind mikeshardmind left a comment

We don't install stable, we pin a specific version for concerns with compatability with overriding certain behaviors in discord.ext.commands For most cases for our documentation, we should point to the current pinned version (which would still need to be updated here)

@Drapersniper
Copy link
Contributor

@Drapersniper Drapersniper commented Oct 16, 2019

Even then 1.0.1 it’s outdated right? Iirc the correct version is 1.2.3 something ?

@mikeshardmind
Copy link
Contributor

@mikeshardmind mikeshardmind commented Oct 16, 2019

Even then 1.0.1 it’s outdated right? Iirc the correct version is 1.2.3 something ?

I was alluding to that with this portion

we should point to the current pinned version (which would still need to be updated here)

It's just not necessarily fine to link to stable

@jack1142
Copy link
Member Author

@jack1142 jack1142 commented Oct 16, 2019

I added :dpy_docs: role (using extlinks) that will always create links to docs of our d.py version and used it where needed. I also added |DPY_VERSION| substitution as someone might find a use for it in future too.

Yes, I could have used intersphinx for d.py links, but I figured extlinks are easier to use as you don't need to look up objects.inv for right label and name of document and can just use part of docs link:

#### this is how extlinks works
# https://discordpy.readthedocs.io/en/v1.2.3/discord.html#creating-a-bot-account
:dpy_docs:`this guide <discord.html#creating-a-bot-account>`
# https://discordpy.readthedocs.io/en/v1.2.3/migrating.html
:dpy_docs:`discord.py's migration guide <migrating.html>`

#### this is how intersphinx works for roughly the same links
# https://discordpy.readthedocs.io/en/v1.2.3/discord.html#discord-intro
:ref:`this guide <dpy:discord-intro>`
# https://discordpy.readthedocs.io/en/v1.2.3/migrating.html
:doc:`discord.py's migration guide <dpy:migrating>`

Another note, while this covers most of links to d.py docs, it can't cover all of them, especially the ones in help docstrings. This might be added as another substitution in #3063 or possibly in this (or a separate) PR after #3063 gets merged.

For anyone looking for this in a future, currently the one and only place that is not covered by this PR is here

@jack1142 jack1142 requested a review from mikeshardmind Oct 16, 2019
@mikeshardmind mikeshardmind changed the title [Docs] Change links to d.py docs to use stable version instead of v1.0.1. [Docs] Change links to d.py docs to use pinned version instead of v1.0.1. Oct 17, 2019
Copy link
Contributor

@mikeshardmind mikeshardmind left a comment

Looks good to go. A quick change to the changelog to reflect the new approach and I'll get this merged.

@jack1142 jack1142 requested a review from mikeshardmind Oct 17, 2019
@mikeshardmind mikeshardmind added this to the 3.2.0 milestone Oct 17, 2019
@mikeshardmind mikeshardmind merged commit 172dd58 into Cog-Creators:V3/develop Oct 17, 2019
1 check passed
@jack1142 jack1142 deleted the V3/issue_3053 branch Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants