oeplatform icon indicating copy to clipboard operation
oeplatform copied to clipboard

Move endpoint variable to settings

Open h-spinde opened this issue 10 months ago • 3 comments

Summary of the discussion

As part of solving issue 1394, the variables query_endpoint and update_endpoint should be moved from views.py to settings.py

Workflow checklist

PR-Assignee

Reviewer

  • [ ] 🐙 Follow the Reviewer Guidelines
  • [ ] 🐙 Provided feedback and show sufficient appreciation for the work done

h-spinde avatar Mar 27 '24 08:03 h-spinde

That's great :) I would also like to draw your attention to some efforts I have made to make the code more modular:

I created a subfolder factsheet/oekg where this file is located https://github.com/OpenEnergyPlatform/oeplatform/blob/develop/factsheet/oekg/connection.py

I think we should use this for managing the connections. There you will see the same endpoints, these should also be imported from the settings. Then in the factsheet/views.py I suggest to import the factsheet/oekg/connection.py and use this for the oekg connection. In addition, we can then also remove this section as I have moved it to https://github.com/OpenEnergyPlatform/oeplatform/blob/develop/factsheet/oekg/namespaces.py.

What do you think @adelmemariani ?

jh-RLI avatar Mar 27 '24 09:03 jh-RLI

What do you think @adelmemariani ?

If you tested it and everything is working it is ok. But, shouldn't the 'bind_all_namespaces' return a graph?

adelmemariani avatar Apr 02 '24 10:04 adelmemariani

Further tests would certainly also be part of this branch, but in general everything has worked so far. I'm happy to help.

You're right about your comment, it's been a while, I think there was another problem.

It would be great if we could slowly make the code more modular starting with this branch.

jh-RLI avatar Apr 02 '24 12:04 jh-RLI

As we are now using a different approach, this PR is outdated. Nevertheless, it was good that there was just another developer who suggested another working solution.

See: https://github.com/OpenEnergyPlatform/oeplatform/pull/1656

jh-RLI avatar Jun 13 '24 15:06 jh-RLI