docs: add ARCHITECTURE.md documenting repo design and structure#845
Closed
drbenvincent wants to merge 1 commit into
Closed
docs: add ARCHITECTURE.md documenting repo design and structure#845drbenvincent wants to merge 1 commit into
drbenvincent wants to merge 1 commit into
Conversation
Provide a prose overview of CausalPy's layered architecture — experiments, models, reporting, pipeline, and checks — so contributors can understand the design without reading the full source. Add update policy to AGENTS.md and CONTRIBUTING.md so the document stays current as the codebase evolves. Fixes #843 Made-with: Cursor
Collaborator
Author
|
Would be very grateful for a review on this @ulfaslak. It's the first time I've tried to properly create a code repo overview in order to guide an agent. Your experience might highlight unnecessary contents in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #845 +/- ##
=======================================
Coverage 94.26% 94.26%
=======================================
Files 78 78
Lines 12005 12005
Branches 699 699
=======================================
Hits 11317 11317
Misses 496 496
Partials 192 192 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
Superseded by #924, which covers the same scope (ARCHITECTURE.md + AGENTS.md reference) with updated content reflecting the current codebase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
ARCHITECTURE.mddocumenting CausalPy's internal design — the layered structure, module responsibilities, and extension points — so contributors (human and AI) can understand where things live without reading thousands of lines of source.Fixes #843
Changes
ARCHITECTURE.md(new): Covers the experiment layer (BaseExperimentcontract, all 10 experiment classes), the two-backend model system (PyMC + scikit-learn), the reporting layer (EffectSummary, Bayesian vs OLS output paths), the pipeline system (Stepprotocol, validate-before-run), the checks/sensitivity system (9 checks withapplicable_methods), the formula interface (step/ramptransforms), the data layer (load_datadispatcher), support modules, test organization, and extension points for adding new experiments/models/checks.CONTRIBUTING.md: Added a checklist item requiringARCHITECTURE.mdupdates for structural PRs.AGENTS.md: Added an "Architecture documentation" section with a reference toARCHITECTURE.mdand the update policy.Also consolidates #562 (Create developer-focused
RESEARCH.md), which was closed as a near-duplicate.Testing
Documentation-only change — no code modified, no tests needed.
prek run --all-filespasses.Checklist
ARCHITECTURE.mddescribes the current codebase accuratelyCONTRIBUTING.mdPR checklist updatedAGENTS.mdupdate policy addedprek run --all-filespasses