You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,6 +4,10 @@ ReactPy is a Python library for building user interfaces without JavaScript. It
4
4
5
5
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
6
6
7
+
**IMPORTANT**: This package uses modern Python tooling with Hatch for all development workflows. Always use Hatch commands for development tasks.
8
+
9
+
**BUG INVESTIGATION**: When investigating whether a bug was already resolved in a previous version, always prioritize searching through `docs/source/about/changelog.rst` first before using Git history. Only search through Git history when no relevant changelog entries are found.
10
+
7
11
## Working Effectively
8
12
9
13
### Bootstrap, Build, and Test the Repository
@@ -40,7 +44,8 @@ pip install flask sanic tornado
40
44
-`hatch build --clean` -- takes 10 seconds. NEVER CANCEL. Set timeout to 60+ minutes for safety.
41
45
42
46
**Run Python Tests:**
43
-
-`hatch test` -- takes 10-30 seconds for basic tests. NEVER CANCEL. Set timeout to 60+ minutes for full test suite.
47
+
-`hatch test` -- takes 10-30 seconds for basic tests. NEVER CANCEL. Set timeout to 60+ minutes for full test suite. **All tests must always pass - failures are never expected or allowed.**
48
+
-`hatch test --cover` -- run tests with coverage reporting (used in CI)
44
49
-`hatch test -k test_name` -- run specific tests
45
50
-`hatch test tests/test_config.py` -- run specific test files
46
51
- Note: Some tests require Playwright browser automation and may fail in headless environments
-**JavaScript linting**: 10 seconds (hatch run javascript:check)
270
+
-**Type checking**: 10 seconds (hatch run python:type_check)
271
+
-**Unit tests**: 10-30 seconds (varies by test selection)
272
+
-**Full CI pipeline**: 5-10 minutes
273
+
274
+
## Development Workflow
275
+
276
+
Follow this step-by-step process for effective development:
277
+
278
+
1.**Bootstrap environment**: Ensure you have Python 3.9+ and run `pip install hatch`
279
+
2.**Make your changes** to the codebase
280
+
3.**Run formatting**: `hatch fmt` to format code (~1 second)
281
+
4.**Run type checking**: `hatch run python:type_check` for type checking (~10 seconds)
282
+
5.**Run JavaScript linting** (if JavaScript was modified): `hatch run javascript:check` (~10 seconds)
283
+
6.**Run relevant tests**: `hatch test` with specific test selection if needed. **All tests must always pass - failures are never expected or allowed.**
284
+
7.**Validate component functionality** manually using validation tests above
285
+
8.**Build JavaScript** (if modified): `hatch run javascript:build` (~15 seconds)
286
+
9.**Update documentation** when making changes to Python source code (required)
287
+
10.**Add changelog entry** for all significant changes to `docs/source/about/changelog.rst`
288
+
289
+
**IMPORTANT**: Documentation must be updated whenever changes are made to Python source code. This is enforced as part of the development workflow.
290
+
291
+
**IMPORTANT**: Significant changes must always include a changelog entry in `docs/source/about/changelog.rst` under the appropriate version section.
0 commit comments