tk-uia 0.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. tk_uia-0.6.3/.github/workflows/publish.yml +52 -0
  2. tk_uia-0.6.3/.github/workflows/tests.yml +44 -0
  3. tk_uia-0.6.3/.gitignore +9 -0
  4. tk_uia-0.6.3/CHANGELOG.md +756 -0
  5. tk_uia-0.6.3/COOKBOOK.md +327 -0
  6. tk_uia-0.6.3/COVERAGE.md +88 -0
  7. tk_uia-0.6.3/LICENSE +21 -0
  8. tk_uia-0.6.3/PKG-INFO +126 -0
  9. tk_uia-0.6.3/README.md +95 -0
  10. tk_uia-0.6.3/RELEASING.md +140 -0
  11. tk_uia-0.6.3/ROADMAP.md +197 -0
  12. tk_uia-0.6.3/docs/GUIDE.md +949 -0
  13. tk_uia-0.6.3/probes/_widget_zoo.py +267 -0
  14. tk_uia-0.6.3/probes/coverage_matrix.py +413 -0
  15. tk_uia-0.6.3/probes/every_classic_tk_widget.py +159 -0
  16. tk_uia-0.6.3/probes/every_ttk_widget.py +139 -0
  17. tk_uia-0.6.3/probes/what_enable_alone_gives_you.py +232 -0
  18. tk_uia-0.6.3/probes/what_your_app_tells_windows.py +134 -0
  19. tk_uia-0.6.3/pyproject.toml +76 -0
  20. tk_uia-0.6.3/src/tk_uia/__init__.py +224 -0
  21. tk_uia-0.6.3/src/tk_uia/_accprop.py +288 -0
  22. tk_uia-0.6.3/src/tk_uia/_overlay.py +107 -0
  23. tk_uia-0.6.3/src/tk_uia/_tkstrip.py +53 -0
  24. tk_uia-0.6.3/src/tk_uia/_tkvars.py +56 -0
  25. tk_uia-0.6.3/src/tk_uia/annotate.py +914 -0
  26. tk_uia-0.6.3/src/tk_uia/describe.py +636 -0
  27. tk_uia-0.6.3/src/tk_uia/layout.py +208 -0
  28. tk_uia-0.6.3/src/tk_uia/py.typed +0 -0
  29. tk_uia-0.6.3/src/tk_uia/roles.py +93 -0
  30. tk_uia-0.6.3/src/tk_uia/tabs.py +254 -0
  31. tk_uia-0.6.3/src/tk_uia/tkversion.py +76 -0
  32. tk_uia-0.6.3/tests/__init__.py +1 -0
  33. tk_uia-0.6.3/tests/conftest.py +148 -0
  34. tk_uia-0.6.3/tests/doubles.py +328 -0
  35. tk_uia-0.6.3/tests/fixture_apps/__init__.py +5 -0
  36. tk_uia-0.6.3/tests/fixture_apps/annotated_app.py +288 -0
  37. tk_uia-0.6.3/tests/fixture_apps/newly_roled_app.py +61 -0
  38. tk_uia-0.6.3/tests/fixture_apps/notebook_app.py +125 -0
  39. tk_uia-0.6.3/tests/fixture_apps/reimported_ttk_app.py +49 -0
  40. tk_uia-0.6.3/tests/test_annotator.py +1133 -0
  41. tk_uia-0.6.3/tests/test_com_diagnostics.py +58 -0
  42. tk_uia-0.6.3/tests/test_description.py +1135 -0
  43. tk_uia-0.6.3/tests/test_gui_annotations.py +429 -0
  44. tk_uia-0.6.3/tests/test_gui_description.py +125 -0
  45. tk_uia-0.6.3/tests/test_gui_new_roles.py +84 -0
  46. tk_uia-0.6.3/tests/test_gui_tabs.py +189 -0
  47. tk_uia-0.6.3/tests/test_installation.py +178 -0
  48. tk_uia-0.6.3/tests/test_layout.py +385 -0
  49. tk_uia-0.6.3/tests/test_public_surface.py +155 -0
  50. tk_uia-0.6.3/tests/test_roles.py +128 -0
  51. tk_uia-0.6.3/tests/test_tabs.py +262 -0
  52. tk_uia-0.6.3/tests/test_version_gate.py +75 -0
  53. tk_uia-0.6.3/tests/threads.py +28 -0
@@ -0,0 +1,52 @@
1
+ # Publishes to PyPI via Trusted Publishing (OIDC); no API token is stored in this repo.
2
+ #
3
+ # One-time setup on PyPI before the first tag push, under Account settings >
4
+ # Publishing, add a pending publisher:
5
+ # PyPI project: tk-uia
6
+ # Publisher: GitHub
7
+ # Owner: HuzPro
8
+ # Repository: tk-uia
9
+ # Workflow: publish.yml
10
+ # Environment: pypi
11
+ # Until that publisher exists, this job runs fine up to the final step and then
12
+ # fails at "Publish to PyPI" because PyPI rejects the OIDC token exchange.
13
+
14
+ name: publish
15
+
16
+ on:
17
+ push:
18
+ tags: ["v*"]
19
+
20
+ permissions:
21
+ id-token: write
22
+ contents: read
23
+
24
+ jobs:
25
+ publish:
26
+ runs-on: ubuntu-latest
27
+ environment: pypi
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+
31
+ - uses: actions/setup-python@v5
32
+ with:
33
+ python-version: "3.12"
34
+
35
+ # A mistyped tag must never publish a different version than it names.
36
+ - name: Verify tag matches package version
37
+ run: |
38
+ tag="${GITHUB_REF#refs/tags/}"
39
+ tagged_version="${tag#v}"
40
+ declared_version="$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' src/tk_uia/__init__.py)"
41
+ echo "tag=${tag} tagged_version=${tagged_version} declared_version=${declared_version}"
42
+ if [ "${tagged_version}" != "${declared_version}" ]; then
43
+ echo "::error::Tag ${tag} means version ${tagged_version}, but src/tk_uia/__init__.py declares '${declared_version}'."
44
+ exit 1
45
+ fi
46
+
47
+ - run: python -m pip install --upgrade pip
48
+ - run: pip install build
49
+ - run: python -m build
50
+
51
+ - name: Publish to PyPI
52
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,44 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ lint:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v7
13
+ - uses: actions/setup-python@v7
14
+ with:
15
+ python-version: "3.12"
16
+ - run: python -m pip install --upgrade pip
17
+ - run: pip install "ruff==0.16.*"
18
+ - run: ruff check src tests probes
19
+ - run: ruff format --check src tests probes
20
+
21
+ # The `gui` suite launches a real Tk window and reads it back through UI
22
+ # Automation, so it needs an interactive Windows desktop and is local-only
23
+ # (see ROADMAP). What runs here is everything else, on both platforms.
24
+ #
25
+ # The Ubuntu lane is the meaningful one: this package is installed at runtime
26
+ # inside somebody else's application, and it claims to cost that application
27
+ # nothing and to import anywhere. A Linux CPython has no `ctypes.windll` and
28
+ # is not guaranteed to carry `_tkinter` at all, so a lane that imports the
29
+ # package and runs its whole unit suite there is what keeps that claim true.
30
+ test:
31
+ strategy:
32
+ fail-fast: false
33
+ matrix:
34
+ os: [ubuntu-latest, windows-latest]
35
+ python-version: ["3.10", "3.13"]
36
+ runs-on: ${{ matrix.os }}
37
+ steps:
38
+ - uses: actions/checkout@v7
39
+ - uses: actions/setup-python@v7
40
+ with:
41
+ python-version: ${{ matrix.python-version }}
42
+ - run: python -m pip install --upgrade pip
43
+ - run: pip install -e ".[dev]"
44
+ - run: pytest -m "not gui" -q
@@ -0,0 +1,9 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .venv/
5
+ .venv-linux/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ dist/
9
+ build/