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

feat(lbp): add simulation test #160

Merged
merged 3 commits into from
Sep 28, 2021
Merged

feat(lbp): add simulation test #160

merged 3 commits into from
Sep 28, 2021

Conversation

Roznovjak
Copy link
Collaborator

@Roznovjak Roznovjak commented Sep 15, 2021

Description

Implement a test simulating an LBP event

Related Issue

Fixes: #70

@Roznovjak Roznovjak self-assigned this Sep 15, 2021
@codecov
Copy link

codecov bot commented Sep 15, 2021

Codecov Report

Merging #160 (bd59140) into master (3275c17) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #160      +/-   ##
==========================================
- Coverage   85.39%   85.38%   -0.01%     
==========================================
  Files          21       21              
  Lines        2109     2108       -1     
==========================================
- Hits         1801     1800       -1     
  Misses        308      308              
Impacted Files Coverage Δ
pallets/lbp/src/lib.rs 86.00% <100.00%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a5c63d...bd59140. Read the comment docs.

@Roznovjak
Copy link
Collaborator Author

@jak-pan @lumir-mrkva I have implemented a new test simulating an LBP event under the same conditions as the simulation from the google sheet. I have also created new sheet and updated the price calculation in the sheet because the old implementation was using weights from previous blocks. Differences between the results of the simulations are significant.

@Roznovjak
Copy link
Collaborator Author

I was able to reduce the difference between the test and the sheet to ~0.3%

@enthusiastmartin
Copy link
Contributor

@Roznovjak perhaps it would be better to implement this as part of integration tests ? it uses basilisk-runtime so you'd be working with that instead of mocked runtime.
It is actually does not require changes in your test - only context which you run it in.

what do you think ?

@mrq1911 mrq1911 marked this pull request as ready for review September 28, 2021 11:49
@mrq1911 mrq1911 merged commit 41f2391 into master Sep 28, 2021
@mrq1911 mrq1911 deleted the feat/lbp_sim_test branch October 4, 2021 19:38
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.

LBP model simulator
3 participants