Skip to content

Conversation

@VikramsDataScience
Copy link

@VikramsDataScience VikramsDataScience commented Mar 3, 2025

Pull Request

Description

  • /nowcasting-app/components/API-Routes.ts: This calls the routes already specified in the /uk-pv-national-gsp-api/src/gsp.py and the /uk-pv-national-gsp-api/src/national.py modules. But most importantly, it only calls these routes when the is_fake() environment is activated. I've set a placed holder for this, but I'm not sure about the environment variable for IS_FAKE. Could you advise how this gets set to access the is_fake() environment we built in the uk-pv-national-gsp-api?
  • /nowcasting-app/components/fake-API-calls.ts: The API routes called in the API-Routes.ts are then imported into fake-API-calls.ts component, where they're called using a fetch() request. Those request objects are then exported.
  • /nowcasting-app/components/fake-forecast.tsx: At this stage they're imported into the fake-forecast.tsx component, where the useEffect() callback, and routeConfig array are then used to define the routing behaviour and key/value lookups. All of this is then returned via specified divs, tooltips, and toggle behaviour.
  • /nowcasting-app/pages/fake-forecasts.tsx: For the deployment of the above, I'm proposing a new 'fake-forecasts' page. But, please advise if this is the correct approach? Or, if there's an existing page that I should use instead, please let me know?

This is my current proposal for how to integrate my implementation in the frontend from last year's is_fake() work from the uk-pv-national-gsp-api repo. But, my knowledge of TypeScript is still developing, so any feedback is most desirable, so that we can begin the work of integrating this into the frontend!

Fixes #
openclimatefix/uk-pv-national-gsp-api#367

How Has This Been Tested?

This hasn't been tested due to not having the required auth0 credentials to test locally with yarn.

  • Yes

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?
No changes to data processing

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
    Not yet. But, happy to update documentation once changes are approved.
  • I have added tests that prove my fix is effective or that my feature works
    Not yet. But also happy to write the test cases once we've settled on the correct implementation.
  • I have checked my code and corrected any misspellings

@vercel
Copy link

vercel bot commented Mar 3, 2025

@VikramsDataScience is attempting to deploy a commit to the Open Climate Fix Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant