-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: main
Are you sure you want to change the base?
Conversation
should we add this in CI? |
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. |
There seems to be a workaround/fix: |
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 |
any updates? |
WWhat do you think about using docker? |
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 ingustaf.show.show
as the default option for the kwargoffscreen
.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.