-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fake data #354
Comments
Hello there @peterdudfield. This definitely looks to be a more complex and interesting change. If possible I'd like to attempt a contribution to this change? If so, could I just clarify the following points, please (apologies if these questions are a bit dumb/obvious!):
What is meant by the route (again, sorry if these are obvious/dumb questions to ask)?
|
Thanks @VikramsDataScience for getting involved.
if os.enviorn['FAKE'].lower() = 'true':
return make_fake_data(....)
Hope this helps, and please do ask more questions |
This repo and code is how I was thinking it could be done |
Apologies @peterdudfield! I've been a little time poor, and distracted lately. I erroneously created a PR (openclimatefix/india-api#76) in the india-api repo to address this issue, but I think I made the changes to the incorrect repo! I've since closed it, because I think we're looking to make similar changes but to this repo? If so, which module should I be looking to modify in this repo? |
No problem. See point 4 above, but we should try to fake all the 'routes' of the api |
Hey @peterdudfield. I've made the changes to what I think are the correct modules, but I'm running python 3.11.5 on my local machine and venv, but it looks like the I've also tried to install 3.9 separately to avoid downgrading my system version. And, from there creating a venv that's built from 3.9, but I'm having a variety of challenges! |
yea, i would stick to python 3.11. Does it stop you submitting code? |
Yeah, exactly! It prevents the commit from going through. Are you okay with me modifying the |
yea, feel free too |
Cool. Thank you. Now that I've got the changes made to the Otherwise, if all is good, I'll create a PR, and we can work together to get it right :). |
yea, of course, |
Sorry @peterdudfield about all the commits! That was me having fun and playing around with the |
Hey @peterdudfield. I've created the PR. It was initially failing the CI checks, but I've modified the I also quite foolishly left the modified relative imports that I used for testing in my push, not realising that the dockerfile already sets the PYTHONPATH. The CI tests seem to be passing now. When you've got some time, could you review the changes in the PR, and let me know if I'm on the right track, please? |
Detailed Description
It would be great to run the api with fake data. This means users could run this locally without having to connect to a database.
The FE users could then use this API with fake data.
Context
Possible Implementation
The text was updated successfully, but these errors were encountered: