Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code improvements #99

Open
14 tasks
veenstrajelmer opened this issue Jun 27, 2023 · 0 comments
Open
14 tasks

Code improvements #99

veenstrajelmer opened this issue Jun 27, 2023 · 0 comments

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Jun 27, 2023

Documentation:

hatyansettings:

  • move validation of timestep argument for prediction() to HatyanSettings?
  • clean up HatyanSettings related code, maybe validate arguments in a more charming way
  • also validate const_list and times with hatyan.HatyanSettings, const_list is now validated with check_requestedconsts multiple times (u/f/analysis functions), times is validated in hatyan.prediction()
  • maybe make kwargs in HatyanSettings to reduce number of input arguments. Still raise exception if not all kwargs were popped after init. complexity of this class is also way too high, so maybe first redesign it.

resample_timeseries:

  • hatyan.resample_timeseries(): round dataframe to 'S' before doing anything, start new datetimeindex on 00 minute
  • make resample_timeseries() work with times slice instead of three keywords? Or deprecate. At least covert timestep_min to timestep and do freq validation there

metadata:

  • Consider updating metadata "origin" attribute of components object: when slotgem is overwritten, with component splitting, with merging of component sets, in case of analysis-perperiod vs. atonce and maybe other settings. Not possible to derive these details from existing/old components file, so is it useful?
  • add vertref/station from metadata to components/timeseries plot (if available), also requires comparing these attrs between input arguments
  • write_dia does not allow vertref/station arguments anymore, add deprecationerror

Code improvements:

  • Improve code quality #57
  • Increase performance with numba (Lru_cache also helps significantly), maybe add pandas performance dependencies
  • Align foreman/schureman, avoids code with same functions. Not easy, but aligning shallowrelations should be possible. Or move from schureman to simplified foreman?
  • Improve analysis prediction varnames? (eg v, u, f)
  • Check if there are any try/except combi's that are not error specific. Raise predefined errors like ValueError or custom errors like like hatyan.analyis_prediction.MatrixConditionTooHigh and catch them properly (not a general 'except:' and no general 'raise Exception()')
  • Numbering of extremes/HWLW: store phasediff-compute-script (numbering_extremes.py) properly

Improve configfiles:

@veenstrajelmer veenstrajelmer added the enhancement New feature or request label Jun 27, 2023
@veenstrajelmer veenstrajelmer mentioned this issue Aug 4, 2023
96 tasks
@veenstrajelmer veenstrajelmer removed the enhancement New feature or request label May 13, 2024
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

No branches or pull requests

1 participant