Skip to content
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

Add interface to run datapackage and use hooks from outside django #2

Open
henhuy opened this issue Nov 13, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@henhuy
Copy link
Collaborator

henhuy commented Nov 13, 2023

Django-oemof simulation shall be run from outside, including hooks which load data from pipe-datapackage.
Idea:

  • Hooks can be included via sys.path.append
  • Set path to datapackages (oemof and data from pipe datapacakge) in envs
  • register hooks
  • run simulation
  • return results (instead of storing in DB) -> add flag to simulation function

In order to support this, django-oemof hooks must have as less dependencies as possible:

  • import django.http.HttpRequest only when type checking
  • set up path to datapackage not via django.settings? (or setup django without server?) Maybe try import from envs instead.
  • use relative imports in hooks.py instead of absolute imports
  • don't forward request to "Setup" hook -> form data has to be unpacked beforehand in this case
@henhuy henhuy added the enhancement New feature or request label Nov 13, 2023
@henhuy henhuy self-assigned this Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant