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

Create API #133

Closed
peterdudfield opened this issue Jun 14, 2024 · 12 comments
Closed

Create API #133

peterdudfield opened this issue Jun 14, 2024 · 12 comments
Labels
good first issue Good for newcomers

Comments

@peterdudfield
Copy link
Contributor

Detailed Description

Create a simple API that could take in site level details and make a forecast

Context

  • wrap around this function - from quartz_solar_forecast.forecast import run_forecast
  • we can think about deploy this later
  • if we have an api, then lots of tech stacks, like websites could get a forecast

Possible Implementation

  • create fastapi that wraps the function run_forecast
@peterdudfield peterdudfield added the good first issue Good for newcomers label Jun 14, 2024
@aryanbhosale
Copy link
Member

aryanbhosale commented Jul 15, 2024

Hey @peterdudfield , the run_forecast function uses make_pv_data in data.py, which in turn optionally uses the functions from enphase.py-where some functions require CLI inputs given by the user. Should it be like calling an API with a cURL-which only Linux users will be able to use ? Otherwise we'd have to make a .ps1 (powershell) file for windows-specific users to use the api.

@peterdudfield
Copy link
Contributor Author

Perhaps we could focus on doing this without data from enphase first. I think a FastApi could be a great way to do this

@sicunchen sicunchen mentioned this issue Jul 16, 2024
7 tasks
@Clemo97
Copy link
Contributor

Clemo97 commented Jul 16, 2024

Hey @peterdudfield , the run_forecast function uses make_pv_data in data.py, which in turn optionally uses the functions from enphase.py-where some functions require CLI inputs given by the user. Should it be like calling an API with a cURL-which only Linux users will be able to use ? Otherwise we'd have to make a .ps1 (powershell) file for windows-specific users to use the api.

What is enphase.py

@Clemo97
Copy link
Contributor

Clemo97 commented Jul 16, 2024

Perhaps we could focus on doing this without data from enphase first. I think a FastApi could be a great way to do this

I already created the API, though I'm curious should it exist within this repos folder or can be on its own folder and GitHub repo?

@peterdudfield
Copy link
Contributor Author

Hey @peterdudfield , the run_forecast function uses make_pv_data in data.py, which in turn optionally uses the functions from enphase.py-where some functions require CLI inputs given by the user. Should it be like calling an API with a cURL-which only Linux users will be able to use ? Otherwise we'd have to make a .ps1 (powershell) file for windows-specific users to use the api.

What is enphase.py

enphase is a solar inverter, we trying to get this working so people can connect to their own solar panels and give a solar forecast

@peterdudfield
Copy link
Contributor Author

Perhaps we could focus on doing this without data from enphase first. I think a FastApi could be a great way to do this

I already created the API, though I'm curious should it exist within this repos folder or can be on its own folder and GitHub repo?

I think what #146 has done with the API is the way forward. If #146 gets merged, can you build of that API?

@aryanbhosale
Copy link
Member

Hey @peterdudfield , which folder should the api file be in? any suggestions? or should i go ahead with making a new folder called "api"/"run_forecast_api.py"

@Clemo97
Copy link
Contributor

Clemo97 commented Jul 17, 2024

Perhaps we could focus on doing this without data from enphase first. I think a FastApi could be a great way to do this

I already created the API, though I'm curious should it exist within this repos folder or can be on its own folder and GitHub repo?

I think what #146 has done with the API is the way forward. If #146 gets merged, can you build of that API?

No need @aryanbhosale is already working on it. I think I'll just put my efforts on issue #93

@aryanbhosale
Copy link
Member

Perhaps we could focus on doing this without data from enphase first. I think a FastApi could be a great way to do this

I already created the API, though I'm curious should it exist within this repos folder or can be on its own folder and GitHub repo?

I think what #146 has done with the API is the way forward. If #146 gets merged, can you build of that API?

No need @aryanbhosale is already working on it. I think I'll just put my efforts on issue #93

I'm not working on it since #146 has already put in some work into it, you could try it out!

@Clemo97
Copy link
Contributor

Clemo97 commented Jul 17, 2024

Perhaps we could focus on doing this without data from enphase first. I think a FastApi could be a great way to do this

I already created the API, though I'm curious should it exist within this repos folder or can be on its own folder and GitHub repo?

I think what #146 has done with the API is the way forward. If #146 gets merged, can you build of that API?

No need @aryanbhosale is already working on it. I think I'll just put my efforts on issue #93

I'm not working on it since #146 has already put in some work into it, you could try it out!

Yeah, I will look into it, since she's already created the API all that's left is creating the schema and the Open API docs for interactivity.
Though I'm also looking at issue #93 since it's given me the most headache as I use Ubuntu 24.04 which unfortunately uses Python 3.12.

@peterdudfield
Copy link
Contributor Author

I think we should close this now, right?

@aryanbhosale
Copy link
Member

I think we should close this now, right?

Yes I think this has been resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants