Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d9e3ba5
Convert and initial config.
kattni Aug 22, 2025
9a60b2b
Prepare proof of concept for MkDocs switch.
kattni Aug 24, 2025
720fd37
Merge branch 'main' into tooling/mkdocs
kattni Aug 24, 2025
908f1cb
Update .readthedocs.yaml
kattni Aug 24, 2025
c7b64a7
Update docs Python version.
kattni Aug 24, 2025
fa68fa1
Upgrade pip on RTD.
kattni Aug 24, 2025
b99ef81
Revert Python version bump.
kattni Aug 24, 2025
54c190b
Requested changes.
kattni Aug 27, 2025
6f22804
Merge branch 'main' into tooling/mkdocs
kattni Aug 27, 2025
6f44f2a
Update version.
kattni Aug 27, 2025
2a9bfb0
Update version.
kattni Aug 27, 2025
f6f0fe7
Updates, deps, RTD config.
kattni Aug 27, 2025
8574194
Requested changes.
kattni Aug 27, 2025
4451135
Review and continued updates.
kattni Sep 24, 2025
8863106
Update build argument in tox.
kattni Sep 25, 2025
798db08
Snippets fixes.
kattni Sep 25, 2025
e783682
Various fixes, prep for running rumdl fmt.
kattni Sep 30, 2025
797be06
Reflow content, other rumdl fixes.
kattni Sep 30, 2025
0ddf93b
Fix canvas.md, merge doc updates from main.
kattni Sep 30, 2025
5e85931
Fixes to deal with rumdl failures.
kattni Sep 30, 2025
423f866
Merge remote-tracking branch 'beeware/main' into tooling/mkdocs
kattni Sep 30, 2025
01f9e96
Convert towncrier to Markdown, fix typo.
kattni Sep 30, 2025
4d24aa6
Fix CI issues with tox and dependency groups.
kattni Oct 2, 2025
afaaeb1
Update rumdl config, fix whitespace issue.
kattni Oct 2, 2025
8cbc5a3
Initial direct Markdown verification, add todos, rumdl fix.
kattni Oct 2, 2025
dff81ea
Add change note.
kattni Oct 2, 2025
1157af0
Batch two of Markdown/class doc validation.
kattni Oct 3, 2025
ee13f5f
Batch three of Markdown/class doc validation.
kattni Oct 3, 2025
1d549ca
Batch four of Markdown/class doc validation.
kattni Oct 3, 2025
ba67655
Batch five of Markdown/class doc validation.
kattni Oct 3, 2025
b958827
Final batch of Markdown/class doc validation.
kattni Oct 4, 2025
0ff788b
Fix current MkDocs build errors.
kattni Oct 4, 2025
4280fbc
Docstring note and code snippet updates.
kattni Oct 5, 2025
9038438
Convert docstrings from rST to Markdown, fixes.
kattni Oct 5, 2025
d73cf37
Merge remote-tracking branch 'beeware/main' into tooling/mkdocs
kattni Oct 5, 2025
6c441c7
Add rumdl to pre-commit, get passing.
kattni Oct 5, 2025
e80f770
Reenable pyspelling, resolve issues.
kattni Oct 5, 2025
be64c6f
Fix build issues.
kattni Oct 5, 2025
9c142b0
nospell table-reader syntax.
kattni Oct 5, 2025
c68c6c9
Fixes, finalise configurations.
kattni Oct 6, 2025
6f2ac82
Merge remote-tracking branch 'beeware/main' into tooling/mkdocs
kattni Oct 6, 2025
732ee01
Remove pre-commit check, restore TypeVar locations.
kattni Oct 6, 2025
23cb64e
Shift docs to docstrings.
kattni Oct 6, 2025
42bc97b
Fixes from final walkthrough.
kattni Oct 6, 2025
9509225
Fixes.
kattni Oct 6, 2025
b4aa4f1
Add missing type declarations.
freakboy3742 Oct 6, 2025
ef90cb0
Update latest changenotes.
kattni Oct 6, 2025
4569763
Revert Read the Docs to using Python 3.12.
kattni Oct 6, 2025
abcc6cd
Update pyproject.toml.
kattni Oct 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 7 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,13 @@ jobs:
name: Pre-commit checks
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
with:
# 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]"
pre-commit-source: "--group pre-commit"

towncrier:
name: Check towncrier
uses: beeware/.github/.github/workflows/towncrier-run.yml@main
with:
# 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]"
tox-source: "--group tox-uv"

package:
name: Package Toga
Expand Down Expand Up @@ -108,11 +104,7 @@ jobs:
allow-prereleases: true

- name: Install Tox
uses: beeware/.github/.github/actions/install-requirement@main
with:
requirements: tox
extra: dev
project-root: core
run: python -m pip install --group tox-uv

- name: Get Packages
uses: actions/[email protected]
Expand All @@ -126,7 +118,7 @@ jobs:
# 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.
export TOGA_INSTALL_COMMAND="python -m pip install ../$(ls dist/toga_core-*.whl)[dev] ../$(ls dist/travertino-*.whl) ../$(ls dist/toga_dummy-*.whl)"
export TOGA_INSTALL_COMMAND="uv pip install ../$(ls dist/toga_core-*.whl) ../$(ls dist/travertino-*.whl) ../$(ls dist/toga_dummy-*.whl) --group dev"
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 }}
Expand Down Expand Up @@ -165,11 +157,7 @@ jobs:
python-version: ${{ env.min_python_version }}

- name: Install Tox
uses: beeware/.github/.github/actions/install-requirement@main
with:
requirements: tox
extra: dev
project-root: core
run: python -m pip install --group tox-uv

- name: Retrieve Coverage Data
uses: actions/[email protected]
Expand Down Expand Up @@ -205,11 +193,7 @@ jobs:
python-version: ${{ env.min_python_version }}

- name: Install Tox
uses: beeware/.github/.github/actions/install-requirement@main
with:
requirements: tox
extra: dev
project-root: core
run: python -m pip install --group tox-uv

- name: Get Package
uses: actions/[email protected]
Expand All @@ -220,7 +204,7 @@ jobs:

- name: Test
run: |
export TRAVERTINO_INSTALL_COMMAND="python -m pip install ../$(ls dist/travertino-*.whl)"
export TRAVERTINO_INSTALL_COMMAND="uv pip install ../$(ls dist/travertino-*.whl)"
tox -e trav-compat

testbed:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
uses: beeware/.github/.github/workflows/pre-commit-update.yml@main
secrets: inherit
with:
pre-commit-source: './core[dev]'
pre-commit-source: "--group pre-commit"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# MkDocs
_build
comment.md

*.pyc
*~
.*.sw[op]
Expand All @@ -10,7 +14,6 @@ coverage.xml
dist
build
logs
_build
distribute-*
docs/env
local
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ repos:
- id: check-toml
- id: check-yaml
- id: check-case-conflict
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
Expand Down
57 changes: 57 additions & 0 deletions .pyspelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
matrix:
- name: markdown
dictionary:
wordlists:
- docs/spelling_wordlist
output: _build/dictionary/python.dic
sources:
- 'docs/**/*.md'
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- markdown.extensions.toc
- markdown.extensions.admonition
- markdown.extensions.attr_list
- pymdownx.superfences
- pymdownx.blocks.admonition
- pymdownx.blocks.caption
- pymdownx.blocks.tab
- pymdownx.snippets
- pyspelling.filters.html:
comments: true
attributes:
- title
- alt
ignores:
- 'code'
- 'pre'
- 'figure' # Can be removed once all <figure>s are replaced with Markdown
- 'nospell' # Allows for ignoring a word or words inline.
- pyspelling.filters.context:
context_visible_first: true
escapes: '\\[\\`~]'
delimiters:
# Ignores the Jinja directives and their contents
- open: '{%'
content: '[\d\D]*'
close: '%}'
# Ignores the Jinja directives and their contents
- open: '{{'
content: '[\d\D]*'
close: '}}'
# Ignore the mkdocstrings syntax and its content
- open: '\['
content: '[\d\D]*\]\[[\d\D]*'
close: '\]'
# Ignore the mkdocstrings syntax and its content
- open: ':::'
content: '[\d\D]*'
close: '\n'
# Ignore the single line Snippets syntax
- open: '-8<\-'
content: '[\d\D]*'
close: '\n'
# Ignore the multiline Snippets syntax
- open: '-8<\-\n'
content: '[\d\D]*'
close: '-8<-\n'
40 changes: 11 additions & 29 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,23 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
# Docs are always built on Python 3.12. See also the tox config and contribution docs.
# Docs are always built on Python 3.12. See also the tox config.
python: "3.12"
jobs:
post_checkout:
# RTD defaults to a depth of 50 but Toga versioning may require
# much more git history to accurately determine the SCM version
- git fetch --unshallow
pre_install:
- python -m pip install --upgrade pip
- python -m pip install --group 'tox-uv'
pre_build:
- tox -e docs-lint

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true

# Install extras for build. Order is significant; each entry is a separate call to
# `pip`, and we need Travertino to exist before core is installed. core[dev] is needed
# to run `tox -e docs-lint` as a pre-build step.
python:
install:
# Docs requirements are *mostly* handled by the `docs` extra; but we can't include
# the theme that way, so the theme is installed using a requirements.txt file,
# independent of the docs extra. Ideally, we'd use dependency groups for docs
# dependencies, but RTD doesn't support them yet.
- requirements: requirements-docs.txt
- method: pip
path: travertino
- method: pip
path: core
extra_requirements:
- dev
- docs
- python -m tox -e docs-lint
build:
html:
- python -m tox -e docs-$READTHEDOCS_LANGUAGE -- --output=$READTHEDOCS_OUTPUT/html/
30 changes: 30 additions & 0 deletions .rumdl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[global]
flavor = "mkdocs"
include = ["**/*.md"]
exclude = ["CONTRIBUTING.md", "README.md", "changes/template.md", "winforms", "comment.md"]
respect-gitignore = true
force-exclude = true

# Disable rules:
# MD013: Line length - flagging on mkdocstrings content
# MD014: Forces commands in codeblocks to show output
# MD042: Empty link - buggy, still flagging on valid MkDocs formatting
# MD052: Reference link not found - buggy, flagging on valis MkDocs links
disable = ["MD013", "MD014", "MD042", "MD052"]

[per-file-ignores]
"changes/**/*.md" = ["MD041"]

#[MD013] # Line length
#line_length = 999999 # Force reflow to paragraph content to remove linebreaks
#reflow = true
#reflow_mode = "normalize"

[MD026] # Remove punctuation at the end of headings
punctuation = ",;:"

[MD033] # No inline HTML
allowed_elements = ["nospell",] # pyspelling inline disable tag

[MD046]
style = "fenced"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3138.misc.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Examples no longer use `style=Pack` syntax, and now import constants from `toga.constants`.
1 change: 0 additions & 1 deletion changes/3138.misc.1.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3580.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The minimum width hint of the iOS `DateInput` and `TimeInput` widgets will now fit to the actual displayed size of the picker.
1 change: 0 additions & 1 deletion changes/3580.bugfix.rst

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions changes/3609.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`ListSource.find` now has a `default` parameter which is returned when no match is found.
1 change: 0 additions & 1 deletion changes/3609.feature.rst

This file was deleted.

1 change: 1 addition & 0 deletions changes/3611.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The `rgb` and `hsl` classes, in addition to their copy-pasteable-into-Python `__repr__`, gain a `__str__` that uses modern CSS syntax. For `rgb` this is simply a nice update, but for `hsl` it corrects color rendering issues when using the web backend.
1 change: 0 additions & 1 deletion changes/3611.bugfix.rst

This file was deleted.

1 change: 1 addition & 0 deletions changes/3611.removal.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Previously, Travertino provided an `rgba` and an `hsla` class, as well as `rgb` and `hsl` subclasses that enforce opaque alpha. In order to better match CSS, there is now no difference between these names; the shorter `rgb` and `hsl` are the preferred forms, but `rgba` and `hsla` are direct aliases for them. This can have backwards-incompatible implications; for instance, `rgba(255, 255, 255, .5).rgb` would previously have returned a fully opaque `rgb` instance, while now it will preserve its alpha channel information.
1 change: 0 additions & 1 deletion changes/3611.removal.1.rst

This file was deleted.

1 change: 1 addition & 0 deletions changes/3611.removal.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In order to better match CSS, the `rgb` and `hsl` constructors now silently clip (or in the case of hue, wrap) out-of-range values rather than throwing errors. They also convert them to consistent types: integers for red, blue, green, and hue; and floats for saturation, lightness, and alpha.
1 change: 0 additions & 1 deletion changes/3611.removal.2.rst

This file was deleted.

1 change: 1 addition & 0 deletions changes/3611.removal.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`rgb` and `hsl` color objects are now read-only; their `r`/`g`/`b`/`a` or `h`/`s`/`l`/`a` attributes can't be altered after creation. Because of this, format conversions (`rgb(...).hsl` or `hsl(...).rgb`) can now cache their results, only performing calculations once. "Converting" a color object to its own type (`rgb(...).rgb` or `hsl(...).hsl`) now returns the original object, rather than a new instance with the same values.
1 change: 0 additions & 1 deletion changes/3611.removal.3.rst

This file was deleted.

1 change: 1 addition & 0 deletions changes/3611.removal.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Travertino's color-parsing `color()` function interprets hex strings, e.g. `#123`, `#112233`, as well as predefined named colors. Previously, while this was never documented, it also parsed CSS-like declarations like `"rgb(...)"`; this feature has been removed.
1 change: 0 additions & 1 deletion changes/3611.removal.4.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3631.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pack now has a `font` shorthand property for specifying all font properties at once.
1 change: 0 additions & 1 deletion changes/3631.feature.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion changes/3655.misc.rst → changes/3655.misc.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Travertino's optional dev dependencies have been removed, since its testing is handled by the overall tox configuration and uses core[dev].
Travertino's optional dev dependencies have been removed, since its testing is handled by the overall tox configuration and uses core\[dev\].
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3663.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated coverage\[toml\] from 7.9.2 to 7.10.1 in /core.
1 change: 0 additions & 1 deletion changes/3663.misc.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3669.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
App path attributes were unintentionally made writeable in 0.5.2, e.g. one could reassign `app.paths.config = <something>`. This has been fixed.
1 change: 0 additions & 1 deletion changes/3669.bugfix.rst

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions changes/3672.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
An issue with the text of OptionContainer tab labels being returned as a `rubicon.objc.collections.ObjCStrInstance` on macOS instead of a Python `str` has been fixed.
1 change: 0 additions & 1 deletion changes/3672.bugfix.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3688.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated coverage\[toml\] from 7.10.1 to 7.10.2 in /core.
1 change: 0 additions & 1 deletion changes/3688.misc.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3712.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated coverage\[toml\] from 7.10.2 to 7.10.4 in /core.
1 change: 0 additions & 1 deletion changes/3712.misc.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3719.doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Toga's documentation was migrated to Markdown format.
1 change: 1 addition & 0 deletions changes/3720.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated coverage\[toml\] from 7.10.4 to 7.10.5 in /core.
1 change: 0 additions & 1 deletion changes/3720.misc.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3738.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated coverage\[toml\] from 7.10.5 to 7.10.6 in /core.
1 change: 0 additions & 1 deletion changes/3738.misc.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions changes/3770.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated coverage\[toml\] from 7.10.6 to 7.10.7 in /core.
1 change: 0 additions & 1 deletion changes/3770.misc.rst

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions changes/template.rst → changes/template.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{% for section, _ in sections.items() %}
{% set underline = underlines[0] %}{% if section %}{{section}}
{{ underline * section|length }}{% set underline = underlines[1] %}
{% if section %}
{{section}}

{% endif %}

{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section]%}
{{ definitions[category]['name'] }}
{{ underline * definitions[category]['name']|length }}
### {{ definitions[category]['name'] }}

{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %}
Expand Down
25 changes: 2 additions & 23 deletions core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,18 @@ classifiers = [
"Topic :: Software Development :: Widget Sets",
]

[project.optional-dependencies]
[dependency-groups]
# Extras used by developers *of* Toga are pinned to specific versions to
# ensure environment consistency.
dev = [
"coverage[toml] == 7.10.7",
"coverage-conditional-plugin == 0.9.0",
"Pillow == 11.3.0",
"pre-commit == 4.3.0",
"pytest == 8.4.2",
"pytest-asyncio == 1.2.0",
"pytest-freezer == 0.4.9",
"pytest-xdist == 3.8.0",
"setuptools-scm == 9.2.0",
"tox == 4.30.3",
]
# Docs are always built on a specific Python version; see RTD and tox config files,
# and the docs contribution guide.
docs = [
# Docs requirements are *mostly* handled by the `docs` extra; but we can't include
# the theme that way, so the theme is installed using a requirements.txt file,
# independent of the docs extra. Ideally, we'd use dependency groups for docs
# dependencies, but RTD doesn't support them yet.
# "beeware_theme @ git+https://github.com/beeware/beeware-theme",
"furo == 2025.9.25",
"Pillow == 11.3.0",
"pyenchant == 3.3.0",
"sphinx == 8.2.3",
"sphinx_tabs == 3.4.5",
"sphinx-autobuild == 2024.10.3",
"sphinx-csv-filter == 0.4.2",
"sphinx-copybutton == 0.5.2",
"sphinx-toolbox == 4.0.0",
"sphinxcontrib-spelling == 8.0.1",
"setuptools-scm==9.2.0",
]

[project.urls]
Expand Down
Loading