Move the "quick reference" to a dedicated page#1838
Conversation
A new page at `Getting Started > Quick Reference` is added to contain the (moved) content which was in the Quick Reference section of the index document for the site. The content is left almost entirely untouched, but the introductory text is slightly altered to de-emphasize use of the doc for new contributors. Intentionally, as described in python#1837, the page is placed in Getting Started but after the setup guide.
Documentation build overview
7 files changed ·
|
| Here are the basic steps needed to get set up and open a pull request. | ||
|
|
||
| This is meant as a checklist and cheat-sheet, not a comprehensive guide. | ||
| For complete instructions please see the :ref:`setup guide <setup>`. |
There was a problem hiding this comment.
I don't think this makes sense now, we redirect people back to the page they've just read?
There was a problem hiding this comment.
This doesn't go back to the home page. It goes to a detailed page about git etc.
There was a problem hiding this comment.
I was not referring to the home page. As @sirosen noted in the PR description:
the page is placed in Getting Started but after the setup guide.
We're sending them back to the page just before.
There was a problem hiding this comment.
I see, sorry. So we should move this up in the contents.
There was a problem hiding this comment.
I think we can rename it to "Overview," and make it an index for the overall quite long "Getting started" section. Additionally, we could merge it with the other Quick Guide, and add a link to the Where to get help at the end. Some of the steps could also use additional links to the more detailed sections.
There was a problem hiding this comment.
I would love to see this page be minimalist visually and cheatsheet-like. I think @StanFromIreland is on the right track though "Overview" feels too broad.
There was a problem hiding this comment.
Additionally, we could merge it with the other Quick Guide, and add a link to the Where to get help at the end.
Oh no! I didn't realize that there was another, other-other quick reference. 😂
My initial reaction is that I think these should be combined, still in the form of a new page.
I need to do some careful cross-comparison of the content and see if such a change is feasible in practice, without this PR growing too large in scope.
|
|
||
| PCbuild\build.bat -e -d | ||
|
|
||
| See also :ref:`more detailed instructions <compiling>`, |
There was a problem hiding this comment.
All of the above steps should have been completed by the time they reach this page, so we don't quite need them.
There was a problem hiding this comment.
I think all the "see also" items could go later in this document. Perhaps in a "Dive deeper" section.
|
|
||
| .\python.bat -m test -j3 | ||
|
|
||
| 5. Create a new branch where your work for the issue will go, for example:: |
There was a problem hiding this comment.
This section is duplicated by our other "Quick guide".
There was a problem hiding this comment.
Steps 5-7 could be their own section or their own page. Keep 1-4 as build from source and run tests.
| .. _quick-reference: | ||
|
|
||
| =============== | ||
| Quick Reference |
There was a problem hiding this comment.
Use sentence case for headers:
https://devguide.python.org/documentation/style-guide/#capitalization
| Quick Reference | |
| Quick reference |
There was a problem hiding this comment.
May make sense to be more specific on the title of this doc. Quick reference feels too broad. Something that evokes the original purpose checklist/cheatsheet would make more sense.
There was a problem hiding this comment.
We could put it at or near the end of Getting Started, under the name "Workflow cheatsheet".
It would read logically that way, and that name is harmonious with the element of this doc that I'm trying to preserve.
| :maxdepth: 5 | ||
|
|
||
| setup-building | ||
| quick-reference |
There was a problem hiding this comment.
I wonder if it would be better to move this before setup-building. I think we might want to rethink the name "Quick reference". The original text was created to be a checklist/cheatsheet for getting started quickly especially at sprints.
I don't object to making a separate doc for the content. I would leave a clear link/callout in the index page at the same place in the text so that folks who have the page bookmarked for this content know where it moved.
| .. _quick-reference: | ||
|
|
||
| =============== | ||
| Quick Reference |
There was a problem hiding this comment.
May make sense to be more specific on the title of this doc. Quick reference feels too broad. Something that evokes the original purpose checklist/cheatsheet would make more sense.
| Here are the basic steps needed to get set up and open a pull request. | ||
|
|
||
| This is meant as a checklist and cheat-sheet, not a comprehensive guide. | ||
| For complete instructions please see the :ref:`setup guide <setup>`. |
There was a problem hiding this comment.
I would love to see this page be minimalist visually and cheatsheet-like. I think @StanFromIreland is on the right track though "Overview" feels too broad.
|
|
||
| PCbuild\build.bat -e -d | ||
|
|
||
| See also :ref:`more detailed instructions <compiling>`, |
There was a problem hiding this comment.
I think all the "see also" items could go later in this document. Perhaps in a "Dive deeper" section.
|
|
||
| .\python.bat -m test -j3 | ||
|
|
||
| 5. Create a new branch where your work for the issue will go, for example:: |
There was a problem hiding this comment.
Steps 5-7 could be their own section or their own page. Keep 1-4 as build from source and run tests.
| Quick reference | ||
| --------------- | ||
|
|
||
| Here are the basic steps needed to get set up and open a pull request. |
There was a problem hiding this comment.
When moving these items to a new page, let's keep the Quick reference title and have an admonition of where the content has moved and why (for approx. 6 months).
There was a problem hiding this comment.
We can add a little deferred Javascript redirect for the anchor, e.g.:
function redirectAnchor() {
const anchor = window.location.hash.slice(1);
if (!anchor || document.getElementById(anchor)) {
return;
}
if (anchor !== "anchor") {
return;
}
window.location.replace(new URL("redirect", window.location.href).href);
}
redirectAnchor();There was a problem hiding this comment.
I like the idea, but have two reasons I don't want to pursue it at the moment.
-
Reusability. We probably don't want to do a bespoke bit of JS each time we do a redirect.
I'd like us to pack this idea up to be reusable. I think the redirector you recently proposed for CPython docs was similar -- but I did see that not everyone agreed on that.
-
Scope creep. This will already end up being a larger PR than I intended.
When I circle back on this, I'll be moving more pieces around and actually changing some content to address feedback. I worry that adding in new code for the site may make this harder to merge, so I'd like to stick strictly to content edits.
(I can definitely take feedback if there's broad agreement that everyone really wants us to add redirectAnchor() right here! But I'm hesitant to embrace the idea without more signal.)
Co-authored-by: Hugo van Kemenade <[email protected]>
The idea of making this section not be first is somewhat at odds with the fact that it needs to link to the first page under Getting Started. It would work to move it to the end, or to the beginning. The beginning seems to be the "least surprise" choice for doc readers and contributors.
Rather than trying to flatten the quick reference into a list (which is too compact!), reflow the doc with each list entry as a section or subsection. The steps are kept very similar to their prior content, but each now ends with a link to more detailed documentation, presented in a slightly more formulaic manner. Links out to GitHub are called out especially to ensure it's clear that they are not parts of the devguide.
Instead of a duplicate guide, we can now link to the canonical quick reference doc.
In the index, ensure that anyone going to the old quick-reference documentation will find a short explanatory note and a link to the new, rehomed quick-reference.
|
I've just pushed a few changes that attempt to address all of the outstanding review comments.
|
| git clone https://github.com/<your_username>/cpython | ||
| cd cpython | ||
|
|
||
| We recommend also setting up ``pre-commit``:: |
There was a problem hiding this comment.
@encukou, are you happy to do this now that we've hash-pinned all the third party hooks?
|
|
||
| .. code-block:: shell | ||
|
|
||
| ./configure --config-cache --with-pydebug && make -j8 |
There was a problem hiding this comment.
Why are we limiting to 8?
There was a problem hiding this comment.
Some number is better than none, easy to adjust once you know a number goes there, and arbitrary selection based on market hardware: #1545
There was a problem hiding this comment.
If $(nproc) can fail then why not leave it up to make and pass -j (I'm not sure if that works over on macOS, I presume it would be the same as on Linux), it should use all available then.
There was a problem hiding this comment.
It depends on the make command. With GNU make:
-j [jobs], --jobs[=jobs]
Specifies the number of jobs (commands) to run simultaneously. If there is
more than one -j option, the last one is effective. If the -j option is
given without an argument, make will not limit the number of jobs that can
run simultaneously.
"Don't limit" isn't the same as "use all available".
| `repository <https://github.com/python/blurb>`__. | ||
|
|
||
| For more information on writing news entries, | ||
| see :ref:`"Updating NEWS and What's New in Python" <news-entry>`. |
There was a problem hiding this comment.
This should be higher, we don't want unnecessary news entries (it explains when you should(n't) add one).
|
|
||
| .. code-block:: shell | ||
|
|
||
| ./python.exe -m test -j8 |
There was a problem hiding this comment.
Similarly here, why the difference? We can pass -j0 here.
| Here are the basic steps needed to get set up and open a pull request. | ||
|
|
||
| This is meant as a checklist and cheat-sheet, not a comprehensive guide. | ||
| For complete instructions please see the :ref:`setup guide <setup>` and the |
There was a problem hiding this comment.
We don't need "please" in technical docs
| For complete instructions please see the :ref:`setup guide <setup>` and the | |
| For complete instructions see the :ref:`setup guide <setup>` and the |
|
|
||
| .. note:: | ||
|
|
||
| In order to keep the commit history intact, please avoid squashing or amending |
There was a problem hiding this comment.
| In order to keep the commit history intact, please avoid squashing or amending | |
| In order to keep the commit history intact, avoid squashing or amending |
| Setup Git | ||
| ========= |
There was a problem hiding this comment.
| Setup Git | |
| ========= | |
| Set up Git | |
| ========== |
| Create pull requests | ||
| -------------------- | ||
|
|
||
| Create pull bequests on GitHub from your branches, on your fork, and make sure |
There was a problem hiding this comment.
| Create pull bequests on GitHub from your branches, on your fork, and make sure | |
| Create pull requests on GitHub from your branches, on your fork, and make sure |
|
|
||
| .. code-block:: shell | ||
|
|
||
| ./configure --config-cache --with-pydebug && make -j8 |
There was a problem hiding this comment.
It depends on the make command. With GNU make:
-j [jobs], --jobs[=jobs]
Specifies the number of jobs (commands) to run simultaneously. If there is
more than one -j option, the last one is effective. If the -j option is
given without an argument, make will not limit the number of jobs that can
run simultaneously.
"Don't limit" isn't the same as "use all available".
A new page at
Getting Started > Quick Referenceis added to contain the(moved) content which was in the Quick Reference section of the index
document for the site.
The content is left almost entirely untouched, but the introductory text
is slightly altered to de-emphasize use of the doc for new contributors.
Intentionally, as described in #1837, the page is placed in Getting
Started but after the setup guide.
closes #1837