-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make TraitsUI, Pyface and configobj optional dependencies (#351)
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.
- Loading branch information
1 parent
b559b37
commit bd6689a
Showing
10 changed files
with
69 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test with minimal dependencies | ||
|
||
on: | ||
- pull_request | ||
- workflow_dispatch | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Get apptools source | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install local package | ||
run: python -m pip install ".[test]" | ||
- name: Run tests | ||
run: | | ||
mkdir testdir | ||
cd testdir | ||
python -m unittest discover -v apptools |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TraitsUI, Pyface and configobj are now optional dependencies. TraitsUI | ||
and Pyface will be installed with ``pip install apptools[gui]``. configobj | ||
will be installed with ``pip install apptools[preferences]``. (#351) |
This file contains 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