Skip to content

docs: reorganize testing docs for copy/paste#1043

Merged
henryiii merged 6 commits intopypa:mainfrom
abitrolly:patch-1
Apr 22, 2026
Merged

docs: reorganize testing docs for copy/paste#1043
henryiii merged 6 commits intopypa:mainfrom
abitrolly:patch-1

Conversation

@abitrolly
Copy link
Copy Markdown
Contributor

Description

Make it easier to scan and copy/paste the needed command. I forgot how to run tests, and my reading skills were all time low today.

Changelog

  • Added changelog fragment: docs/changelog/<pr_number>.<type>.rst
    • Types: feature, bugfix, doc, removal, misc
    • Example: 123.feature.rst containing Add custom backend support - by :user:`yourname`

Checklist

  • Tests pass locally (tox)
  • Code follows project style (tox -e fix)
  • Type checks pass (tox -e type)
  • Documentation builds (tox -e docs)

That makes it easier to scan and use as a reference.
Copy link
Copy Markdown
Collaborator

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

I disagree with removing existing information. I understand that I would prefer if we extended it, not clean it up. Your addition here should be strictly additive.

@abitrolly
Copy link
Copy Markdown
Contributor Author

abitrolly commented Apr 20, 2026

@gaborbernat I think I was careful enough to compress info. but not remove. I removed explanation like ``--only-integration` means only integration tests are run", because it is logical if not obvious. And merged examples directly into text that previously explained it. Actually I needed only copy/pasteable examples on one page to quickly fix tests while I have time. So feel free to format how do you see fit as long as the code blocks are here. The PR allows edits for maintainers, so we should not spend too much time here.

By the way, did you use any AI to make #988 ? It is pretty awesome piece of change that I would personally find trouble doing by hand. But I still haven't figure out how to run agents securely.

@henryiii
Copy link
Copy Markdown
Contributor

What do you mean by "securely? If you mean access to things on your computer, then you can run in a container (I haven't done that yet, just been manually okaying operations), or GitHub's got various mechanisms to run agents (see copilot-instructions.yml, or codespaces).

For private code, then I think you'd need to run locally; I don't really do much that's not open source, so not something I've had to worry about yet. I've been playing with Qwen 3.6 locally and have had issue with it mis-formatting tool calls and paths. (It's pretty smart, it just randomly loses characters; it usually iterates and fixes it, but it's really annoying and makes it take 3x longer). I'm thinking it might be an issue with a small model + OpenCode's 10K token preamble, I'm tempted to try Pi instead, which has a 1K preamble. I also have access to Kimi-K2.5 on nrp.ai, which is really nice (open weight!), but not small enough to run locally. I'm planning on trying Gemma 4 soon. Kimi-K2.5 feels pretty close to GitHub Copilot + claude-haiku-4.5, maybe even a bit above it.

(I think that particular PR looked like it was assisted by Claude Code, at a guess)

@henryiii
Copy link
Copy Markdown
Contributor

To me, it looks pretty similar in content, with just some lost text for the introduction that should be pretty easy to simply put back in.

@abitrolly
Copy link
Copy Markdown
Contributor Author

abitrolly commented Apr 20, 2026

I've heard some scary stories about agents following rogue instructions while doing lookups on the internet, and sending out private keys and other sensitive data. Also masking instructions with Unicode symbols to make them invisible. Also the statements like that Aider code is 80% written by AI, and also projects like beads + GasTown + Wasteland that run completely on autopilot using repository credentials make me feel really uncomfortable. Especially when code reviews are also done by agents. llama.cpp that exposes API through a web-server that is, well, probably written in C++? I already run all things in a container, but I've also heard that containers also have attack vectors, and with every layer of security I just fall into a trap of analysis paralysis.

Restored the key missing information from the original. The changes merged back into the new code-block layout:

- **Opening paragraph**: "Due to its nature, ``build`` has a somewhat complex test suite..." (was simplified to just "``build`` has with two sets of tests...")
- **What integration tests do**: "as a sanity check" and "not very helpful for tracking down issues"
- **What `--only-integration` does**: "where the latter will disable unit tests and only run integration tests"
- **Environment matrix description**: "The project has a fairly large environment matrix..." (was shortened to just "The test matrix covers...")
- **Extra environments**: "Additionally, there are environments for type checking and documentation building, plus extras like checking code with minimum versions of dependencies." (was lost)
- **`py39-wheel` example**: "You can also run unit tests against a specific Python version with wheel installation using `tox -e py39-wheel`." (was lost)
- **Coverage paragraph**: Restored "Code coverage is tracked to ensure all code paths are tested. Aim for complete coverage..." (was shortened to "Test generate code coverage, so try to get complete coverage...")

Assisted-by: OpenCode:Kimi-K2.5
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii
Copy link
Copy Markdown
Contributor

I've used Kimi-K2.6 to restore missing information while keeping the original structure intact (that was basically my prompt!). Maybe that's better? Might be okay to trim a bit.

Comment thread docs/development/contributing.rst Outdated
Copy link
Copy Markdown
Member

@layday layday left a comment

Choose a reason for hiding this comment

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

I agree with the general sentiment that the docs are too verbose and visually indistinct. A few suggestions below.

Comment thread docs/development/contributing.rst Outdated
Comment thread docs/development/contributing.rst Outdated
Comment thread docs/development/contributing.rst Outdated
Comment thread docs/development/contributing.rst
henryiii and others added 2 commits April 22, 2026 10:55
Co-authored-by: layday <layday@protonmail.com>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii enabled auto-merge (squash) April 22, 2026 16:12
@henryiii henryiii merged commit e37e2ae into pypa:main Apr 22, 2026
10 checks passed
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