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/unify contrib docs #9742

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tab1tha
Copy link
Contributor

@tab1tha tab1tha commented Nov 9, 2024

What do these changes do?

Edit onboarding documentation to

  • emphasize the need for npm as a pre-requisite to run tests,
  • make the git clone link explicit like the rest of the commands,
  • point to GitHub docs if user isn't familiar yet,
  • inform macOS users about the possible need for graphviz if make doc doesn't work.

It also goes ahead to unify CONTRIBUTING.rst in root and docs/contributing.rst such that there is now one source of truth. The preliminary documentation is housed in the github-rendered outward-facing CONTRIBUTING.rst and the extended documentation is housed in docs/contributing.rst which is rendered on readthedocs.

The changes in this pull requests remove the previous duplication of preliminary documentation such that further changes to it will be done in one place (CONTRIBUTING.rst) and imported to the other locations as needed.

Are there changes in behavior for the user?

None

Is it a substantial burden for the maintainers to support this?

None. This makes future maintenance easier.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES/ folder
    • name it <issue_or_pr_num>.<type>.rst (e.g. 588.bugfix.rst)

    • if you don't have an issue number, change it to the pull request
      number after creating the PR

      • .bugfix: A bug fix for something the maintainers deemed an
        improper undesired behavior that got corrected to match
        pre-agreed expectations.
      • .feature: A new behavior, public APIs. That sort of stuff.
      • .deprecation: A declaration of future API removals and breaking
        changes in behavior.
      • .breaking: When something public is removed in a breaking way.
        Could be deprecated in an earlier release.
      • .doc: Notable updates to the documentation structure or build
        process.
      • .packaging: Notes for downstreams about unobvious side effects
        and tooling. Changes in the test invocation considerations and
        runtime assumptions.
      • .contrib: Stuff that affects the contributor experience. e.g.
        Running tests, building the docs, setting up the development
        environment.
      • .misc: Changes that are hard to assign to any of the above
        categories.
    • Make sure to use full sentences with correct case and punctuation,
      for example:

      Fixed issue with non-ascii contents in doctest text files
      -- by :user:`contributor-gh-handle`.

      Use the past tense or the present tense a non-imperative mood,
      referring to what's changed compared to the last released version
      of this project.

@bdraco bdraco added bot:chronographer:skip This PR does not need to include a change note backport-3.10 Trigger automatic backporting to the 3.10 release branch by Patchback robot backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot labels Nov 9, 2024
Copy link

codspeed-hq bot commented Nov 9, 2024

CodSpeed Performance Report

Merging #9742 will not alter performance

Comparing tab1tha:docs/unify-contrib-docs (7dbfeca) with master (5ddeb06)

Summary

✅ 14 untouched benchmarks

@bdraco bdraco closed this Nov 9, 2024
@bdraco bdraco reopened this Nov 9, 2024
Copy link

codecov bot commented Nov 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.67%. Comparing base (5ddeb06) to head (7dbfeca).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9742      +/-   ##
==========================================
+ Coverage   98.60%   98.67%   +0.06%     
==========================================
  Files         117      117              
  Lines       35807    35807              
  Branches     4250     4250              
==========================================
+ Hits        35307    35331      +24     
+ Misses        340      320      -20     
+ Partials      160      156       -4     
Flag Coverage Δ
CI-GHA 98.55% <ø> (+0.05%) ⬆️
OS-Linux 98.24% <ø> (+0.05%) ⬆️
OS-Windows 95.99% <ø> (ø)
OS-macOS 97.30% <ø> (-0.01%) ⬇️
Py-3.10.11 95.55% <ø> (-1.61%) ⬇️
Py-3.10.15 97.72% <ø> (ø)
Py-3.11.10 97.78% <ø> (+<0.01%) ⬆️
Py-3.11.9 97.22% <ø> (ø)
Py-3.12.7 98.26% <ø> (ø)
Py-3.13.0 98.24% <ø> (+0.88%) ⬆️
Py-3.9.13 97.07% <ø> (ø)
Py-3.9.20 97.63% <ø> (ø)
Py-pypy7.3.16 97.26% <ø> (?)
VM-macos 97.30% <ø> (-0.01%) ⬇️
VM-ubuntu 98.24% <ø> (+0.05%) ⬆️
VM-windows 95.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

It looks like Sphinx isn't set up in a fully strict mode, which means that some things don't fail loudly in CI. Here's a few places that I noticed needing improvements.

Comment on lines +206 to +208
.. code-block:: shell

$ brew install graphviz
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this needs extra indentation.

Suggested change
.. code-block:: shell
$ brew install graphviz
.. code-block:: shell
$ brew install graphviz

Contributing
============
.. include:: ../CONTRIBUTING.rst
:end-before: export-point-instructions-for-contributors

(:doc:`contributing-admins`)
Copy link
Member

Choose a reason for hiding this comment

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

Why not keep this in the same place: at the top of the document?

https://aiohttp--9742.org.readthedocs.build/en/9742/contributing.html#instructions-for-contributors


.. _GitHub: https://github.com/aio-libs/aiohttp
.. export-point-instructions-for-contributors
Copy link
Member

Choose a reason for hiding this comment

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

Why is this comment at the end and isn't splitting the doc closer to the top? It doesn't do anything in this position, really.

@@ -1,36 +1,56 @@
Contributing
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this title is lost entirely. Why?


2. Setup your machine with the required development environment

3. Make a change

4. Make sure all tests passed

5. Add a file into the ``CHANGES`` folder, named after the ticket or PR number
5. Add a file into the ``CHANGES`` folder (see `Changelog update <CHANGES>`_ for how).
Copy link
Member

Choose a reason for hiding this comment

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

This relative file reference only works on GitHub and is a broken link in Sphinx: https://aiohttp--9742.org.readthedocs.build/en/9742/contributing.html#instructions-for-contributors

Comment on lines +49 to +50
GitHub issue and pull request threads are automatically locked when there has
not been any recent activity for one year. Please open a `new issue
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is true anymore (I see locked issues from years ago, but don't think there's any auto-locking in the past 4 years). Maybe just reword to open a new issue instead of commenting on a closed issue.

Comment on lines +12 to +13
Also, ensure that you have `npm
<https://docs.npmjs.com/downloading-and-installing-node-js-and-npm>`_ installed.
Copy link
Member

@Dreamsorcerer Dreamsorcerer Nov 10, 2024

Choose a reason for hiding this comment

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

I think this is only for building llhttp, right? So, maybe:

Suggested change
Also, ensure that you have `npm
<https://docs.npmjs.com/downloading-and-installing-node-js-and-npm>`_ installed.
If you intend to run the parser tests, ensure that you have `npm
<https://docs.npmjs.com/downloading-and-installing-node-js-and-npm>`_ installed.

Note that this page doesn't automatically refresh itself. So, if you make more changes, build the docs again to see how they look on the page.

.. note::
If you are on MacOS, you might need to install `graphviz <https://graphviz.org/>`_ first.
Copy link
Member

@Dreamsorcerer Dreamsorcerer Nov 10, 2024

Choose a reason for hiding this comment

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

This isn't limited to MacOS, the PR added an apt package to make this work in the CI:
https://github.com/aio-libs/aiohttp/pull/9359/files#diff-cde814ef2f549dc093f5b8fc533b7e8f47e7b32a8081e0760e57d5c25a1139d9R17-R18

So, maybe something like:

You'll also need to install graphviz with your package manager (e.g. `apt install graphviz` or `brew install graphviz`).

Copy link
Member

Choose a reason for hiding this comment

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

As this is prerequisite, I'd move this step above the make doc command, so users see it first.

@tab1tha
Copy link
Contributor Author

tab1tha commented Nov 11, 2024

Thank you for the reviews. I should be able to look through and push the changes later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.10 Trigger automatic backporting to the 3.10 release branch by Patchback robot backport-3.11 Trigger automatic backporting to the 3.11 release branch by Patchback robot bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants