Skip to content

Commit d796897

Browse files
committed
Point CONTRIBUTING.md at the shared PolicyEngine guide
1 parent 874b450 commit d796897

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
1-
## Updating the code
1+
# Contributing to microdf
22

3-
Please make sure that introduced changes are consistent with the testing api and add additional tests if relevant.
3+
See the [shared PolicyEngine contribution guide](https://github.com/PolicyEngine/.github/blob/main/CONTRIBUTING.md) for cross-repo conventions (towncrier changelog fragments, `uv run`, PR description format, anti-patterns). This file covers microdf specifics.
44

5-
## Updating the versioning
5+
## Commands
66

7-
Please add to `changelog.yaml` and then run `make changelog` before committing the results ONCE in this PR.
7+
```bash
8+
make install # install deps
9+
make format # format (required)
10+
make test # test suite
11+
uv run pytest microdf/tests/path/to/test.py::test_name -v
12+
```
13+
14+
Default branch: `main`.
15+
16+
## What lives here
17+
18+
microdf provides weighted-microdata primitives used throughout PolicyEngine:
19+
20+
- `MicroSeries` — weighted pandas Series with weighted quantiles, means, medians, ginis
21+
- `MicroDataFrame` — weighted DataFrame of `MicroSeries`
22+
- `generic` — weight-aware reductions, groupby helpers
23+
24+
Consumers: `policyengine-core`, every country package, `policyengine.py`, `policyengine-api`. API stability matters — think twice before changing public signatures.
25+
26+
## Repo-specific anti-patterns
27+
28+
- **Don't** change weighted-statistic semantics without a migration plan. Downstream analyses depend on exact numerical output.
29+
- **Don't** introduce heavyweight dependencies — microdf is imported by every PolicyEngine Python package; bloat compounds.
30+
- **Don't** hand-roll weighted statistics; extend the existing `MicroSeries` / `MicroDataFrame` APIs so new behaviour is discoverable.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Point CONTRIBUTING.md at the shared PolicyEngine contribution guide (https://github.com/PolicyEngine/.github) and trim the per-repo file to commands, repo-specific conventions, and anti-patterns. Removes the stale `changelog_entry.yaml` / `make changelog` instructions.

0 commit comments

Comments
 (0)