espressomd / espresso

The ESPResSo package
https://espressomd.org
GNU General Public License v3.0
226 stars 184 forks source link

Add more ZnDraw-features #4972

Open phohenberger opened 1 month ago

phohenberger commented 1 month ago
jngrad commented 1 month ago

Here is a one-line change to make the complete CI/CD pipeline happy:

diff --git a/testsuite/scripts/importlib_wrapper.py b/testsuite/scripts/importlib_wrapper.py
index f3dd8e5b44..5bc879338c 100644
--- a/testsuite/scripts/importlib_wrapper.py
+++ b/testsuite/scripts/importlib_wrapper.py
@@ -396,3 +396,3 @@ class GetEspressomdVisualizerImports(ast.NodeVisitor):
     def __init__(self):
-        self.visualizers = {"visualization"}
+        self.visualizers = {"visualization", "zn"}
         self.namespace_visualizers = {
PythonFZ commented 1 month ago
phohenberger commented 1 month ago

@jngrad Regarding the cookie issue, are you sure that you have enable all cookies? On firefox for example I worked fine when using blocking cross-site tracking cookies and isolate other cross-site cookies or is this lama specific?

jngrad commented 1 month ago

I did not try all options, but the two specifically mentioned were not resolving the issue. I gave up and allowed everything.

jngrad commented 3 weeks ago

After updating to ZnDraw 0.4.6, I can no longer start a ZnDraw server on Chrome and Firefox:

Starting ZnDraw server, this may take a few seconds
WARNING:zndraw.zndraw:Connection failed. Retrying...
WARNING:zndraw.zndraw:Connection failed. Retrying...
WARNING:zndraw.zndraw:Connection failed. Retrying...
WARNING:zndraw.zndraw:Connection failed. Retrying...
ConnectionError                           Traceback (most recent call last)
/work/jgrad/espresso-fork-PR/zndraw/lib/python3.10/site-packages/zndraw/zndraw.py in __post_init__(self)
    118                 self.socket.sleep(self.timeout["connection"])
    119                 if idx == self.timeout["connect_retries"]:
--> 120                     raise socketio.exceptions.ConnectionError(
    121                         f"Unable to connect to ZnDraw server at '{self.url}'. Is the server running?"
    122                     ) from err
ConnectionError: Unable to connect to ZnDraw server at 'ws://127.0.0.1:1234'. Is the server running?
pip freeze ``` (zndraw) jgrad@lama:/work/jgrad/espresso-fork-PR$ pip freeze amqp==5.2.0 annotated-types==0.7.0 argcomplete==3.5.0 ase==3.23.0 async-timeout==4.0.3 bidict==0.23.1 billiard==4.2.0 black==24.8.0 blinker==1.8.2 celery==5.4.0 certifi==2024.7.4 charset-normalizer==3.3.2 click==8.1.7 click-didyoumean==0.3.1 click-plugins==1.1.1 click-repl==0.3.0 contourpy==1.2.1 cycler==0.12.1 datamodel-code-generator==0.25.9 dnspython==2.6.1 email_validator==2.2.0 eventlet==0.36.1 Flask==2.3.3 Flask-SocketIO==5.3.6 fonttools==4.53.1 genson==1.3.0 greenlet==3.0.3 h11==0.14.0 idna==3.7 inflect==5.6.2 isort==5.13.2 itsdangerous==2.2.0 Jinja2==3.1.4 kiwisolver==1.4.5 kombu==5.4.0 lazy_loader==0.4 markdown-it-py==3.0.0 MarkupSafe==2.1.5 matplotlib==3.9.2 mdurl==0.1.2 mypy-extensions==1.0.0 networkx==3.3 numpy==1.26.4 packaging==24.1 pandas==2.2.2 pathspec==0.12.1 pillow==10.4.0 platformdirs==4.2.2 plotly==5.23.0 prompt_toolkit==3.0.47 pydantic==2.8.2 pydantic_core==2.20.1 Pygments==2.18.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 python-engineio==4.9.1 python-socketio==5.11.3 pytz==2024.1 PyYAML==6.0.2 redis==5.0.8 requests==2.32.3 rich==13.7.1 scipy==1.14.1 shellingham==1.5.4 simple-websocket==1.0.0 six==1.16.0 splines==0.3.2 SQLAlchemy==2.0.32 tenacity==9.0.0 toml==0.10.2 tomli==2.0.1 tqdm==4.66.5 typer==0.12.4 typing_extensions==4.12.2 tzdata==2024.1 urllib3==2.2.2 vine==5.1.0 wcwidth==0.2.13 websocket-client==1.8.0 Werkzeug==3.0.4 wsproto==1.2.0 zndraw==0.4.6 znjson==0.2.4 znsocket==0.1.8 ```
phohenberger commented 3 weeks ago

What. I tested in on some of the most common browsers. Chrome, Firefox, Edge, Brave all worked with no issues at all. The internal ZnDraw tests for starting a server also passed.

Is the problem you are facing simply using the Visualizer as provided by the PR, or your work on making it run on binder?

jngrad commented 3 weeks ago

I used your PR on the lama workstation, and accepted cookies.

jngrad commented 3 weeks ago

We created a new user account to get a fresh Firefox/Chrome/JupyterLab installation, and your PR now works.