Skip to content

Commit 7e835d6

Browse files
committed
Add project handoff documentation and machine-readable status
1 parent 9d11bd7 commit 7e835d6

File tree

2 files changed

+111
-0
lines changed

2 files changed

+111
-0
lines changed

HANDOFF.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# GeoCompare Handoff
2+
3+
## Snapshot
4+
- Project: `geocompare`
5+
- Handoff date: 2026-03-08
6+
- Branch: `master`
7+
- Version: `0.6.2`
8+
- Last completed commit at handoff prep: `9d11bd7` (`Bump version to 0.6.2`)
9+
10+
## Purpose
11+
GeoCompare builds and queries local demographic/geographic data products (Gazetteer + ACS-derived inputs) and supports ranking, distance, nearest geographies, and profile exports.
12+
13+
## Environment
14+
- Python: 3.9+
15+
- Package/deps: managed via `pyproject.toml`
16+
- Common setup:
17+
- `python3 -m pip install -e ".[dev]"`
18+
19+
## Canonical CLI (Current)
20+
Use canonical commands and flags only.
21+
22+
- Build data products:
23+
- `python3 -m geocompare.interfaces.cli build <data_path>`
24+
- Search:
25+
- `python3 -m geocompare.interfaces.cli query search "san francisco"`
26+
- Profile:
27+
- `python3 -m geocompare.interfaces.cli query profile "San Francisco city, California"`
28+
- Top/bottom with modern filter and scope:
29+
- `python3 -m geocompare.interfaces.cli query top median_year_structure_built --where 'population>=100000' --universe places --in-state ca`
30+
- `python3 -m geocompare.interfaces.cli query bottom median_household_income --where 'population>=50000' --scope places+ca`
31+
- Nearest:
32+
- `python3 -m geocompare.interfaces.cli query nearest "San Francisco city, California" --where 'population>=100000' --universe places --in-state ca -n 10`
33+
- Resolve:
34+
- `python3 -m geocompare.interfaces.cli resolve "San Francisco, CA" --state ca -n 5`
35+
- Export rows:
36+
- `python3 -m geocompare.interfaces.cli export rows ":population :income" --where 'population>=100000' --universe places --in-state ca`
37+
38+
## Important Interface Decisions
39+
- Legacy CLI aliases were purged.
40+
- Removed command aliases like `hv`, `lv`, `cg`, `dist`, `dp`, etc.
41+
- Removed legacy flag names `--geofilter` and `--context`.
42+
- Canonical query flags are:
43+
- Filter: `--where` (short: `-w`)
44+
- Scope string: `--scope` (short: `-s`)
45+
- Explicit scope composition: `--universe`, plus one of `--in-state|--in-county|--in-zcta`
46+
- Legacy tool shims were removed.
47+
- Deleted: `CountyTools.py`, `StateTools.py`, `KeyTools.py`, `SummaryLevelTools.py`
48+
- Canonical modules: `county_lookup.py`, `state_lookup.py`, `county_key_index.py`, `summary_level_parser.py`
49+
50+
## Shell Caveat
51+
- In `zsh`, quote or escape filter expressions that contain `>` or `<`.
52+
- Good: `--where 'population>=100000'`
53+
- Good: `--where population\>=100000`
54+
55+
## Data Expectations
56+
- Build command expects source files under the provided `<data_path>`.
57+
- The project has support for recent ACS table-based inputs and latest Gazetteer-era ingestion logic integrated in prior updates.
58+
- If refreshing download logic, verify source year discovery against the files present in `<data_path>`.
59+
60+
## Validation / Definition of Done
61+
Before ACP:
62+
1. `ruff check geocompare/interfaces/cli.py geocompare/engine.py geocompare/tools tests`
63+
2. `python3 -m pytest -q`
64+
3. Run at least one smoke query:
65+
- `python3 -m geocompare.interfaces.cli --version`
66+
- `python3 -m geocompare.interfaces.cli query search "san francisco" -n 3`
67+
- `python3 -m geocompare.interfaces.cli query top median_year_structure_built --where 'population>=100000' --universe places --in-state ca -n 5`
68+
69+
## ACP Workflow
70+
- Stage only intended files.
71+
- Commit message should describe functional change precisely.
72+
- Push to `origin/master` unless directed otherwise.
73+
74+
## Immediate Backlog Suggestions
75+
1. Add CLI integration tests that invoke argument parsing paths for `--where`, `--scope`, and explicit scope flags.
76+
2. Document canonical CLI examples in `README.md` and remove any remaining historical examples.
77+
3. Optionally add `--where` parser help examples for compound (`:c`/`:cc`) usage.

handoff.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"project": "geocompare",
3+
"handoff_date": "2026-03-08",
4+
"branch": "master",
5+
"version": "0.6.2",
6+
"last_commit": "9d11bd7",
7+
"status": {
8+
"lint_status": "pass (scoped checks on touched files)",
9+
"test_status": "pass (26 passed)",
10+
"build_status": "recently validated by user in-session"
11+
},
12+
"interfaces": {
13+
"canonical_filter_flag": "--where",
14+
"canonical_scope_flag": "--scope",
15+
"explicit_scope_flags": [
16+
"--universe",
17+
"--in-state",
18+
"--in-county",
19+
"--in-zcta"
20+
],
21+
"legacy_aliases_removed": true,
22+
"legacy_tool_shims_removed": true
23+
},
24+
"validation_commands": [
25+
"ruff check geocompare/interfaces/cli.py geocompare/engine.py geocompare/tools tests",
26+
"python3 -m pytest -q",
27+
"python3 -m geocompare.interfaces.cli --version"
28+
],
29+
"next_tasks": [
30+
"Add CLI integration tests for --where and scope composition",
31+
"Refresh README with canonical commands only",
32+
"Consider richer filter-help examples for :c/:cc suffix usage"
33+
]
34+
}

0 commit comments

Comments
 (0)