Closed aguspesce closed 3 years ago
Hi @rafaelmds. Thanks for your review and suggestions
It is a draft of my idea to test the code. All suggestions and ideas are welcome. Due to this test run in python, I am thinking to use pytest
to create this kind of test because it has more tools to make the test. What do you think?
The folder order and name are symbolic, we can change it!
I aggre with pytest, I think it will also make it easier to integrate with github actions
@rafaelmds ... Now the test is using pytest!! Can you run it in your pc? And give me your review. #
WOW!
==== 22 passed in 5.38s ====
@aguspesce thanks for the effort on putting this to work! testing code is much cleaner and output formatting its very nice!
Will do my complete review soon, but I think its all to go merge!
I also tested failed tests. I got (by changing denok value)
=== 7 failed, 15 passed in 4.12s ====
which I think its good result, since we can detect a small deviation in some values but not all together at same time.
@rafaelmds... Do you think that maybe we must add another model test?
@victorsacek maybe we can add the instantaneous indentor benchmark.
@victorsacek, @rafaelmds and @jamisonassuncao ... Do you have other idea to test the code? From my part, I think that this test is ok! It is not automatically, but in the contribution guideline I put that it is mandatory to run the test in each code improvement.
What do you think? Is ready to merge to main?
@aguspesce I was talking to @victorsacek about the "expected" results for the model. We can limit comparison to first output of results. Its enough to assert the results and also we gain in simulation time.
@rafaelmds and @victorsacek, The Crameri model doesn't take too much time to run and compare the two first time steps. It takes less than 1 minute. instead, I tried to make a test using a more complex model like continental rift, but it is impossible to use it because it needs 30 minutes to solve the first time step
Create a test to check that the Mandyoc output result for the Crameri model is equal to the expected result.
It is a first approximation... I am thinking to use pytest to improve the code
Don't merge this PR without merge #31
Fix #20