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

[Sample]: Jupyter notebook Demo of web API #114

Closed

Conversation

Willmish
Copy link
Collaborator

@Willmish Willmish commented Sep 20, 2022

Summary

Adds a jupyter notebook demo along with a setup guide for the environment. This an Example for the /sample directory, to showcase the usage of a deployed Carbon Aware Web API and a Python SDK generated with OpenAPI generator. The notebook goes through an example process of making Carbon Aware decisions around Cloud deployments, by showcasing benefits of time shifting and location shifting.

Changes

  • Adds new directory in the samples folder: python-jupyter-notebook-webapi.
  • Adds a README.md file containing a short description of the demo along with a setup guide.
  • Adds a requirements.txt file for the conda/python environment.
  • Adds a .env.template file to be used as a template for a new .env file to provide URL for the deployed web API.
  • Adds the Jupyter notebook Carbon_aware_SDK_demo.ipynb containing the described demo, with results stored.

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.

@Willmish Willmish changed the title [Sample]: Jupyter notebook Demo sdk [Sample]: Jupyter notebook Demo of web API Sep 20, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2022

Codecov Report

Merging #114 (397f610) into dev (60941e1) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #114   +/-   ##
=======================================
  Coverage   79.57%   79.57%           
=======================================
  Files          69       69           
  Lines        2384     2384           
  Branches      242      242           
=======================================
  Hits         1897     1897           
  Misses        407      407           
  Partials       80       80           
Impacted Files Coverage Δ
...re.WebApi/src/Controllers/CarbonAwareController.cs 93.82% <ø> (ø)

bderusha pushed a commit to bderusha/carbon-aware-sdk that referenced this pull request Oct 3, 2022
@Willmish Willmish marked this pull request as ready for review October 8, 2022 11:29
@Willmish
Copy link
Collaborator Author

Willmish commented Oct 8, 2022

@danuw are you able to review/try it out ?

@vaughanknight
Copy link
Contributor

This is currently blocked by #198

@Willmish Willmish linked an issue Jan 23, 2023 that may be closed by this pull request
1 task
@vaughanknight
Copy link
Contributor

@Willmish - is this still working current on the SDK? Can you please test and happy to approve, just want to make sure it hasn't broken.

Temporarily add python client.
Add test_api.py: Python test script.

Signed-off-by: Szymon Duchniewicz <[email protected]>
Add steps to the scrathpad notebook.

Signed-off-by: Szymon Duchniewicz <[email protected]>
Add .env.template.

Signed-off-by: Szymon Duchniewicz <[email protected]>
Signed-off-by: Szymon Duchniewicz <[email protected]>
Signed-off-by: Szymon Duchniewicz <[email protected]>
Signed-off-by: Szymon Duchniewicz <[email protected]>
Signed-off-by: Szymon Duchniewicz <[email protected]>
Signed-off-by: Szymon Duchniewicz <[email protected]>
* Adapt notebook to work with v1.0 of the SDK.
* Add requirements.txt.

Signed-off-by: Szymon Duchniewicz <[email protected]>
Signed-off-by: Szymon Duchniewicz <[email protected]>
…otations.

* Issue reference: Green-Software-Foundation#198
* Produces filters now accept application/json; charset=utf-8

Signed-off-by: Szymon Duchniewicz <[email protected]>
@Willmish Willmish marked this pull request as draft February 26, 2023 08:56
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the stale label Jun 27, 2023
@Willmish Willmish removed the stale label Jul 3, 2023
@Willmish
Copy link
Collaborator Author

Willmish commented Jul 3, 2023

Waiting until decision made regarding pip python packages being distributed for ca sdk api

@danuw
Copy link
Collaborator

danuw commented Jul 3, 2023

I don't think you should wait - just pointing at doc on how to generate (which I believe you already had) from localhost is good enough for people to use. People could benefit from this already and this can always be updated when and if pip exist...

@Willmish
Copy link
Collaborator Author

Willmish commented Jul 4, 2023

Maybe host on google colab with python packages available at a public url

Copy link
Contributor

github-actions bot commented Nov 2, 2023

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

@github-actions github-actions bot added the stale label Nov 2, 2023
@github-actions github-actions bot closed this Nov 9, 2023
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]: OpenAPI generated Client for Python not accepting API responses
4 participants