-
-
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 Issue #354 #360
base: main
Are you sure you want to change the base?
Fake data Issue #354 #360
Conversation
Thanks so much @VikramsDataScience for this. Really appreciate you doing this. I wonder if there's a few more things you could do?
Thanks once again for doing all this work, really appreciate that your doing this. No pressure, to do this extra work, just say. |
Hey @peterdudfield. Sure thing. I'm happy to do it :)! If its cool with you, I'll look to get this done sometime next week? This is only because it's a public holiday in Melbourne tomorrow, and I fancied having a 3 day weekend :). |
Thanks No worries, do this when it suits you |
Hey @peterdudfield. I just wanted to provide a quick update:
|
No problem Please do share any learnings, just so we can help others too |
Hey @peterdudfield. So sorry its taking me so long to update this PR since last week! It's been a bit of a distracting and chaotic period lately. I've tried to write a test case to test the changes for the fake forecast, and it may be generating forecasts, but I'm not really sure and wanted to get your thoughts, please? I've made a number of changes to various modules, in my local environment, so I didn't want to include them as commits, as they're only done to test the changes, and won't be part of the eventual merge into production. Instead I wanted to just provide some snippets of the changes, and which modules they affect, and you could let me know if I'm on the right track? And, once we're settled on what is correct, I can then include everything into a commit?
This test case returns the following output. So, it looks like I'm getting a connection to the DB for the route/endpoint and that allows the assert in the test case to pass, and I'm seeing something populating in the 'expected_power_generation_megawatts' value (I've highlighted it on the screenshot). The other outputs seem to be print statements coming from the |
Hey @peterdudfield. With regards to the changes I was referencing in yesterday's lengthy comment, I've put them into a commit and tested it. Could you kindly review, and let me know, please? |
|
Thanks for all this work, getting is_fake working. |
Hey @peterdudfield. No worries at all! I think you were on leave? Apologies for the duplicated test cases. When you were asking about writing some tests, I didn't think to look at the existing test cases that were already there! I've now removed the duplicated test cases, and pushed the changes to the PR. Please let me know if there's anything else? |
yea, I was away for a week. Sorry I should have said this yesterday, yea, test would be good, but ones that test |
All good. Sorry for the delayed response, but I've had my week hijacked with some other important priorities. Could I look into developing some new test cases sometime next week, please? |
Of course,no problem. Thsnk you for your help |
Of course! A pleasure, as always, @peterdudfield! |
Hey @peterdudfield. So sorry for my tardy updates with this PR! It's been a very distracting period for me, and has been a bit difficult to manage some of my competing priorities. I've written a new test case for the fake environment that has passed the checks on my local machine, and is generating forecasts for one of the DB routes/endpoints (I thought I'd start with the specific GSP ID test to begin). It's generating quite a few 0.0 forecasts, but happily no negative values: |
No worries. This looks great. Yea a few similar tests would be great |
I've finished writing the test cases using the Otherwise, I'm hopeful that the CI workflow will pass now! |
They were all passing on 'main'. Locally do you run all the tests? |
Hmm, I'm sceptical that running all the tests will yield a different result. I'm very open to any suggestions you might have, as I'm starting to run out of ideas, given how long we've been working on this PR? And, of course, you know this codebase far better than myself! Do you mean that is_fake is being set whilst these other test cases are run? |
I think its worth running all the tests, to see if its the same results as CI. Yea, my guess is that is_fake is still set on the other cases. And in some ways needs to be un-set. Yea totally understand you've been working hard on this. Another options is we merge to a non |
All good. I'm very happy to help! I'll keep trying over next week and see how I fair |
Sorry, Peter, once again a few other priorities have come up this week that need my attention. I did have a play around yesterday with the test cases, and I may have a couple of theories as to why they're failing, but haven't experimented to see my theories pan out! Once I get these other priorities out of the way, I'll return to the PR :). |
|
Hey Peter, Are you able to trigger the workflow to see my newest changes have any effect? |
I think you can close and reop the PR, adn that triggers them
Peter Dudfield
+44 7814 169 251
…________________________________
From: Vikram Pande ***@***.***>
Sent: 22 November 2024 09:47
To: openclimatefix/uk-pv-national-gsp-api ***@***.***>
Cc: Peter Dudfield ***@***.***>; State change ***@***.***>
Subject: Re: [openclimatefix/uk-pv-national-gsp-api] Fake data Issue #354 (PR #360)
Hey Peter,
Are you able to trigger the workflow to see my newest changes have any effect?
—
Reply to this email directly, view it on GitHub<#360 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIIUKWXJLBDHDEX44K65MID2B34SNAVCNFSM6AAAAABOXLO6XCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJTGM2DSMBRGY>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
No problems. I wasn't sure if I had sufficient permissions, but I can do that from now :) |
Whoa! I think it may have worked! |
Thats great they are now working. I relised something when reviewing this. For the routes that say Again, thanks so much for this work, and its very nearly over the line. I'd be very happy if you do this bit, but I totally understand if you want me or someone else to do it |
That's cool. I should be able to take care of it and update the PR if all is well, and otherwise comment if I have any challenges :)! |
Pull Request
Issue #354
Description
.pre-commit-config.yaml
file to use python 3.11.5.requirements.txt
didn't have thepre-commit
library listed. So I modified it to include this library. From what I can tell it conforms to their best practice (https://pre-commit.com/#install). I hope that's okay? Please let me know if you want me to revert, though :).is_fake()
environment in thegsp.py
module. I've attempted to make the changes to mimic the module. @peterdudfield could you let me know if this is along the lines of what you're after, please? And, based on your feedback, I can make the necessary changes in the follow up commits :).make_fake_forecast()
function from thenowcasting_datamodel.fake
module. But, there's also the 'plural'make_fake_forecasts()
function available, that seems to call the samemake_fake_forecast()
function, but for multiple grid supply point IDs. Could you also advise if this is correct, please?Fixes #
How Has This Been Tested?
auth_utils
,cache.py
,database.py
,pydantic_models
, andutils.py
modules to allow testing the fake data in all the API routes of thegsp.py
module. If all goes well and you're happy with the changes in the PR, I can revert the changes in the relative imports of the other modules prior to approval/merge.nowcasting_datamodel
repo can be used for relative importspydantic
library? I'm not too sure, though:If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?
I haven't plotted any of the changes, other than running the test with the screenshot above. But, please advise if there's anything specific you'd like to see?
Checklist: