Skip to content

docs: refresh CONTRIBUTING project layout and new-command example - #79

Merged
Bytewave1 merged 3 commits into
Bytewave1:mainfrom
Logic769:docs/contributing-project-layout
Oct 30, 2026
Merged

Bytewave1 merged 3 commits into
Bytewave1:mainfrom
Logic769:docs/contributing-project-layout

Conversation

@Logic769

Copy link
Copy Markdown
Contributor

Summary

Refresh the stale Project layout tree in CONTRIBUTING.md so it matches the current package structure, and fix the now-outdated "How to add a new command" walkthrough.

  • The layout tree now lists all 12 command modules under commands/ (previously only snowflake, perms, invite, intents), every JSON file under data/, the core/ modules, py.typed, tests/, docs/ISSUES.md, .github/workflows/ci.yml and the root files — each with a one-line right-column note.
  • Reworked the How to add a new command section: the old example used dkit channels, which is now a real command, and only showed a 5-entry registry. It now uses a hypothetical dkit stickers command and shows the full COMMANDS registration tuple.
  • Added a note asking contributors to update the tree when they add a command or a data file.
  • Checked the documented setup commands (git clone, venv, pip install -e .[dev], pytest, ruff check, ruff format --check) against pyproject.toml and CI — they are still correct, so they are unchanged.

Closes #74

Verification

  • ruff check . → All checks passed
  • ruff format --check . → 45 files already formatted
  • python -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.

@Bytewave1 Bytewave1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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:

  1. main has moved since. PR #78 added src/dkit/commands/scheduled_events.py and src/dkit/data/scheduled_event_types.json, so the tree is missing these two entries. Please rebase onto the current main, 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/main and git push --force-with-lease will do.

  2. In "How to add a new command", the registration example lists the whole COMMANDS tuple. 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 hypothetical stickers command 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.

@Logic769
Logic769 force-pushed the docs/contributing-project-layout branch from 26432b8 to a748b86 Compare October 28, 2026 23:13
@Logic769

Copy link
Copy Markdown
Contributor Author

Rebased onto latest main (b290c31) and refreshed the project-layout tree to include commands/scheduled_events.py and data/scheduled_event_types.json; shortened the COMMANDS registration example as requested.

@Logic769

Copy link
Copy Markdown
Contributor Author

Both points are addressed in a748b86:

  • Rebased onto the current main (b290c31) and added the two entries the tree was missing: src/dkit/commands/scheduled_events.py and src/dkit/data/scheduled_event_types.json, in alphabetical position with the same one-line style as the rest of the tree. I re-checked every remaining entry against src/dkit/ at that commit and nothing else had drifted.
  • Shortened the registration example. It now reads:
from dkit.commands import ..., stickers  # stickers is only an example

COMMANDS: tuple[Command, ...] = (
    ...,
    stickers.COMMAND,  # <- add your command here
)

The stickers command is still introduced as a hypothetical example in the surrounding prose.

CI is green on every job (3.10-3.13, ruff, build distributions). Mind re-reviewing when you have a moment?

@Bytewave1 Bytewave1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.
@Logic769
Logic769 force-pushed the docs/contributing-project-layout branch from a748b86 to fefa017 Compare October 29, 2026 15:33
@Logic769

Copy link
Copy Markdown
Contributor Author

Added it in fefa017, and rebased onto the current main (00b3991) first.

├─ .github/                      GitHub configuration
│  ├─ dependabot.yml             keeps the GitHub Actions versions up to date
│  └─ workflows/                 continuous integration
│     └─ ci.yml                  the CI matrix (lint, tests, packaging)

I checked the rest of the tree against that commit and nothing else has drifted: src/dkit/ (13 command modules, 8 core/ modules, 9 data files plus scheduled_event_types.json), tests/, docs/ISSUES.md and the root files all match. dependabot.yml is the only file under .github/ besides workflows/ci.yml.

@Bytewave1 Bytewave1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks @Logic769, the tree now matches src/, tests/, data/ and .github/ exactly, and the registration example is short and clearly marked as an example.

@Bytewave1
Bytewave1 merged commit 6b35519 into Bytewave1:main Oct 30, 2026
11 checks passed
@Bytewave1

Copy link
Copy Markdown
Owner

Thanks @Logic769, merged! This closes #74.

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.

docs: update the project layout in CONTRIBUTING.md to the current commands and files

2 participants