Skip to content

Conversation

@michealroberts
Copy link
Owner

feat: add get_photon_frequency to light in celerity module

@michealroberts michealroberts added enhancement New feature or request feature New feature or request labels May 3, 2025
@michealroberts michealroberts requested a review from Copilot May 3, 2025 12:49
@michealroberts michealroberts self-assigned this May 3, 2025
Copy link
Contributor

Copilot AI left a 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.

@michealroberts michealroberts force-pushed the feature/light/get_photon_frequency branch from 7417d48 to 77adfd0 Compare May 3, 2025 12:55
@michealroberts michealroberts requested a review from Copilot May 3, 2025 12:57
Copy link
Contributor

Copilot AI left a 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.

@michealroberts michealroberts force-pushed the feature/light/get_photon_frequency branch from bc6c594 to 42eb305 Compare May 3, 2025 12:59
@michealroberts michealroberts requested a review from Copilot May 3, 2025 13:01
Copy link
Contributor

Copilot AI left a 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
@michealroberts michealroberts force-pushed the feature/light/get_photon_frequency branch from 42eb305 to e3a51ae Compare May 3, 2025 13:02
@michealroberts michealroberts requested a review from Copilot May 3, 2025 13:08
Copy link
Contributor

Copilot AI left a 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.

@michealroberts michealroberts merged commit d8395ba into main May 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants