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

Implement simulation progress bar #154

Merged
merged 12 commits into from
May 28, 2024
Merged

Implement simulation progress bar #154

merged 12 commits into from
May 28, 2024

Conversation

henhuy
Copy link
Contributor

@henhuy henhuy commented May 22, 2024

Closes #132

Simulation state is shown to user via progress bar, progress title and description in tooltip.

Descriptions can be adapted in results.js line 15

Needs poetry update due to update in django-oemof

@henhuy henhuy requested a review from nesnoj May 22, 2024 12:27
@henhuy henhuy self-assigned this May 22, 2024
@henhuy henhuy force-pushed the feature/sim_progress_bar branch from d378174 to ba7f05e Compare May 22, 2024 12:36
Copy link
Contributor

@nesnoj nesnoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff! 🙏

I can see the frontend changes and adjusted some texts, but simulation fails as I was not able to build the container and therefore couldn't test everything:

34.31 Installing dependencies from lock file
34.47 
34.47 pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.
------
failed to solve: process "/bin/bash -c source /venv/bin/activate && python -m pip install --upgrade pip && pip install --no-cache-dir poetry && poetry install --no-root" did not complete successfully: exit code: 1

So I tried poetry lock --no-update as well as poetry lock but building still fails, now throwing

...
63.81   - Installing whitenoise (5.3.0)
65.18 
65.18   ChefBuildError
65.18 
65.18   Backend subprocess exited when trying to invoke get_requires_for_build_wheel
65.18   
65.18   Traceback (most recent call last):
65.18     File "/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
65.18       main()
65.18     File "/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
65.18       json_out["return_val"] = hook(**hook_input["kwargs"])
65.18     File "/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 134, in get_requires_for_build_wheel
65.18       return hook(config_settings)
65.18     File "/tmp/tmpsj48pbd2/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
65.18       return self._get_build_requires(config_settings, requirements=['wheel'])
65.18     File "/tmp/tmpsj48pbd2/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
65.18       self.run_setup()
65.18     File "/tmp/tmpsj48pbd2/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 487, in run_setup
65.18       super().run_setup(setup_script=setup_script)
65.18     File "/tmp/tmpsj48pbd2/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
65.18       exec(code, locals())
65.18     File "<string>", line 9, in <module>
65.18   ImportError: cannot import name 'convert_path' from 'setuptools' (/tmp/tmpsj48pbd2/.venv/lib/python3.9/site-packages/setuptools/__init__.py)
65.18   
65.18 
65.18   at /venv/lib/python3.9/site-packages/poetry/installation/chef.py:164 in _prepare
65.19       160│ 
65.19       161│                 error = ChefBuildError("\n\n".join(message_parts))
65.19       162│ 
65.19       163│             if error is not None:
65.19     → 164│                 raise error from None
65.19       165│ 
65.19       166│             return path
65.19       167│ 
65.19       168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
65.19 
65.19 Note: This error originates from the build backend, and is likely not a problem with poetry but with django-allauth (0.44.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "django-allauth (==0.44.0)"'.
65.19 
------
failed to solve: process "/bin/bash -c source /venv/bin/activate && python -m pip install --upgrade pip && pip install --no-cache-dir poetry && poetry install --no-root" did not complete successfully: exit code: 1

@nesnoj
Copy link
Contributor

nesnoj commented May 22, 2024

And the "Berechnung läuft ..." is still in place, Could you remove it please?

@henhuy
Copy link
Contributor Author

henhuy commented May 23, 2024

Fixed poetry.lock and removed "Berechnung läuft" - please try again

@nesnoj
Copy link
Contributor

nesnoj commented May 23, 2024

Fixed poetry.lock and removed "Berechnung läuft" - please try again

Same error again :(

What I tried:

  • I pruned the corresponding containers and volumes but this did not fix it.
  • I checked the poetry diff and pre-commit was updated so I pinned it to 2.21.0 but this did not help either.
  • Meanwhile, the build is successful on dev but when I lock and redo, I'm getting the very same error. So it is not related to your changes.
  • Then I saw that a major release of setuptools (which raises the error) was released 2 days ago so I pinned it back to the old version 69.5.1. The error vanishes but another appears:
32.69   - Downgrading virtualenv (20.26.2 -> 20.26.0)
38.87 
38.87   FileNotFoundError
38.87 
38.87   [Errno 2] No such file or directory: '/venv/lib/python3.9/site-packages/virtualenv/create/via_global_ref/_virtualenv.py'
38.87 
38.87   at /venv/lib/python3.9/pathlib.py:1120 in _opener
38.91       1116│         pass
38.91       1117│ 
38.91       1118│     def _opener(self, name, flags, mode=0o666):
38.91       1119│         # A stub for the opener argument to built-in open()
38.91     → 1120│         return self._accessor.open(self, flags, mode)
38.91       1121│ 
38.91       1122│     def _raw_open(self, flags, mode=0o777):
38.91       1123│         """
38.91       1124│         Open the file pointed by this path and return a file descriptor,
38.91 
38.91 Cannot install djangorestframework-mvt.
  • I did the lock again from scratch in new env (with pinned setuptools==69.5.1) and now the old error is back.

I guess the dependencies are broken, but I don't get it..
Any ideas @henhuy ?

@nesnoj nesnoj self-requested a review May 23, 2024 12:24
Copy link
Contributor

@nesnoj nesnoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install works out now, there was a problem with django-allauth.

I tested messages and functionalities, very nice feature! 👏 We can adjust the timeouts later. The only thing I wasn't able to test was the correct processing of the 400 response but I guess you tested it already.

The optimization error results from oemof-tabular, I opened a new issue on this: #157

Feel free to merge @henhuy

@nesnoj nesnoj merged commit 6145990 into dev May 28, 2024
1 check passed
@nesnoj nesnoj deleted the feature/sim_progress_bar branch May 28, 2024 14:34
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.

Reactivate sim progress bar
2 participants