Skip to content

reorganize for releasable v1 - #135

Merged
aclerc merged 3 commits into
v1from
v1-W0
Aug 28, 2026
Merged

reorganize for releasable v1#135
aclerc merged 3 commits into
v1from
v1-W0

Conversation

@aclerc

@aclerc aclerc commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

aclerc and others added 2 commits August 28, 2026 14:07
… skeleton

Adopt a src/ layout so the v1 package can claim the `wind_up` import name while the
legacy tool is retained as `wind_up_v0` (distribution stays `res-wind-up`; only import
names change).

- move legacy `wind_up/` to `src/wind_up_v0/`; add a minimal `src/wind_up/` v1 skeleton
  (docstring + __version__ + py.typed) for W1 to fill
- repoint every importer (v0_binned baseline, benchmarking, tests, examples, and the
  smarteole notebook) to `wind_up_v0`
- constants.py PROJECTROOT_DIR parents[1] -> parents[2] (repo root is one level deeper)
- pyproject packaging (where=["src","."]), coverage source, ruff paths, CODEOWNERS
- document Git LFS as a prerequisite; gitignore the smarteole example download

Behaviour-preserving: the v0 output-schema key "wind_up_version" is unchanged, poe lint
is green (mypy 120 files), 819 tests pass, and the smarteole/wedowind example plots and
numbers are byte/pixel-identical before and after.

benchmarking/ stays packaged temporarily (imported by a separate project); dropping it
from the release artifact and deleting the legacy config/input_data/cache root folders
are deferred to W2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aclerc
aclerc changed the base branch from main to v1 August 28, 2026 13:55
@aclerc
aclerc requested a balanced review from Copilot August 28, 2026 13:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reorganizes the project into a src/ layout, preserves the legacy implementation as wind_up_v0, and reserves wind_up for the forthcoming v1 API.

Changes:

  • Migrates legacy imports and implementation to wind_up_v0.
  • Adds the v1 package skeleton and updates packaging configuration.
  • Updates tests, examples, documentation, and benchmarking integrations.

Reviewed changes

Copilot reviewed 98 out of 108 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/CODEOWNERS Updates package ownership paths.
.gitignore Ignores downloaded SmartEole data.
README.md Documents Git LFS setup.
pyproject.toml Configures src-layout packaging and tooling.
src/wind_up/__init__.py Adds the v1 package skeleton.
src/wind_up/py.typed Marks the v1 package as typed.
src/wind_up_v0/__init__.py Updates legacy package wording.
src/wind_up_v0/caching.py Migrates internal imports.
src/wind_up_v0/circular_math.py Moves circular-math utilities.
src/wind_up_v0/combine_results.py Migrates internal imports.
src/wind_up_v0/constants.py Adjusts repository-relative paths.
src/wind_up_v0/conversions.py Moves timezone utilities.
src/wind_up_v0/detrend.py Migrates internal imports.
src/wind_up_v0/era5.py Moves ERA5 fetching support.
src/wind_up_v0/interface.py Migrates legacy public interfaces.
src/wind_up_v0/long_term.py Migrates internal imports.
src/wind_up_v0/main_analysis.py Migrates analysis orchestration.
src/wind_up_v0/models.py Migrates model dependencies.
src/wind_up_v0/northing.py Migrates northing dependencies.
src/wind_up_v0/northing_utils.py Migrates constants import.
src/wind_up_v0/optimize_northing.py Migrates optimization dependencies.
src/wind_up_v0/pp_analysis.py Migrates pre/post analysis imports.
src/wind_up_v0/reanalysis_data.py Migrates reanalysis dependencies.
src/wind_up_v0/result_manager.py Moves warning management.
src/wind_up_v0/scada_funcs.py Migrates SCADA dependencies.
src/wind_up_v0/scada_power_curve.py Migrates plotting dependencies.
src/wind_up_v0/smart_data.py Migrates data-loading dependencies.
src/wind_up_v0/waking_state.py Migrates waking-state dependencies.
src/wind_up_v0/wind_funcs.py Moves turbine calculations.
src/wind_up_v0/windspeed_drift.py Migrates drift dependencies.
src/wind_up_v0/ws_est.py Migrates wind-speed estimation.
src/wind_up_v0/yaml_loader.py Moves YAML include support.
src/wind_up_v0/plots/__init__.py Establishes legacy plots package.
src/wind_up_v0/plots/combine_results_plots.py Migrates model imports.
src/wind_up_v0/plots/data_coverage_plots.py Migrates plotting imports.
src/wind_up_v0/plots/detrend_plots.py Migrates plotting imports.
src/wind_up_v0/plots/input_data.py Migrates plotting imports.
src/wind_up_v0/plots/long_term_plots.py Migrates model imports.
src/wind_up_v0/plots/misc_plots.py Migrates type imports.
src/wind_up_v0/plots/northing_plots.py Migrates northing imports.
src/wind_up_v0/plots/optimize_northing_plots.py Migrates plotting imports.
src/wind_up_v0/plots/pp_analysis_plots.py Migrates plotting dependencies.
src/wind_up_v0/plots/reanalysis_plots.py Migrates plotting imports.
src/wind_up_v0/plots/scada_funcs_plots.py Migrates plotting dependencies.
src/wind_up_v0/plots/scada_power_curve_plots.py Migrates plotting imports.
src/wind_up_v0/plots/waking_state_plots.py Migrates plotting imports.
src/wind_up_v0/plots/windspeed_drift_plots.py Migrates type imports.
src/wind_up_v0/plots/ws_est_plots.py Migrates model imports.
src/wind_up_v0/plots/yaw_direction_plots.py Migrates plotting imports.
benchmarking/baselines/hot_context.py Uses the legacy namespace.
benchmarking/baselines/v0_binned.py Uses the legacy analysis API.
benchmarking/synthetic/sources/hill_of_towie.py Uses legacy column definitions.
benchmarking/synthetic/upgrades.py Uses legacy wake calculations.
examples/kelmarsh_kaggle.py Migrates example imports.
examples/smarteole_utils.py Migrates helper imports.
examples/wedowind_example.py Migrates example imports.
docs/v1/README.md Expands the v1 workstream summary.
docs/v1/issues_campaigns.md Adds robustness and release workstreams.
docs/superpowers/specs/2026-08-28-w0-src-layout-rename-design.md Documents the migration design.
tests/conftest.py Migrates shared fixtures.
tests/test_backend.py Tests the legacy package backend.
tests/test_combine_results.py Migrates result-combination tests.
tests/test_conversions.py Migrates conversion tests.
tests/test_detrend.py Migrates detrending tests.
tests/test_era5.py Migrates ERA5 tests.
tests/test_helpers.py Migrates caching tests.
tests/test_interface.py Migrates interface tests.
tests/test_long_term.py Migrates long-term tests.
tests/test_main_analysis.py Migrates analysis and logger tests.
tests/test_math_funcs.py Migrates circular-math tests.
tests/test_models.py Migrates model tests.
tests/test_northing.py Migrates northing tests.
tests/test_optimize_northing.py Migrates optimization tests.
tests/test_power_curve.py Migrates power-curve tests.
tests/test_reanalysis_data.py Migrates reanalysis tests.
tests/test_rolling_circ_mean.py Migrates circular-mean tests.
tests/test_rolling_circ_median.py Migrates circular-median tests.
tests/test_scada_funcs.py Migrates SCADA tests.
tests/test_smart_data.py Migrates smart-data tests.
tests/test_smarteole.py Migrates SmartEole tests.
tests/test_version.py Tests the v1 skeleton version.
tests/test_waking_state.py Migrates waking-state tests.
tests/test_wedowind.py Migrates package version assertions.
tests/test_wind_funcs.py Migrates turbine-function tests.
tests/test_windspeed_drift.py Migrates drift tests.
tests/test_ws_est.py Migrates wind-speed estimation tests.
tests/test_data/hot/data_loader.py Migrates HOT data loading.
tests/test_data/hot/helpers.py Migrates HOT helper imports.
tests/test_data/hot/unpack.py Migrates HOT cache imports.
tests/pp_analysis/test_cook_pp.py Migrates pre/post processing tests.
tests/pp_analysis/test_pp_analysis.py Migrates pre/post analysis tests.
tests/plots/test_input_data.py Migrates input plotting tests.
tests/plots/test_northing_plots.py Migrates northing plotting tests.
tests/plots/test_optimize_northing_plots.py Migrates optimization plotting tests.
tests/plots/test_scada_funcs_plots.py Migrates SCADA plotting tests.
tests/benchmarking/baselines/test_hot_context.py Migrates YAML loader usage.
tests/benchmarking/baselines/test_naive_ratio.py Updates independence checks.
tests/benchmarking/baselines/test_toggle_specialist.py Updates independence checks.
tests/benchmarking/harness/test_replicates.py Migrates timestamp constants.
tests/benchmarking/harness/test_scoring.py Migrates timestamp constants.
tests/benchmarking/synthetic/test_generator.py Migrates timestamp constants.
tests/benchmarking/synthetic/test_ground_truth.py Migrates timestamp constants.
tests/benchmarking/synthetic/test_make_example_datasets.py Migrates timestamp constants.
tests/benchmarking/synthetic/test_plots.py Migrates timestamp constants.
tests/benchmarking/synthetic/test_wake_steering.py Migrates timestamp constants.
tests/benchmarking/synthetic/sources/test_hill_of_towie.py Migrates legacy constants.
tests/benchmarking/synthetic/sources/test_hill_of_towie_cache.py Migrates legacy constants.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/wind_up/__init__.py
Comment thread pyproject.toml
Comment thread tests/benchmarking/baselines/test_naive_ratio.py Outdated
Comment thread tests/benchmarking/baselines/test_toggle_specialist.py Outdated
…ne guards

Address PR #135 review feedback:

- benchmarking/synthetic/upgrades.py: pin shape-agnostic npt.NDArray[np.float64]
  annotations on cp_ratio/ws_factor/nacelle_delta and cast the _is_waked argument to
  float64, so mypy passes under the numpy resolved on Python 3.10. This lint failure
  predates W0 (it came in with the wake-steering work and the v1 branch was already
  red on 3.10); the fix is type-only, no runtime change.
- README.md: repoint the quick-start imports from `wind_up` to `wind_up_v0`. The
  `wind_up` package is now the empty v1 skeleton, so the old snippets raised
  ModuleNotFoundError.
- src/wind_up_v0/py.typed: PEP 561 marker for the retained, fully typed legacy API.
- test_naive_ratio / test_toggle_specialist: the independence guards now reject both
  `wind_up` and `wind_up_v0`, so an "independent" baseline cannot quietly import either.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aclerc
aclerc merged commit ecc5f18 into v1 Aug 28, 2026
@aclerc
aclerc deleted the v1-W0 branch August 28, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants