Skip to content

feat(ElectricityMaps source): unify ElectricityMaps and ElectricityMapsFree #619

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

unitrium
Copy link
Contributor

@unitrium unitrium commented Mar 10, 2025

Pull Request

Issue Number: #613

Summary

Remove all references to ElectricityMapsFree as it has been unified with ElectricityMaps.

Changes

  • Update the documentation to remove references to ElectricityMapsFree and replace them when necessary with ElectricityMaps.
  • Remove the controllers for ElectricityMapsFree and associated tests.
  • Remove the free trial of ElectricityMaps mention as this has been replaced by a free permanent token.

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 API changes expected.

Is this a breaking change?

The ElectricityMapsFree source will no longer be available.

Anything else?

cc @jbdietrich

Please follow
GitHub's suggested syntax
to link Pull Requests to Issues via keywords

This PR Closes #613

@unitrium unitrium requested a review from vaughanknight as a code owner March 10, 2025 13:47
…eply.github.com>

I, Robin TROESCH <[email protected]>, hereby add my Signed-off-by to this commit: b086396
I, Robin TROESCH <[email protected]>, hereby add my Signed-off-by to this commit: e3ba7d1

Signed-off-by: Robin TROESCH <[email protected]>
Copy link

@Copilot 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 unifies the ElectricityMaps and ElectricityMapsFree sources by removing all references and dependencies on ElectricityMapsFree in both documentation and test code. Key changes include updating documentation to reflect only the ElectricityMaps source, removing the ElectricityMapsFree controllers and tests, and revising configuration examples and environment variable settings.

Reviewed Changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated no comments.

Show a summary per file
File Description
casdk-docs/docs/tutorial-extras/selecting-a-data-source.md Removed references to ElectricityMapsFree from the data source table.
src/CarbonAware.CLI/test/integrationTests/IntegrationTestingBase.cs Removed the ElectricityMapsFree using/import and case block and updated environment variable settings.
casdk-docs/docs/overview/enablement.md Eliminated the ElectricityMapsFree link from the enablement list.
src/CarbonAware.CLI/test/integrationTests/Commands/Emissions/EmissionsCommandTests.cs Removed the ElectricityMapsFree test fixture.
samples/casdk-demo/README.md Updated sample configuration from ElectricityMapsFree to ElectricityMaps.
casdk-docs/docs/quickstart.md Adjusted configuration examples to remove ElectricityMapsFree references.
casdk-docs/docs/architecture/data-sources.md Removed ElectricityMapsFree from the data sources list.
casdk-docs/docs/tutorial-extras/packaging.md Cleared out ElectricityMapsFree related configuration and project references.
casdk-docs/docs/tutorial-extras/carbon-aware-library.md Deleted ElectricityMapsFree sections from the library documentation.
casdk-docs/docs/architecture/c-sharp-client-library.md Removed ElectricityMapsFree from the client library documentation.
src/CarbonAware.CLI/test/integrationTests/Commands/Location/LocationCommandTests.cs Removed the ElectricityMapsFree test fixture.
casdk-docs/docs/tutorial-extras/containerization.md Eliminated ElectricityMapsFree Docker run instructions.
casdk-docs/docs/tutorial-basics/containerization.md Similar removal of ElectricityMapsFree instructions.
casdk-docs/docs/tutorial-basics/carbon-aware-webapi.md Removed ElectricityMapsFree sections from the WebAPI documentation.
casdk-docs/docs/tutorial-extras/configuration.md Removed config sections related to ElectricityMapsFree.
src/CarbonAware.CLI/test/integrationTests/Commands/EmissionsForecasts/EmissionsForecastsCommandTests.cs Removed commentary/test fixture for ElectricityMapsFree.
src/CarbonAware.DataSources/CarbonAware.DataSources.ElectricityMapsFree/mock/ElectricityMapsFreeDataSourceMocker.cs Removed the ElectricityMapsFree data source mocker entirely.

@danuw
Copy link
Collaborator

danuw commented Mar 18, 2025

Thank you very much for this contribution.

It (this PR) does not seem to compile correctly though, to pass the basic checks. @unitrium are you able to double check you committed everything you had planned to please?

Let me know if you need any help.

cc @jbdietrich

@unitrium
Copy link
Contributor Author

Thanks, I will double-check and see what I can do

…eply.github.com>

I, Robin TROESCH <[email protected]>, hereby add my Signed-off-by to this commit: ea41012

Signed-off-by: Robin TROESCH <[email protected]>
@unitrium
Copy link
Contributor Author

Seems to be working now. Ready for review

@lav-julien
Copy link
Contributor

Hi @danuw, would you be able to review this PR? The current documentation is outdated on Electricity Maps offering and might confuse users as our free offering has been changed and unified with our main commercial offering, let me know if you have any questions

export CASDK_DataSources__EmissionsDataSource=ElectricityMaps
export CASDK_DataSources__ForecastDataSource=ElectricityMaps
export CASDK_DataSources__Configurations__ElectricityMaps__Type=ElectricityMaps
export CASDK_DataSources__Configurations__ElectricityMaps__token=YOUR_SECRET_TOKEN
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both APITokenHeader and APIToken should be configured here, right? If so, please update configuration examples.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, should be good now!

Copy link
Member

@YaSuenag YaSuenag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks a lot for your contribution!

@danuw danuw merged commit 3729a26 into Green-Software-Foundation:dev Apr 14, 2025
9 checks passed
@danuw danuw added the v1.8 label Apr 15, 2025
@danuw danuw mentioned this pull request Apr 28, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Electricity Maps API configuration is out of date
4 participants