-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Tests for doppler factor functions #2379
Tests for doppler factor functions #2379
Conversation
…_factor_full_relativity
Codecov Report
@@ Coverage Diff @@
## master #2379 +/- ##
==========================================
- Coverage 70.57% 68.64% -1.94%
==========================================
Files 139 145 +6
Lines 12875 13251 +376
==========================================
+ Hits 9087 9096 +9
- Misses 3788 4155 +367
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests look good. However, I think it would be good if all tests relating to frame transformations are in the same file. There are already tests in tardis/montecarlo/tests/test_montecarlo.py. You could move your tests there or vice versa. In principle, the tests could also go into a test file in transport
where the frame transformations live. Btw test_get_doppler_factor
seems to be duplicated. It is in this file and tardis/montecarlo/tests/test_montecarlo.py. Maybe remove the duplicate?
I did this, can you take a look again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Could slap in some basic docstrings so all the boxes are checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There still seem to be some duplicated tests (from test_montecarlo.py). Also, I would move all of the doppler factors tests to the new test file.
# Perform required assertions | ||
assert_almost_equal(obtained, expected) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more doppler factor tests below. I would also move them to the new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. It looks like it doesn't exist anymore. I also just noticed that all tests in test_montecarlo.py are skipped because of pytestmark = pytest.mark.skip(reason="Port from C to numba")
. This explains why the tests did not fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make an issue that we should check if there are any tests in test_montecarlo.py that we actually need but are currently skipped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! However, we should figure out if we need any of the tests from test_montecarlo that are currently skipped.
# Perform required assertions | ||
assert_almost_equal(obtained, expected) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. It looks like it doesn't exist anymore. I also just noticed that all tests in test_montecarlo.py are skipped because of pytestmark = pytest.mark.skip(reason="Port from C to numba")
. This explains why the tests did not fail.
# Perform required assertions | ||
assert_almost_equal(obtained, expected) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make an issue that we should check if there are any tests in test_montecarlo.py that we actually need but are currently skipped?
📝 Description
Type: 🪲
bugfix
| 🚀feature
| ☣️breaking change
| 🚦testing
| 📝documentation
| 🎢infrastructure
Add tests for doppler factor full_relativiry and partial_relativity
Also, link issues affected by this pull request by using the keywords:
close
,closes
,closed
,fix
,fixes
,fixed
,resolve
,resolves
orresolved
.📌 Resources
Examples, notebooks, and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label