@@ -79,23 +79,47 @@ community examples in `gosling/examples/`. If you are interested in contributing
7979feel free to submit a PR! Checkout the [ existing JSON examples] ( http://gosling-lang.org/examples/ )
8080if you are looking for inspiration.
8181
82+ ## ** Development**
8283
83- ## Development
84+ The source code for ** gos** is a hybrid of Python and TypeScript (used for the
85+ [ anywidget] ( https://github.com/manzt/anywidget ) component). It requires both:
8486
85- This project uses [ uv] ( https://github.com/astral-sh/uv ) for development.
87+ - [ uv] ( https://github.com/astral-sh/uv ) (for Python development)
88+ - [ Deno] ( https://deno.land ) (for building the widget)
8689
87- Run tests with:
90+ Please ensure both are installed before proceeding.
91+
92+ ** Tests**
93+
94+ Run the test suite with:
8895
8996``` sh
9097uv run pytest
9198```
9299
93- The schema bindings (` gosling/schema/ ` ) and docs (` doc/user_guide/API.rst ` ) are
94- automatically generated using the following. Please do not edit these
95- files directly.
100+ ** Widget**
96101
97- ``` bash
98- # generate gosling/schema/*
102+ The widgets implementation is split between ` ./gosling/_widget.py ` (the Python
103+ component) and ` ./frontend/widget.ts ` (the TypeScript component).
104+
105+ To modify the widget's behavior in the front end, edit ` ./frontend/widget.ts `
106+ and compile with:
107+
108+ ``` sh
109+ deno task build
110+ ```
111+
112+ Use ` deno task dev ` to watch for changes and recompile automatically.
113+
114+ ** Auto-generate Schema Bindings**
115+
116+ A large portion of the Python code is automatically generated from the Gosling
117+ schema to ensure the Python bindings stay up to date. Schema bindings
118+ (` gosling/schema/ ` ) and documentation (` doc/user_guide/API.rst ` ) are generated
119+ automatically. Do not edit these files manually. To regenerate them, use:
120+
121+ ``` sh
122+ # Generate gosling/schema/*
99123uv run tools/generate_schema_wrapper.py < tag_name>
100124```
101125
0 commit comments