-
Notifications
You must be signed in to change notification settings - Fork 26
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
Refactor documentation links to source on GitHub #379
Conversation
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.
LGTM!
I did have one question though: why not include |Hello World|, or |Plugin|, etc. in the conf.py
file. It seems that they only needed to be updated in a single file, so if we were changing them there is only 1 place to update them anyway, which makes sense. But, that might not be obvious initially though, and someone might think that when things get moved they only need to update the links in confy.py
.
Not a suggested change, just something to consider. It certainly might be overkill to try to keep track of all reference links in conf.py
. Some of them like |Plugin| though could potentially be referenced in more places as documentation is updated.
Also I built the docs and things look good. I did not try every single link, but did a random sample and it all seems to work as expected.
.. |acme.motd.software_quotes| replace:: :github-demo:`acme.motd.software_quotes <MOTD/acme/motd/software_quotes/software_quotes_plugin.py>` | ||
.. |MOTD| replace:: :github-demo:`MOTD <MOTD/acme/motd/motd.py>` | ||
.. |IMOTD| replace:: :github-demo:`IMOTD <MOTD/acme/motd/i_motd.py>` | ||
.. |MOTDPlugin| replace:: :github-demo:`MOTDPlugin <MOTD/acme/motd/motd_plugin.py>` |
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.
Im guessing the reason we have two things linking to MOTD/acme/motd/motd_plugin.py
is because they existed both ways in the docs currently? That seems fine to me, but maybe we would want to consolidate so any doc trying to link to this page says either |acme.motd| or |MOTDPlugin|?
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 they both reference to the same file, but they are different appearance so by keeping both, we keep the sentences unchanged.
|acme.motd|
will appear as "acme.motd" that links to the motd_plugin.py
file. MOTDPlugin
will appear as "MOTDPlugin" that links to the same file.
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.
You could always change the link text in the place that's referring to the link.
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, sorry; ignore me. I was missing context.
I guess moving files would really only require changes to this:
as others all link to api docs... |
Agreed it would be clearer if the substitutions are maintained in one place. I moved those across to |
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.
Still LGTM! Thank you!
* Refactor external links to demo examples from extension_points.rst * Update links to github in introduction.rst * Refactor substitutions * Group substitutions * Update other references to github links * Flake8 * Remove two other links to github that point to TraitsGUI * Remove redundant newlines * Maintain all substituions in the same place * Remove two redundant lines
* Fix index slice in ExtensionPointChangedEvent when plugin changes (#357) * Turn off macOS builds on Travis CI (#375) This PR turns off expensive macOS builds on Travis CI. We'll eventually use GitHub Actions to replace these. * update changelog with backported PRs * Make example run from any directory (#377) * Make it possible to run example scripts from anywhere. * Add a docstring for the test case * Add missing __init__.py * Import abcdefg... * Refactor documentation links to source on GitHub (#379) * Refactor external links to demo examples from extension_points.rst * Update links to github in introduction.rst * Refactor substitutions * Group substitutions * Update other references to github links * Flake8 * Remove two other links to github that point to TraitsGUI * Remove redundant newlines * Maintain all substituions in the same place * Remove two redundant lines * Contribute examples to etsdemo (#380) * remove logging from hello world and motd * remove logging from other examples * move examples into envisage * update the single URL in docs/conf.py * add examples as package_data * add entry point * flake8 * add demo folder and update package_data based off code review suggestion * Update docs/source/conf.py Co-authored-by: Kit Choi <[email protected]> * rename and add test for entry point * move GUI_Application example into envisage/examples * move old examples into envisage/examples/demo/legacy * Revert "move old examples into envisage/examples/demo/legacy" This reverts commit c026040. * move old examples into a new subdirectory called legacy * add a readme to reference new location for examples Co-authored-by: Kit Choi <[email protected]> * more changelog updates * more changes to changelog Co-authored-by: Kit Choi <[email protected]> Co-authored-by: Mark Dickinson <[email protected]>
* Fix index slice in ExtensionPointChangedEvent when plugin changes (#357) * Turn off macOS builds on Travis CI (#375) This PR turns off expensive macOS builds on Travis CI. We'll eventually use GitHub Actions to replace these. * update changelog with backported PRs * Make example run from any directory (#377) * Make it possible to run example scripts from anywhere. * Add a docstring for the test case * Add missing __init__.py * Import abcdefg... * Refactor documentation links to source on GitHub (#379) * Refactor external links to demo examples from extension_points.rst * Update links to github in introduction.rst * Refactor substitutions * Group substitutions * Update other references to github links * Flake8 * Remove two other links to github that point to TraitsGUI * Remove redundant newlines * Maintain all substituions in the same place * Remove two redundant lines * Contribute examples to etsdemo (#380) * remove logging from hello world and motd * remove logging from other examples * move examples into envisage * update the single URL in docs/conf.py * add examples as package_data * add entry point * flake8 * add demo folder and update package_data based off code review suggestion * Update docs/source/conf.py Co-authored-by: Kit Choi <[email protected]> * rename and add test for entry point * move GUI_Application example into envisage/examples * move old examples into envisage/examples/demo/legacy * Revert "move old examples into envisage/examples/demo/legacy" This reverts commit c026040. * move old examples into a new subdirectory called legacy * add a readme to reference new location for examples Co-authored-by: Kit Choi <[email protected]> * more changelog updates * more changes to changelog Co-authored-by: Kit Choi <[email protected]> Co-authored-by: Mark Dickinson <[email protected]>
* Backports for 5.0.0 and update changelog (#378) * Fix index slice in ExtensionPointChangedEvent when plugin changes (#357) * Turn off macOS builds on Travis CI (#375) This PR turns off expensive macOS builds on Travis CI. We'll eventually use GitHub Actions to replace these. * update changelog with backported PRs * Make example run from any directory (#377) * Make it possible to run example scripts from anywhere. * Add a docstring for the test case * Add missing __init__.py * Import abcdefg... * Refactor documentation links to source on GitHub (#379) * Refactor external links to demo examples from extension_points.rst * Update links to github in introduction.rst * Refactor substitutions * Group substitutions * Update other references to github links * Flake8 * Remove two other links to github that point to TraitsGUI * Remove redundant newlines * Maintain all substituions in the same place * Remove two redundant lines * Contribute examples to etsdemo (#380) * remove logging from hello world and motd * remove logging from other examples * move examples into envisage * update the single URL in docs/conf.py * add examples as package_data * add entry point * flake8 * add demo folder and update package_data based off code review suggestion * Update docs/source/conf.py Co-authored-by: Kit Choi <[email protected]> * rename and add test for entry point * move GUI_Application example into envisage/examples * move old examples into envisage/examples/demo/legacy * Revert "move old examples into envisage/examples/demo/legacy" This reverts commit c026040. * move old examples into a new subdirectory called legacy * add a readme to reference new location for examples Co-authored-by: Kit Choi <[email protected]> * more changelog updates * more changes to changelog Co-authored-by: Kit Choi <[email protected]> Co-authored-by: Mark Dickinson <[email protected]> * add release date Co-authored-by: Kit Choi <[email protected]> Co-authored-by: Mark Dickinson <[email protected]>
The documentation has URL links to sources on GitHub. Some of them can be replaced by cross references to the API documentation. Some of them cannot.
When we need to move files across (e.g. for solving #320, see #359), we would have to update these links laboriously. This PR refactors the links so that "https://github.com/enthought/envisage/tree/master/..." is only defined once, in
conf.py
. And when we do move the example files, only the link inconf.py
requires changes.There are some drive-by to replace GitHub links with API documentation references, as well as removing some dead links.