Skip to content

Commit a4247eb

Browse files
committed
Fix #1641
1 parent 6422e4a commit a4247eb

File tree

136 files changed

+3721
-1594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+3721
-1594
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Build
2+
23
on:
34
push:
45
branches-ignore:
@@ -13,70 +14,58 @@ on:
1314
workflow_dispatch:
1415

1516
jobs:
16-
17-
# Build job. Builds source distribution (sdist) and binary wheels distribution (bdist_wheel)
1817
build:
19-
name: Build ${{ matrix.dist }} [${{ matrix.python-version }} | ${{ matrix.os }} ${{ matrix.architecture }}]
18+
name: Build [${{ matrix.python-version }} | ${{ matrix.os }}]
19+
runs-on: ${{ matrix.os }}
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
# os: [ubuntu-latest, macos-latest, windows-latest] # Build wheels on different systems
24-
# python-version: [3.6, 3.7]
25-
# architecture: [x64]
26-
# dist: [bdist_wheel]
27-
include:
28-
- os: ubuntu-latest # Modify one element to build source distribution
29-
python-version: '3.10'
30-
architecture: x64
31-
dist: sdist bdist_wheel
32-
runs-on: ${{ matrix.os }}
33-
env:
34-
PYTHONUNBUFFERED: 1
35-
23+
os: [ubuntu-latest]
24+
python-version: ['3.13']
3625
steps:
37-
- name: Checkout
38-
uses: actions/checkout@v2
26+
- name: Checkout source
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: ${{ matrix.python-version }}
3933

40-
- name: Set up Python ${{ matrix.python-version }}
41-
uses: actions/setup-python@v2
42-
with:
43-
python-version: ${{ matrix.python-version }}
44-
architecture: ${{ matrix.architecture }}
34+
- name: Install build tools
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install build
4538
46-
- name: Build
47-
run: |
48-
python -m pip install --upgrade pip
49-
python -m pip install --upgrade setuptools wheel
50-
python setup.py ${{ matrix.dist }}
39+
- name: Build with `python -m build`
40+
run: |
41+
python -m build --wheel --sdist
5142
52-
- name: Upload artifacts
53-
uses: actions/upload-artifact@v2
54-
with:
55-
name: dist
56-
path: dist
43+
- name: Upload merged artifacts per OS
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: dist-${{ matrix.os }}
47+
path: dist/
48+
if-no-files-found: error
5749

58-
# Deploy job. Uploads distribution to PyPI (only on tags)
5950
deploy:
6051
name: Publish to PyPI
6152
runs-on: ubuntu-latest
6253
needs: build
6354
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
64-
env:
65-
PYTHONUNBUFFERED: 1
6655

6756
steps:
68-
- name: Checkout
69-
uses: actions/checkout@v2
57+
- name: Checkout source
58+
uses: actions/checkout@v4
59+
60+
- name: Download all artifacts
61+
uses: actions/download-artifact@v4
62+
with:
63+
path: dist
7064

71-
- name: Download artifacts
72-
uses: actions/download-artifact@v2
73-
with:
74-
name: dist
75-
path: dist
65+
- name: Publish to PyPI
66+
uses: pypa/gh-action-pypi-publish@v1.8.11
67+
with:
68+
user: __token__
69+
password: ${{ secrets.PYPI_TOKEN }}
70+
packages_dir: dist/
7671

77-
- name: Publish to PyPI
78-
uses: pypa/gh-action-pypi-publish@v1.5.0
79-
with:
80-
user: __token__
81-
password: ${{ secrets.PYPI_TOKEN }}
82-
packages_dir: dist/

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ on:
1515
jobs:
1616

1717
# Lint job. Runs pre-commit, fails if there are changed files
18+
# os, python version and architecture does not matter here
19+
# [${{ matrix.python-version }} | ${{ matrix.os }} ${{ matrix.architecture }}]
1820
lint:
19-
name: Check pre-commit [${{ matrix.python-version }} | ${{ matrix.os }} ${{ matrix.architecture }}]
21+
name: Check pre-commit
2022
strategy:
2123
fail-fast: true
2224
matrix:
2325
os: [ubuntu-latest]
24-
python-version: ['3.10']
26+
python-version: ['3.13']
2527
architecture: [x64]
2628
runs-on: ${{ matrix.os }}
2729
env:

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
fetch-depth: 0
3636
persist-credentials: ${{ github.event_name != 'workflow_dispatch' }} # Allow using PAT when making release
3737

38-
- name: Set up Python 3.10
39-
uses: actions/setup-python@v2
38+
- name: Set up Python 3.13
39+
uses: actions/setup-python@v5
4040
with:
41-
python-version: '3.10'
41+
python-version: '3.13'
4242
architecture: x64
4343

4444
- name: Set up environment

.github/workflows/test.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,32 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ubuntu-latest, macos-latest, windows-latest]
24-
python-version: ['3.10']
24+
python-version: ['3.13']
2525
architecture: [x64]
26-
kivy-version: [2.1.0]
27-
include:
28-
- os: windows-latest
29-
python-version: '3.10'
30-
architecture: x86
31-
kivy-version: 2.1.0
26+
kivy-version: [2.3.1]
3227
runs-on: ${{ matrix.os }}
3328
env:
3429
PYTHONUNBUFFERED: 1
3530

3631
steps:
3732
- name: Checkout
38-
uses: actions/checkout@v2
33+
uses: actions/checkout@v4
3934

4035
- name: Set up Python ${{ matrix.python-version }}
41-
uses: actions/setup-python@v2
36+
uses: actions/setup-python@v5
4237
with:
4338
python-version: ${{ matrix.python-version }}
4439
architecture: ${{ matrix.architecture }}
4540

4641
- name: Cache MacOS deps
47-
uses: actions/cache@v2
42+
uses: actions/cache@v4
4843
if: startswith(matrix.os, 'macos')
4944
with:
5045
path: macos-cache
5146
key: ${{ runner.OS }}-deps-${{ hashFiles('.ci/macos_versions.sh') }}
5247

5348
- name: Cache MacOS gst-devel deps
54-
uses: actions/cache@v2
49+
uses: actions/cache@v4
5550
if: startswith(matrix.os, 'macos')
5651
with:
5752
path: macos-cache-gst-devel

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ temp
6868
/kivymd/tools/release/*.zip
6969
/kivymd/tools/release/temp
7070
.idea/
71+
docs/sources

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ repos:
1313

1414
# Sort imports
1515
- repo: https://github.com/PyCQA/isort
16-
rev: 5.13.2
16+
rev: 6.0.1
1717
hooks:
1818
- id: isort
1919
additional_dependencies: ["toml"]
2020

2121
# Lint Python
2222
- repo: https://github.com/PyCQA/flake8
23-
rev: 7.0.0
23+
rev: 7.2.0
2424
hooks:
2525
- id: flake8

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2
99
build:
1010
os: ubuntu-20.04
1111
tools:
12-
python: "3.10"
12+
python: "3.11"
1313

1414
# Build documentation in the docs/ directory with Sphinx
1515
sphinx:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ requirements = python3,
9191
materialyoucolor,
9292
exceptiongroup,
9393
asyncgui,
94-
asynckivy
94+
asynckivy,
95+
android
9596
```
9697

9798
This will download latest release version of KivyMD from [PyPI](https://pypi.org/project/kivymd).

docs/sources/_extensions/autoapi_kivymd.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515

1616
import autoapi
1717
import sphinx
18+
1819
# import unidecode
1920
from autoapi.directives import NestedParse
2021
from autoapi.extension import LOGGER
2122
from autoapi.extension import setup as autoapi_setup
2223
from autoapi.mappers.python.mapper import PythonSphinxMapper
24+
from autoapi.mappers.python.parser import Parser
2325
from autoapi.mappers.python.objects import PythonPythonMapper
2426
from docutils import nodes
2527
from sphinx.util.console import bold, darkgreen
@@ -108,6 +110,15 @@ def PythonSphinxMapper_output_rst(
108110
self._output_top_rst(root)
109111

110112

113+
def PythonSphinxMapper_read_file(self : PythonSphinxMapper, path, **kwargs):
114+
dir_root = kwargs.get("dir_root")
115+
if self._use_implicit_namespace:
116+
parsed_data = Parser().parse_file_in_namespace(path, dir_root)
117+
else:
118+
parsed_data = Parser().parse_file(path)
119+
return parsed_data
120+
121+
111122
def extension_build_finished(app, exception):
112123
if (
113124
not app.config.autoapi_keep_files
@@ -149,5 +160,6 @@ def setup(app):
149160
PythonPythonMapper.pathname = property(PythonPythonMapper_pathname)
150161
PythonPythonMapper.include_dir = PythonPythonMapper_include_dir
151162
PythonSphinxMapper.output_rst = PythonSphinxMapper_output_rst
163+
PythonSphinxMapper.read_file = PythonSphinxMapper_read_file
152164
autoapi.extension.build_finished = extension_build_finished
153165
autoapi_setup(app)

docs/sources/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"navigation_depth": 2,
5151
"collapse_navigation": False,
5252
"titles_only": True,
53-
"announcement": '''<h6>KivyMD Library Sponsors:</h6>
53+
"announcement": """<h6>KivyMD Library Sponsors:</h6>
5454
<p>
5555
<a href="https://github.com/PeterSurda" target="_blank">
5656
<img width="25" src="https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/peter.png" alt="Peter Šurda">
@@ -63,7 +63,7 @@
6363
Best Route Planner - Route Optimization Software
6464
</a>
6565
</p>
66-
''',
66+
""",
6767
}
6868

6969
# Pygments style.

0 commit comments

Comments
 (0)