You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ Preliminary plan — review before executing. The task list below was
drafted automatically to scope this issue. It must be reviewed and approved
before any of it is implemented; treat it as a starting point, not a
committed plan.
Plan: unit tests, CI, and pre-commit
The package currently has no test suite, CI, or linting, so this covers all three. A guiding constraint: most data loaders hit live network APIs (neo-bolide, JPL CNEOS, GMN, IAU MDC), so unit tests must mock the network or use small packaged CSV/pickle fixtures rather than making real requests in CI.
1. Test scaffolding
Add pytest (+ pytest-cov) as a test optional-dependency group in pyproject.toml.
Create a tests/ package with a conftest.py providing shared fixtures (e.g. a small BolideDataFrame loaded from a committed CSV fixture).
Add small offline data fixtures under tests/data/ (a trimmed GLM CSV, a USG sample, a GMN sample) so loaders can be tested without network access.
2. Core BolideDataFrame tests (bdf.py)
Construction from each offline source: csv, pickle (and mocked glm/usg/gmn/remote).
Subclass preservation: indexing/filtering returns a BolideDataFrame, not a bare GeoDataFrame (_constructor, __getitem__, force_bdf_class).
annotate() adds the expected columns (phase, moon_fullness, solarhour, sun_alt_obs/_app).
filter_date (start only, end only, both; tz-naive vs tz-aware input; inplace True/False).
get_closest_by_time, get_closest_by_loc (haversine correctness), and get_closest dispatch logic.
filter_boundary and filter_observation (incl. intersection vs union; GOES-16/17 selection; the obs.csvheader=1 parsing).
filter_shower (with a fixture ShowerDataFrame to avoid IAU network calls).
Plan: unit tests, CI, and pre-commit
The package currently has no test suite, CI, or linting, so this covers all three. A guiding constraint: most data loaders hit live network APIs (neo-bolide, JPL CNEOS, GMN, IAU MDC), so unit tests must mock the network or use small packaged CSV/pickle fixtures rather than making real requests in CI.
1. Test scaffolding
pytest(+pytest-cov) as atestoptional-dependency group inpyproject.toml.tests/package with aconftest.pyproviding shared fixtures (e.g. a smallBolideDataFrameloaded from a committed CSV fixture).tests/data/(a trimmed GLM CSV, a USG sample, a GMN sample) so loaders can be tested without network access.2. Core
BolideDataFrametests (bdf.py)csv,pickle(and mockedglm/usg/gmn/remote).BolideDataFrame, not a bareGeoDataFrame(_constructor,__getitem__,force_bdf_class).annotate()adds the expected columns (phase,moon_fullness,solarhour,sun_alt_obs/_app).filter_date(start only, end only, both; tz-naive vs tz-aware input;inplaceTrue/False).get_closest_by_time,get_closest_by_loc(haversine correctness), andget_closestdispatch logic.filter_boundaryandfilter_observation(incl. intersection vs union; GOES-16/17 selection; theobs.csvheader=1parsing).filter_shower(with a fixtureShowerDataFrameto avoid IAU network calls).augmentcross-matching (time/score thresholds; intersection/outer/left).3. Supporting-module tests
fov_utils.get_boundary: valid names return polygons, invalid raiseValueError, intersection/union/collection options, CRS conversion.astro_utils:haversineagainst known distances,_distance_metric, solar/lunar helpers,sol_lon_to_jd/sol_lon_to_datetime.sources: each loader's parsing logic with mocked HTTP responses (e.g.responses/requests-mockor monkeypatcheddownload).sdf.ShowerDataFrame.get_dateswith a fixture.utilshelpers (reconcile_input,make_points,str_to_list).4. CI (GitHub Actions)
.github/workflows/tests.ymlrunning the suite on push and PR across a Python version matrix (respectrequires-python >=3.7).master.5. Pre-commit
.pre-commit-config.yamlwith a linter/formatter consistent with existing style (~100-char lines) — e.g.ruff/flake8plus whitespace/EOF hooks..gitignoreenforcement) to keep editor cruft (*.swp,*~) out of commits.pre-commit installand how to run the tests inCLAUDE.mdand the docs once in place.