Repository navigation
docs: refresh CONTRIBUTING project layout and new-command example - #79
Conversation
Bytewave1
left a comment
There was a problem hiding this comment.
Thanks for the PR, the tree is accurate against the commit you based it on: I compared every entry with src/dkit/ and checked the descriptions, and found nothing invented.
Two things before I merge:
-
mainhas moved since. PR #78 addedsrc/dkit/commands/scheduled_events.pyandsrc/dkit/data/scheduled_event_types.json, so the tree is missing these two entries. Please rebase onto the currentmain, add both entries (alphabetical, like the others) and double-check the tree again afterwards. If you get a conflict,git fetch upstream,git rebase upstream/mainandgit push --force-with-leasewill do. -
In "How to add a new command", the registration example lists the whole
COMMANDStuple. That list will be out of date again with the next command. Could you shorten it, for example:COMMANDS: tuple[Command, ...] = ( ..., stickers.COMMAND, # <- add this )
with the matching import shortened as well (
from dkit.commands import ..., stickers)? The hypotheticalstickerscommand is fine as an example, please just keep it clearly marked as an example.
The tests and ruff check are green on my side, no CHANGELOG entry is needed for a docs-only change.
26432b8 to
a748b86
Compare
|
Rebased onto latest main (b290c31) and refreshed the project-layout tree to include |
|
Both points are addressed in a748b86:
from dkit.commands import ..., stickers # stickers is only an example
COMMANDS: tuple[Command, ...] = (
...,
stickers.COMMAND, # <- add your command here
)The CI is green on every job (3.10-3.13, ruff, build distributions). Mind re-reviewing when you have a moment? |
Bytewave1
left a comment
There was a problem hiding this comment.
Thanks, the tree now matches src/, tests/ and data/ exactly, and the shortened registration example is good. One file is still missing: #80 added .github/dependabot.yml, and the tree only lists .github/workflows/ci.yml. Please add it next to the workflow, in the same one-line style, for example:
├─ .github/ GitHub configuration
│ ├─ dependabot.yml keeps the GitHub Actions versions up to date
│ └─ workflows/ continuous integration
│ └─ ci.yml the CI matrix (lint, tests, packaging)
After that it is ready to merge.
Update the stale "Project layout" tree in CONTRIBUTING.md to match the current\nsrc/dkit/ structure: list all 12 command modules under commands/, every JSON file\nunder data/, and the other core/, tests/, docs/ and root files, each with a short\nright-column comment.\n\nReplace the "How to add a new command" walkthrough, which used \n(now a real command) and showed only a 5-entry registry, with a hypothetical\n example and the full COMMANDS registration tuple. Also note that\ncontributors should update the tree when adding a command or data file.\n\nThe documented setup commands were checked against pyproject.toml and CI and are\nstill correct, so they are left unchanged.
a748b86 to
fefa017
Compare
|
Added it in I checked the rest of the tree against that commit and nothing else has drifted: |
Summary
Refresh the stale Project layout tree in
CONTRIBUTING.mdso it matches the current package structure, and fix the now-outdated "How to add a new command" walkthrough.commands/(previously onlysnowflake,perms,invite,intents), every JSON file underdata/, thecore/modules,py.typed,tests/,docs/ISSUES.md,.github/workflows/ci.ymland the root files — each with a one-line right-column note.dkit channels, which is now a real command, and only showed a 5-entry registry. It now uses a hypotheticaldkit stickerscommand and shows the fullCOMMANDSregistration tuple.git clone, venv,pip install -e .[dev],pytest,ruff check,ruff format --check) againstpyproject.tomland CI — they are still correct, so they are unchanged.Closes #74
Verification
ruff check .→ All checks passedruff format --check .→ 45 files already formattedpython -m pytest→ 557 passed, 16 skipped (zsh/fish shells unavailable in this environment)Docs-only change: no code or data files touched, and no CHANGELOG entry.
Note
This is an AI-assisted contribution, as welcomed in
CONTRIBUTING.md.