kaizenflow icon indicating copy to clipboard operation
kaizenflow copied to clipboard

Unit test compute_bar_start_timestamps()

Open samarth9008 opened this issue 1 year ago • 0 comments

There is a compute_bar_start_timestamps() in core/finance/prediction_processing.py (link) that is being used in the lib

We need to add unit tests using synthetic test data:

  • Create simple short input signal that is Series/DataFrame
  • Run the function on it and compare the outcome with string signature (for ref see tests in amp/helpers/test/test_hpandas.py e.g. Test_merge_dfs1)

We need 3 test methods:

  • [ ] Input if a DataFrame with a valid timestamp index with freq
  • [ ] Input if a Series with a valid timestamp index with freq
  • [ ] Input if a DataFrame with a not valid timestamp index, no freq (assert the error message)

See unit test doc to follow the code style Also highly recommend to read this doc before submitting 1st PR

FYI @gpsaggese @sonaalKant @DanilYachmenev

samarth9008 avatar May 13 '24 13:05 samarth9008