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

Setting setting offscreen default & enable running of example on headless server #197

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

clemens-fricke
Copy link
Collaborator

To enable running the examples in CI/CD to also test them in every PR automatically we need to have vedo run offscreen. To enable this the gustaf setting gustaf.settings.DEFAULT_OFFSCREEN is added. This is used in gustaf.show.show as the default option for the kwarg offscreen.

If you set this option to True in the beginning of a script and don't overwrite the kwarg in the call to show every vedo show is offscreen.

Further the script example/run_all_examples.py now is able to run all examples with this option enabled. On my PC it works without problem.

Disclaimer
I have not tested this on a headless server so we might have to tweak it further for it to actually work.

@j042
Copy link
Member

j042 commented Mar 1, 2024

should we add this in CI?

@clemens-fricke
Copy link
Collaborator Author

clemens-fricke commented Mar 1, 2024

I would like to add it to CI since currently I am the one checking over them from time to time and finding errors. These are sometimes due to real bugs in our code, but often are changes to functions that were intended but the examples have not been updated to accommodate these changes. If we add them to CI it would be much easier to keep them up-to-date, since you will be bugged by GitHub if they are not.

So I tried adding it to the workflow but that did not work. I think I will need to try it on a headless server first, my guess is that vedo - even offscreen - still needs the non-headless part.

I just looked into it and the name is also wrong, it currently only runs the tests and does not check the format.

@clemens-fricke
Copy link
Collaborator Author

There seems to be a workaround/fix:
marcomusy/vedo#621 (comment)
However, we would need to install additional system libraries and setting variables. Let us talk about this at HackDayz.

@j042
Copy link
Member

j042 commented Mar 1, 2024

Good plan! And yes, the name of the workflow is quite misleading and feel free to update it. In terms of CI and additional packages, we can add them to Ubuntu runners at least

@j042
Copy link
Member

j042 commented Apr 11, 2024

any updates?

@j042
Copy link
Member

j042 commented Aug 12, 2024

WWhat do you think about using docker?

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.

2 participants