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

Support co2_aoer in WattTime #611

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

YaSuenag
Copy link
Member

Pull Request

Summary

Add configuration for signal type in WattTime datasource.

WattTime supports 2 signal type:

  • co2_moer: marginal
  • co2_aoer: average

Some SDK users want to get average emission data from WattTime like ElectricityMaps, so Carbon Aware SDK should support both signal types.

This PR keeps default configuration (co2_moer).

Changes

  • src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Constants/SignalTypes.cs
    • Change to enum from class
  • src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Configuration/ServiceCollectionExtensions.cs
    • Validate value of SignalType, abort if invalid value is set.

Checklist

  • Local Tests Passing?
  • CICD and Pipeline Tests Passing?
  • Added any new Tests?
  • Documentation Updates Made?
  • Are there any API Changes? If yes, please describe below.
  • This is not a breaking change. If it is, please describe it below.

Are there API Changes?

No

Is this a breaking change?

No

Signed-off-by: Yasumasa Suenaga <[email protected]>
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.

1 participant