Treating traitsui as optional#86
Closed
stewbond wants to merge 2 commits into
Closed
Conversation
Contributor
|
Have you tried running your headless tests with |
Contributor
Author
|
Thanks for the response. When I run the tests in a debian unstable chroot without python-traitsui installed, I get an ImportError [1] When I run the tests in a debian unstable chroot with python-traitsui installed, I get It's also worth noting that python3-traitsui is not available in debian yet so if we did solve the $DISPLAY issue, we would still have a problem when running the tests with python3. [1]: [2]: |
1 task
Member
|
Closing in favour of #351 |
mdickinson
added a commit
that referenced
this pull request
Jul 4, 2024
Apptools contains several disparate packages with different needs. While it's somewhat reasonable to regard Traits as a core dependency, not all subpackages need a GUI, and only the preferences package makes use of configobj. This PR: * makes all three of TraitsUI, Pyface and configobj optional dependencies * adds a "gui" entry for `extras_require` in `setup.py` * adds a test workflow that runs the test suite with only the core dependencies (i.e., Traits), to make sure that other tests are skipped appropriately rather than failing Closes #70 Makes #86 obsolete.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If users don't have traitsui, then GUI-specific functions now do nothing instead of crashing the application. This really helps for running unit tests on build machines without any X-server which have problems when running traitsui functions.
Note that there probably some other places where traitsui could be removed, but this at least gets the CI tests working.
Also helps with issue #70.