-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add get_photon_frequency to light in celerity module #147
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
Conversation
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.
Pull Request Overview
This PR introduces a new function, get_photon_frequency, in the light module and adds tests to verify its output.
- Adds get_photon_frequency to calculate the frequency of a photon given its wavelength.
- Updates unit tests in tests/test_light.py to include a new test case for photon frequency.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_light.py | Updated import statement and added TestPhotonFrequency test class to verify output. |
| src/celerity/light.py | Added the get_photon_frequency function with a corresponding docstring outlining usage. |
7417d48 to
77adfd0
Compare
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.
Pull Request Overview
This PR introduces the get_photon_frequency function in the celerity module and adds corresponding tests.
- Added get_photon_frequency to calculate photon frequency from wavelength.
- Added tests in tests/test_light.py to verify functionality and error handling.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_light.py | Added tests for get_photon_frequency and error cases. |
| src/celerity/light.py | Introduced get_photon_frequency to compute photon frequency. |
bc6c594 to
42eb305
Compare
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.
Pull Request Overview
This PR adds a new function, get_photon_frequency, to the celerity.light module along with corresponding tests to verify its behavior. Key changes include updating the import statements in the test file, adding comprehensive tests for photon frequency (including a negative wavelength case), and implementing the get_photon_frequency function in the source module.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_light.py | Added tests for photon frequency calculation |
| src/celerity/light.py | Implemented get_photon_frequency with input validation |
feat: add get_photon_frequency to light in celerity module
42eb305 to
e3a51ae
Compare
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.
Pull Request Overview
This PR adds a new function, get_photon_frequency, to the celerity module while updating the tests to cover its behavior.
- Updated tests/test_light.py to import and test get_photon_frequency.
- Added a new implementation for get_photon_frequency in src/celerity/light.py with proper error handling for non-positive wavelengths.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_light.py | Added import statement and new tests for photon frequency. |
| src/celerity/light.py | Implemented get_photon_frequency with input validation. |
feat: add get_photon_frequency to light in celerity module