Skip to content

Commit 37d2ab4

Browse files
committed
Revert "remove log files"
This reverts commit 17002d9.
1 parent 17002d9 commit 37d2ab4

9 files changed

Lines changed: 6079 additions & 0 deletions

File tree

.claude/settings.local.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"WebSearch",
5+
"WebFetch(domain:arxiv.org)",
6+
"WebFetch(domain:docs.scipy.org)",
7+
"WebFetch(domain:www.ime.unicamp.br)",
8+
"WebFetch(domain:sites.math.washington.edu)",
9+
"WebFetch(domain:indrag49.github.io)",
10+
"WebFetch(domain:github.com)",
11+
"WebFetch(domain:www.sciencedirect.com)",
12+
"WebFetch(domain:optax.readthedocs.io)"
13+
]
14+
}
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Project Overview
2+
3+
- Purpose: Stan Math Library is a C++ reverse-mode automatic differentiation library used by Stan (see `README.md`).
4+
- Core layout: primary headers and implementation live under `stan/math/` with domain splits in `stan/math/prim`, `stan/math/rev`, `stan/math/fwd`, `stan/math/mix`, `stan/math/opencl`. Umbrella headers include `stan/math.hpp`, `stan/math/prim.hpp`, `stan/math/rev.hpp`, `stan/math/fwd.hpp`, `stan/math/mix.hpp`.
5+
- Tests: unit tests are under `test/unit/` (notably `test/unit/math/...`); expression tests under `test/expressions/`; probability tests and generators under `test/prob/`.
6+
- Benchmarks: microbenchmarks live in `benchmarks/`.
7+
- Third-party deps: vendored libraries are under `lib/` (TBB, Sundials, etc. referenced in build rules).
8+
9+
Golden paths
10+
- Add a function: implement in the appropriate domain folder (e.g., `stan/math/prim/...`), update umbrella headers if needed, and add a unit test under `test/unit/math/...`.
11+
- Fix a bug: find the failing test under `test/unit/...`, adjust code in `stan/math/...`, and run the focused test via `./runTests.py` or `make` (see `makefile`).
12+
- Performance work: add or update a benchmark in `benchmarks/` and compare results locally.
13+
14+
Risk/fragile areas
15+
- OpenCL code paths (`stan/math/opencl/`) and SUNDIALS-dependent tests may require extra dependencies (see `make/tests`).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Style and Conventions
2+
3+
Formatting
4+
- C++ formatting follows `.clang-format` (Google-based) with `ColumnLimit: 80`, `IndentWidth: 2`, `PointerAlignment: Left`, and `SortIncludes: false`.
5+
6+
Code organization
7+
- Library code lives in `stan/math/` with domains in `prim`, `rev`, `fwd`, `mix`, and `opencl`.
8+
- Public umbrella headers exist at `stan/math.hpp` and per-domain headers like `stan/math/prim.hpp`.
9+
10+
Naming and file patterns
11+
- Headers use `.hpp`.
12+
- Unit tests are `*_test.cpp` under `test/unit/...`.
13+
- Header compile tests use the `-test` suffix (e.g., `stan/math/constants.hpp-test`).
14+
15+
Quality checks
16+
- Use `make cpplint` and `make clang-tidy` for static checks (targets defined in `make/cpplint` and `make/clang-tidy`).
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Suggested Commands
2+
3+
Setup/overview
4+
- `make help`: print available make targets and testing guidance (see `makefile`).
5+
6+
Testing
7+
- `./runTests.py -h`: show test runner help and options.
8+
- `./runTests.py test/unit`: run unit tests under `test/unit/`.
9+
- `./runTests.py -f <pattern>`: run tests matching a pattern (e.g., `-f opencl`).
10+
- `./runTests.py --changed`: run tests for files changed in git.
11+
- `make test/unit/math/prim/fun/abs_test`: build a single unit test binary.
12+
- `make test-headers`: compile-check all headers (see `make/tests`).
13+
- `make stan/math/constants.hpp-test`: compile-check a single header.
14+
15+
Quality
16+
- `make cpplint`: run cpplint over source files.
17+
- `make clang-tidy`: run clang-tidy across tests (optional `files=...`).
18+
- `make clang-tidy-fix`: clang-tidy with autofix output to `.clang-fixes.yml`.
19+
20+
Docs
21+
- `make doxygen`: generate API docs in `doc/api/`.
22+
23+
Cleanup
24+
- `make clean`: remove generated test files/binaries.
25+
- `make clean-deps`: remove dependency files if tests stop building.
26+
- `make clean-all`: deep clean including docs/libraries.
27+
28+
Utilities
29+
- `./runChecks.py`: check math dependency rules (targeted by `make test-math-dependencies`).
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Task Completion Checklist
2+
3+
- [ ] Run focused tests for changed areas (e.g., `./runTests.py test/unit/...` or single test binary via `make`).
4+
- [ ] Add/update tests when behavior changes; ensure new data files are referenced correctly.
5+
- [ ] Run relevant linters/static checks if touching core code (`make cpplint`, `make clang-tidy`).
6+
- [ ] Update docs/changelogs if user-facing behavior changes (rare for math internals).
7+
- [ ] Self-review for dependency rules (prim/fwd/rev/mix layering) and header include correctness.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Testing Guidance
2+
3+
- Primary runner: `./runTests.py` (see help with `-h`).
4+
- Unit tests live under `test/unit/`; run a subtree with `./runTests.py test/unit` or a specific test file path.
5+
- Build a single test binary with `make test/unit/path/to/foo_test` and run the produced binary.
6+
- Header compile tests: `make test-headers` or `make stan/math/constants.hpp-test`.
7+
- Dependency checks: `./runChecks.py` or `make test-math-dependencies`.

0 commit comments

Comments
 (0)