Skip to content

Remove dead code#39

Open
bjarketol wants to merge 3 commits intoEUFLOW:mainfrom
bjarketol:main
Open

Remove dead code#39
bjarketol wants to merge 3 commits intoEUFLOW:mainfrom
bjarketol:main

Conversation

@bjarketol
Copy link
Contributor

Remove dead code

Removed unused imports from pywake_api.py:

  • matplotlib.pyplot as plt
  • pandas as pd
  • NOJ, BastankhahGaussian, HorizontalGrid from py_wake
  • CGIRotorAvg, EqGridRotorAvg, GaussianOverlapAvgModel, GQGridRotorAvg, PolarGridRotorAvg, polar_gauss_quadrature from rotor_avg_models
  • PowerCtFunctions from power_ct_functions

Removed unused import from main_api.py:

  • import yaml

Deleted commented-out code blocks:

  • Old farm/resource loading code (~13 lines)
  • Commented XRSite construction (~6 lines)
  • Old output directory logic (~5 lines)
  • Old AEP printing (~2 lines)
  • Power percentile calculation block (~21 lines)
  • Flow map and power table comments (~13 lines)
  • Duplicate YAML output code (~40 lines)
  • Various debug/TODO comments throughout

Removed unused imports from pywake_api.py:
  - matplotlib.pyplot as plt
  - pandas as pd
  - NOJ, BastankhahGaussian, HorizontalGrid from py_wake
  - CGIRotorAvg, EqGridRotorAvg, GaussianOverlapAvgModel, GQGridRotorAvg, PolarGridRotorAvg, polar_gauss_quadrature from rotor_avg_models
  - PowerCtFunctions from power_ct_functions

Removed unused import from main_api.py:
  - import yaml

Deleted commented-out code blocks:
  - Old farm/resource loading code (~13 lines)
  - Commented XRSite construction (~6 lines)
  - Old output directory logic (~5 lines)
  - Old AEP printing (~2 lines)
  - Power percentile calculation block (~21 lines)
  - Flow map and power table comments (~13 lines)
  - Duplicate YAML output code (~40 lines)
  - Various debug/TODO comments throughout
 - pywake_api.py: Remove unused import, use batch dict rename
 - wayve_api.py: Add named constants (GRAVITY, KAPPA, etc.),
   extract helper functions, vectorize rotate_xy_arrays(),
   simplify boolean expressions, use .get() with defaults
 - foxes_api.py: Simplify engine config conditional with any()
 - Mark wayve tests as slow, add pytest marker config
 - Add MR_SUMMARY.md documenting all changes

Co-Authored-By: Claude Opus 4.5
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.

1 participant