Skip to content

docs: expand DEVELOPMENT.md with architecture and testing guide - #1902

Merged
yarikoptic merged 7 commits into
masterfrom
claude/add-claude-documentation-v8By6
Aug 7, 2026
Merged

docs: expand DEVELOPMENT.md with architecture and testing guide#1902
yarikoptic merged 7 commits into
masterfrom
claude/add-claude-documentation-v8By6

Conversation

@yarikoptic-gitmate

Copy link
Copy Markdown
Collaborator

Summary

Significantly expanded DEVELOPMENT.md with comprehensive documentation of the codebase architecture, testing infrastructure, and CI/CD setup. Also updated CLAUDE.md to redirect developers to the authoritative DEVELOPMENT.md file rather than duplicating guidance.

Key Changes

  • Codebase Architecture — Added detailed directory layout with descriptions of each module (cli/, files/, metadata/, validate/, support/, tests/)
  • Key Design Patterns — Documented CLI delegation, file-type hierarchy, enum-based configuration, generator-based processing, context managers, retry logic, and lazy imports
  • Key Classes — Listed and described major classes (DandiAPIClient, ParsedDandiURL, DandiFile, ValidationResult, Dandiset, DandiInstance)
  • Code Style Conventions — Expanded with comprehensive rules for formatting, imports, type annotations, naming, exceptions, docstrings, and CLI patterns; noted that most are enforced by pre-commit
  • Pre-commit Hooks — Added section documenting the 5 hook categories and explaining the auto-fix workflow
  • Test Infrastructure — New section covering pytest markers, key fixtures, test organization, pytest configuration, and CI/CD workflows
  • Development Commands — Added examples for running specific tests with tox and building documentation
  • Docker Compose Testing — Documented the local_dandi_api fixture and DANDI_TESTS_PULL_DOCKER_COMPOSE environment variable
  • CLAUDE.md Refactor — Replaced detailed command/style duplication with a single directive to read DEVELOPMENT.md, reducing maintenance burden and ensuring single source of truth

Implementation Details

  • Organized documentation hierarchically with clear section headers and subsections
  • Used code blocks for directory structure and command examples
  • Provided context for design decisions (e.g., why lazy imports are used)
  • Included references to specific files and configuration locations
  • Maintained consistency with existing documentation style

https://claude.ai/code/session_017qM7WyFgvqy5UQHEtEcHzY

@yarikoptic
yarikoptic marked this pull request as ready for review August 7, 2026 09:23
claude and others added 5 commits August 7, 2026 05:23
Add project overview, detailed architecture map (directory structure,
key classes, design patterns), test infrastructure guide, environment
variables reference, CI/CD summary, and pre-commit hook listing to
help AI assistants navigate and contribute to the codebase effectively.

https://claude.ai/code/session_017qM7WyFgvqy5UQHEtEcHzY
CLAUDE.md was duplicating content already covered (or better suited to)
project-level documentation.  Following the pattern used in datalad and
heudiconv:

- Create CONTRIBUTING.md with architecture, code style, test
  infrastructure, CI/CD, and PR-label reference.
- Slim CLAUDE.md to a pointer at CONTRIBUTING.md + DEVELOPMENT.md,
  keeping only AI-specific notes (pre-commit re-run, git-bug commands).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qM7WyFgvqy5UQHEtEcHzY
Move architecture, code style, test infrastructure, and CI/CD sections
into DEVELOPMENT.md so all developer documentation lives in one file.
Update CLAUDE.md to point at DEVELOPMENT.md instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qM7WyFgvqy5UQHEtEcHzY
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qM7WyFgvqy5UQHEtEcHzY
- Note that most code style rules are enforced by pre-commit hooks.
- Replace pipe tables (key classes, pytest markers, CI/CD) with
  indented bullet lists for readability in plain text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qM7WyFgvqy5UQHEtEcHzY
@yarikoptic
yarikoptic force-pushed the claude/add-claude-documentation-v8By6 branch from 79e4659 to 7dc0027 Compare August 7, 2026 09:23
@yarikoptic yarikoptic added the documentation Changes only affect the documentation label Aug 7, 2026
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.96%. Comparing base (2b5f8ea) to head (b33cd10).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1902   +/-   ##
=======================================
  Coverage   76.96%   76.96%           
=======================================
  Files          88       88           
  Lines       12882    12882           
=======================================
  Hits         9914     9914           
  Misses       2968     2968           
Flag Coverage Δ
unittests 76.96% <ø> (ø)

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Point Claude at the LAD (LLM-Assisted Development) prompt workflows
so it knows about the phased development framework when asked to use it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qM7WyFgvqy5UQHEtEcHzY

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR expands contributor-facing documentation by making DEVELOPMENT.md the single, authoritative source for architecture, testing, and CI/CD guidance, and simplifying CLAUDE.md to point developers to that guide.

Changes:

  • Added detailed codebase architecture documentation (directory layout, key design patterns, key classes) to DEVELOPMENT.md
  • Added expanded testing and CI/CD documentation, including fixtures, markers, and common development commands
  • Refactored CLAUDE.md to remove duplicated guidance and redirect contributors to DEVELOPMENT.md

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
DEVELOPMENT.md Major expansion of developer documentation covering architecture, testing, pre-commit, and CI/CD
CLAUDE.md Reduced duplicated instructions and directs contributors to DEVELOPMENT.md as the source of truth
Suppressed comments (3)

DEVELOPMENT.md:107

  • This refers to a “docker-compose fixture”, but the test harness uses the docker compose CLI (space) rather than the legacy docker-compose binary. Rewording avoids implying the wrong command name.
Tests that need a running archive instance use the `local_dandi_api`
docker-compose fixture.  Set `DANDI_TESTS_PULL_DOCKER_COMPOSE=""` to skip
`docker compose pull` and speed up repeated runs.

DEVELOPMENT.md:179

  • AssetDirURL is listed as a ParsedDandiURL subclass, but there is no such class in dandi/dandiarchive.py (the directory-like multi-asset URL type is AssetFolderURL). This makes the architecture overview inaccurate.
- `ParsedDandiURL` (`dandiarchive.py`) — abstract base for URL parsing;
  subclasses `DandisetURL`, `SingleAssetURL`, `AssetItemURL`, `AssetDirURL`
- `DandiFile` (`files/bases.py`) — abstract base for all file types;

DEVELOPMENT.md:282

  • The documented CI Python version range doesn’t match the current test matrix in .github/workflows/run-tests.yml (which includes 3.11–3.14). Updating this keeps the CI/CD documentation accurate.
- `run-tests.yml` — full test matrix: Python 3.10–3.13 × Ubuntu,
  macOS (M1 + Intel), Windows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread DEVELOPMENT.md
Comment on lines +75 to +78
To run a specific test with tox:
```
tox r -e py3 -- dandi/tests/test_file.py::test_function -v
```
'tox r' is a tox 4 alias for 'tox run' — valid but less obvious.
Use the same 'tox -e' form as the rest of the file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qM7WyFgvqy5UQHEtEcHzY
@yarikoptic
yarikoptic merged commit 360455a into master Aug 7, 2026
41 checks passed
@yarikoptic
yarikoptic deleted the claude/add-claude-documentation-v8By6 branch August 7, 2026 23:07
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

🚀 PR was released in 0.77.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Changes only affect the documentation released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants