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

Unit test compute_epoch() #891

Closed
2 tasks done
samarth9008 opened this issue Apr 29, 2024 · 3 comments · Fixed by #901
Closed
2 tasks done

Unit test compute_epoch() #891

samarth9008 opened this issue Apr 29, 2024 · 3 comments · Fixed by #901
Assignees

Comments

@samarth9008
Copy link
Collaborator

samarth9008 commented Apr 29, 2024

There is a compute_epoch() in core/finance/prediction_processing.py (link) that is being used in compute_twap_vwap()

We need to add unit tests using synthetic test data. Create simple short input Series/Dataframe with pd.Timestamp index. 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)

Add 4 unit tests:

  • 3 for each available unit value for a Series input
  • 1 for any unit type but on a DataFrame input

See unit test doc to follow the code style

Assigning @samarth9008 to re-distribute

FYI @gpsaggese @DanilYachmenev

@aish-nidhi
Copy link
Collaborator

Added 3 unit tests for each available unit value for a Series input.
Tested the code. All 3 test cases passing.
image

Ran linter on the file.

@DanilYachmenev
Copy link
Collaborator

@aish-nidhi where is PR?

@aish-nidhi
Copy link
Collaborator

Just created one -PR SorrTask891

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 a pull request may close this issue.

3 participants