-
-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify handling of travertino dependency in example apps, CI and test…
…bed. (#3155) * Modifies the CI configuration so that Travertino is installed by pip finding the wheel in the dist folder, rather than by explicitly installing the package from the source directory. * Modifies the testbed to look in the `dist` folder for prerelease wheels, but *doesn't* modify the platform configurations to use those wheels. This is so that local testing continues to work. However, the Textual backend *will* use the `dist` folder to install packages, so there is at least *some* testing of wheel usage by Briefcase. * Updates all the examples and the demo app to include an explicit install of Travertino. * Includes a hard version pin of PyGObject 3.50.0 to work around #3143. * Includes a conditional coverage tweak that I noticed being reported on each of the standalone core test runs. This wasn't an issue for overall coverage, but it helps to keep local single-Python version test results clean.
- Loading branch information
1 parent
8e222c2
commit 48b094b
Showing
53 changed files
with
102 additions
and
37 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 |
---|---|---|
|
@@ -34,13 +34,17 @@ jobs: | |
name: Pre-commit checks | ||
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main | ||
with: | ||
pre-commit-source: "./core[dev]" | ||
# Although we only want to install the dev dependencies, we have to install the | ||
# core, which means we need travertino as well. | ||
pre-commit-source: "./travertino ./core[dev]" | ||
|
||
towncrier: | ||
name: Check towncrier | ||
uses: beeware/.github/.github/workflows/towncrier-run.yml@main | ||
with: | ||
tox-source: "./core[dev]" | ||
# Although we only want to install the dev dependencies, we have to install the | ||
# core, which means we need travertino as well. | ||
tox-source: "./travertino ./core[dev]" | ||
|
||
package: | ||
name: Package Toga | ||
|
@@ -119,9 +123,12 @@ jobs: | |
|
||
- name: Test | ||
run: | | ||
# The $(ls ...) shell expansion is done in the Github environment; | ||
# the value of TOGA_INSTALL_COMMAND will be a literal string without any shell expansions to perform | ||
TOGA_INSTALL_COMMAND="python -m pip install ../$(ls dist/toga_core-*.whl)[dev] ../$(ls dist/toga_dummy-*.whl) ../$(ls dist/travertino-*.whl)" | ||
# The $(ls ...) shell expansion is done in the Github environment; the value of | ||
# TOGA_INSTALL_COMMAND will be a literal string without any shell expansions to | ||
# perform. We don't *explicitly* install the Travertino wheel; we provide the | ||
# dist dir as a source of wheels, and rely on pip to resolve the explicit | ||
# version match to the Travertino wheel in that folder. | ||
export TOGA_INSTALL_COMMAND="python -m pip install --find-links ../dist ../$(ls dist/toga_core-*.whl)[dev] ../$(ls dist/toga_dummy-*.whl)" | ||
tox -e py-cov${{ matrix.tox-suffix }} | ||
tox -qe coverage$(tr -dc "0-9" <<< "${{ matrix.python-version }}")${{ matrix.tox-suffix }} | ||
mv ${{ matrix.package }}/.coverage ${{ matrix.package }}/.coverage.${{ matrix.platform }}.${{ matrix.python-version }} | ||
|
@@ -184,7 +191,11 @@ jobs: | |
|
||
- name: Test | ||
run: | | ||
pip install dist/toga_core-*.whl dist/travertino-*.whl | ||
# We don't *explicitly* install the Travertino wheel; we provide the dist dir | ||
# as a source of wheels, and rely on pip to resolve the explicit version match | ||
# to the travertino wheel in that folder. | ||
pip install --find-links ./dist dist/toga_core-*.whl | ||
site_packages=$(python -c ' | ||
import sys | ||
print([path for path in sys.path if "site-packages" in path][0]) | ||
|
@@ -247,7 +258,7 @@ jobs: | |
|
||
testbed: | ||
name: Testbed | ||
needs: core-and-travertino | ||
needs: [ package, core-and-travertino ] | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -373,21 +384,21 @@ jobs: | |
platform: "linux" | ||
runs-on: "ubuntu-latest" | ||
setup-python: false # Use the system Python packages | ||
briefcase-run-args: --config 'requires=["../core","../textual", "../travertino"]' --config 'console_app=true' | ||
briefcase-run-args: --config 'requires=["toga-core", "toga-textual"]' --config 'console_app=true' | ||
app-user-data-path: "$HOME/.local/share/testbed" | ||
# install the meta-package build-essential since Briefcase explicitly checks for it | ||
pre-command: sudo apt update -y && sudo apt install -y build-essential | ||
|
||
- backend: "textual-macOS" | ||
platform: "macOS" | ||
runs-on: "macos-latest" | ||
briefcase-run-args: --config 'requires=["../core","../textual", "../travertino"]' --config 'console_app=true' | ||
briefcase-run-args: --config 'requires=["toga-core", "toga-textual"]' --config 'console_app=true' | ||
app-user-data-path: "$HOME/Library/Application Support/org.beeware.toga.testbed" | ||
|
||
- backend: "textual-windows" | ||
platform: "windows" | ||
runs-on: "windows-latest" | ||
briefcase-run-args: --config 'requires=["../core","../textual", "../travertino"]' --config 'console_app=true' | ||
briefcase-run-args: --config 'requires=["toga-core", "toga-textual"]' --config 'console_app=true' | ||
app-user-data-path: '$HOME\AppData\Local\Tiberius Yak\Toga Testbed\Data' | ||
|
||
- backend: "windows" | ||
|
@@ -444,6 +455,13 @@ jobs: | |
python -m pip install -U pip | ||
python -m pip install git+https://github.com/beeware/briefcase.git | ||
- name: Get Packages | ||
uses: actions/[email protected] | ||
with: | ||
pattern: ${{ format('{0}-*', needs.package.outputs.artifact-basename) }} | ||
merge-multiple: true | ||
path: dist | ||
|
||
- name: Test App | ||
working-directory: testbed | ||
timeout-minutes: 15 | ||
|
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 @@ | ||
The handling of the Travertino dependency in examples, CI and testbed was modified. |
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 |
---|---|---|
|
@@ -83,33 +83,17 @@ author_email = "[email protected]" | |
formal_name = "Toga Demo" | ||
description = "A demonstration of the capabilities of the Toga widget toolkit." | ||
sources = ["toga_demo"] | ||
requires = ["../core"] | ||
|
||
[tool.briefcase.app.toga-demo.macOS] | ||
requires = [ | ||
"../cocoa", | ||
] | ||
|
||
[tool.briefcase.app.toga-demo.linux] | ||
requires = [ | ||
"../gtk", | ||
] | ||
|
||
[tool.briefcase.app.toga-demo.windows] | ||
requires = [ | ||
"../winforms", | ||
] | ||
|
||
# Mobile deployments | ||
[tool.briefcase.app.toga-demo.iOS] | ||
requires = [ | ||
"../iOS", | ||
] | ||
|
||
[tool.briefcase.app.toga-demo.android] | ||
requires = [ | ||
"../android", | ||
] | ||
|
||
base_theme = "Theme.MaterialComponents.Light.DarkActionBar" | ||
|
||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ description = "A testing app" | |
sources = ["box"] | ||
requires = [ | ||
"../../core", | ||
"../../travertino", | ||
] | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ description = "A testing app" | |
sources = ["button"] | ||
requires = [ | ||
"../../core", | ||
"../../travertino", | ||
] | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ description = "A testing app" | |
sources = ["canvas"] | ||
requires = [ | ||
"../../core", | ||
"../../travertino", | ||
] | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ description = "A testing app" | |
sources = ["colors"] | ||
requires = [ | ||
"../../core", | ||
"../../travertino", | ||
] | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ description = "A testing app" | |
sources = ["focus"] | ||
requires = [ | ||
"../../core", | ||
"../../travertino", | ||
] | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ description = "A testing app" | |
sources = ["font"] | ||
requires = [ | ||
"../../core", | ||
"../../travertino", | ||
] | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ description = "A testing app" | |
sources = ["layout"] | ||
requires = [ | ||
"../../core", | ||
"../../travertino", | ||
] | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ description = "A testing app" | |
sources = ["resize"] | ||
requires = [ | ||
"../../core", | ||
"../../travertino", | ||
] | ||
|
||
|
||
|
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
Oops, something went wrong.