oeplatform
oeplatform copied to clipboard
Move endpoint variable to settings
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
- [x] 🐙 Follow the workflow in CONTRIBUTING.md
- [ ] 📝 Update the CHANGELOG.md
- [ ] 📙 Update the documentation on mkdocs
Reviewer
- [ ] 🐙 Follow the Reviewer Guidelines
- [ ] 🐙 Provided feedback and show sufficient appreciation for the work done
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 ?
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?
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.
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