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

Remove JSON examples from artifacts #450

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

YaSuenag
Copy link
Contributor

Pull Request

#440

Summary

Remove data source and location source JSONs from artifacts.

These JSONs are no longer provided from both CLI and WebAPI includes container image, but we can use them of course if we need because JSONs are still kept in the repo.

Changes

Essense of this PR is following:

  • src/CarbonAware.DataSources/CarbonAware.DataSources.Json/src/CarbonAware.DataSources.Json.csproj
    • Remove JSONs in data-sources/ from ItemGroup, and data-sources/json would be created in publish directory.
  • src/CarbonAware.LocationSources/src/CarbonAware.LocationSources.csproj
    • Remove JSONs in location-sources/ from ItemGroup, and location-sources/json would be created in publish directory.
  • src/CarbonAware.DataSources/CarbonAware.DataSources.Json/src/Configuration/JsonDataSourceConfiguration.cs
    • test-data-azure-emissions.json is no longer set by default.
  • src/CarbonAware.WebApi/src/Dockerfile
    • WebAPI container is no longer started without any configuration, so set JSON data source before dotnet tool run for generating OpenAPI document.
  • src/CarbonAware.WebApi/src/appsettings.json
    • Remove data source configuration.
  • src/GSF.CarbonAware/src/GSF.CarbonAware.csproj
    • Remove both data-sources and location-sources.
  • src/GSF.CarbonAware/src/GSF.CarbonAware.targets
    • Remove both data-sources and location-sources, but they would be created into publish directory.

This PR has other changes, but they are for test cases because they depends JSON data source and location source.

Note that I commented out test case for ElectricityMapsFree in both src/CarbonAware.WebApi/test/integrationTests/CarbonAwareControllerTests.cs and src/CarbonAware.WebApi/test/integrationTests/LocationsControllerTests.cs because IntegrationTestingBase.cs does not have configuration for ElectricityMapsFree. I will fix it after this PR.

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?

This PR breaks current behavior. CASDK is no longer refer test-data-azure-emissions.json for data source and azure-regions.json for location source. CASDK requires the user to configure data source at least.

Closes Green-Software-Foundation#440

Signed-off-by: Yasumasa Suenaga <suenaga@oss.nttdata.com>
Signed-off-by: Yasumasa Suenaga <suenaga@oss.nttdata.com>
Signed-off-by: Yasumasa Suenaga <suenaga@oss.nttdata.com>
Signed-off-by: Yasumasa Suenaga <suenaga@oss.nttdata.com>
Copy link
Contributor

This a stale pull request. Please review, update or/and close as necessary.

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.

None yet

2 participants