Skip to content

Commit c5b5c81

Browse files
authored
Switch from Nox to Hatch (#260)
1 parent 2abe5ce commit c5b5c81

Some content is hidden

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

46 files changed

+985
-970
lines changed

.github/workflows/publish-develop-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
jobs:
8-
deploy:
8+
publish-develop-docs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
@@ -17,12 +17,12 @@ jobs:
1717
- uses: actions/setup-python@v5
1818
with:
1919
python-version: 3.x
20-
- run: pip install -r requirements/build-docs.txt
20+
- name: Install dependencies
21+
run: pip install --upgrade pip hatch uv
2122
- name: Publish Develop Docs
2223
run: |
2324
git config user.name github-actions
2425
git config user.email github-actions@github.com
25-
cd docs
26-
mike deploy --push develop
26+
hatch run docs:deploy_develop
2727
concurrency:
2828
group: publish-docs

.github/workflows/publish-latest-docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
jobs:
8-
deploy:
8+
publish-latest-docs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
@@ -17,12 +17,12 @@ jobs:
1717
- uses: actions/setup-python@v5
1818
with:
1919
python-version: 3.x
20-
- run: pip install -r requirements/build-docs.txt
20+
- name: Install dependencies
21+
run: pip install --upgrade pip hatch uv
2122
- name: Publish ${{ github.event.release.name }} Docs
2223
run: |
2324
git config user.name github-actions
2425
git config user.email github-actions@github.com
25-
cd docs
26-
mike deploy --push --update-aliases ${{ github.event.release.name }} latest
26+
hatch run docs:deploy_latest ${{ github.ref_name }}
2727
concurrency:
2828
group: publish-docs

.github/workflows/publish-py.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
types: [published]
99

1010
jobs:
11-
release-package:
11+
publish-python:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
@@ -20,13 +20,11 @@ jobs:
2020
with:
2121
python-version: "3.x"
2222
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -r requirements/build-pkg.txt
23+
run: pip install --upgrade pip hatch uv
2624
- name: Build and publish
2725
env:
2826
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2927
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
3028
run: |
31-
python -m build --sdist --wheel --outdir dist .
29+
hatch build --clean
3230
twine upload dist/*

.github/workflows/test-docs.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
pull_request:
88
branches:
99
- main
10-
schedule:
11-
- cron: "0 0 * * *"
1210

1311
jobs:
1412
docs:
@@ -23,20 +21,12 @@ jobs:
2321
- uses: actions/setup-python@v5
2422
with:
2523
python-version: 3.x
26-
# - name: Check docs links
27-
# uses: umbrelladocs/action-linkspector@v1
28-
# with:
29-
# github_token: ${{ secrets.github_token }}
30-
# reporter: github-pr-review
31-
# fail_on_error: false
24+
- name: Install Python Dependencies
25+
run: pip install --upgrade pip hatch uv
26+
# DISABLED DUE TO DJANGO DOCS CONSTANTLY THROWING 429 ERRORS
27+
# - name: Check documentation links
28+
# run: hatch run docs:linkcheck
3229
- name: Check docs build
33-
run: |
34-
pip install -r requirements/build-docs.txt
35-
cd docs
36-
mkdocs build --strict
30+
run: hatch run docs:build
3731
- name: Check docs examples
38-
run: |
39-
pip install -r requirements/check-types.txt
40-
pip install -r requirements/check-style.txt
41-
mypy --show-error-codes docs/examples/python/
42-
ruff check docs/examples/python/
32+
run: hatch run docs:check_examples

.github/workflows/test-javascript.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
javascript:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: oven-sh/setup-bun@v2
17+
with:
18+
bun-version: latest
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.x
22+
- name: Install Python Dependencies
23+
run: pip install --upgrade pip hatch uv
24+
- name: Run Tests
25+
run: hatch run javascript:check

.github/workflows/test-src.yml renamed to .github/workflows/test-python.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- cron: "0 0 * * *"
1212

1313
jobs:
14-
source:
14+
python:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
@@ -26,6 +26,8 @@ jobs:
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Install Python Dependencies
29-
run: pip install -r requirements/test-run.txt
30-
- name: Run Tests
31-
run: nox -t test
29+
run: pip install --upgrade pip hatch uv
30+
- name: Run Single DB Tests
31+
run: hatch test --python ${{ matrix.python-version }} --ds=test_app.settings_single_db -v
32+
- name: Run Multi-DB Tests
33+
run: hatch test --python ${{ matrix.python-version }} --ds=test_app.settings_multi_db -v

.linkspector.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ Don't forget to remove deprecated code on each major release!
1919

2020
## [Unreleased]
2121

22-
- Nothing (yet)!
22+
### Fixed
23+
24+
- Fixed regression in v5.1.0 where components would sometimes not output debug messages when `settings.py:DEBUG` is enabled.
25+
26+
### Changed
27+
28+
- Set upper limit on ReactPy version to `<2.0.0`.
2329

2430
## [5.1.0] - 2024-11-24
2531

MANIFEST.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/mkdocs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ nav:
1616
- Management Commands: reference/management-commands.md
1717
- About:
1818
- Changelog: about/changelog.md
19-
- Contributor Guide:
20-
- Code: about/code.md
21-
- Docs: about/docs.md
19+
- Contributor Guide: about/contributing.md
2220
- Community:
2321
- GitHub Discussions: https://github.com/reactive-python/reactpy-django/discussions
2422
- Discord: https://discord.gg/uNb5P4hA9X

0 commit comments

Comments
 (0)