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

Improved 'Making Good PRs' section to improve clarity and maintainability. #1510

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

swastim01
Copy link

@swastim01 swastim01 commented Feb 9, 2025

Improve PR Title Guidelines

Solves: #931

Description

  • Enforced a stricter PR title format to improve clarity and maintainability.
  • Encouraged writing accurate and concise PR titles/descriptions.

These changes aim to enhance the quality of PR titles.


📚 Documentation preview 📚: https://cpython-devguide--1510.org.readthedocs.build/getting-started/pull-request-lifecycle/

Copy link

cpython-cla-bot bot commented Feb 9, 2025

All commit authors signed the Contributor License Agreement.
CLA signed

@hugovk
Copy link
Member

hugovk commented Feb 9, 2025

It's hard to review the changes because the section was moved in the page, please could you move it back?

I think it makes sense to keep the original order, where the "quick guide" comes first. (But if we do want to move it up a section, let's do that in a separate PR, with no other textual changes.)

@swastim01
Copy link
Author

Hi, I have done the needful. Please let me know if any other changes are required.

@swastim01 swastim01 changed the title Moved 'Making Good PRs' section up in the hierarchy and clarified its content Improved 'Making Good PRs' section to improve clarity and maintainability. Feb 9, 2025
.. _good-prs:

Making good PRs
Making Good PRs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please retain sentence case: https://devguide.python.org/documentation/style-guide/#capitalization

Suggested change
Making Good PRs
Making good PRs

Same applies to the headers below.

#. Proper :ref:`documentation <documenting>` additions/changes should be included.
When creating a pull request, following best practices ensures your contribution is **clear, maintainable, and easy to review**. A well-structured PR improves collaboration and speeds up the review process.

1. **Use a Clear and Structured PR Title**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep using #. so Sphinx auto-numbers, and we don't need to hardcode?

Suggested change
1. **Use a Clear and Structured PR Title**
#. **Use a clear and structured PR title**

Also please trim trailing spaces, or install pre-commit to do it for you:

https://devguide.python.org/getting-started/setup-building/#install-pre-commit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies to all points not just this one @swastim01


PR titles often become commit messages, making them **critical for maintainability and searchability**. Follow these guidelines:

**Do:**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…ling spaces using pre-commit, removed blockquotes
your pull request will be put on hold until you fix the formatting issues.
When creating a pull request, following best practices ensures your contribution is **clear, maintainable, and easy to review**. A well-structured PR improves collaboration and speeds up the review process.

1. **Use a Clear and Structured PR Title**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is general guidance, not specific to Python. I'm not sure it makes sense to give this sort of general guideline: the devguide is more helpful to developers who want to start contributing to Python if it talks specifically about what's special about this project.

getting-started/pull-request-lifecycle.rst Outdated Show resolved Hide resolved
getting-started/pull-request-lifecycle.rst Outdated Show resolved Hide resolved
**Do:**

- Clearly summarize the change in a concise manner.
- Use the **imperative mood** (e.g., "Fix crash in parser" instead of "Fixed a crash in parser").
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a link to a better guide/more information? This would be helpful for non English natives. https://en.wikipedia.org/wiki/Imperative_mood

getting-started/pull-request-lifecycle.rst Outdated Show resolved Hide resolved
Comment on lines -212 to -214
Pull requests with only code formatting changes are usually rejected. On
the other hand, fixes for typos and grammar errors in documents and
docstrings are welcome.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this note and replace it with a shorter one?

getting-started/pull-request-lifecycle.rst Outdated Show resolved Hide resolved
getting-started/pull-request-lifecycle.rst Outdated Show resolved Hide resolved
@@ -183,59 +183,93 @@ message. It is usually okay to leave that as-is and close the editor.
See `the merge command's documentation <https://git-scm.com/docs/git-merge>`_
for a detailed technical explanation.


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally removed line

getting-started/pull-request-lifecycle.rst Outdated Show resolved Hide resolved
getting-started/pull-request-lifecycle.rst Outdated Show resolved Hide resolved
swastim01 and others added 7 commits February 12, 2025 13:41
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
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.

4 participants