mirror of
https://github.com/deunix-educ/PyQuest.git
synced 2026-11-25 08:19:44 +01:00
Add tooling: Makefile, level validation, build, Pyodide vendoring, tests, docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# PyQuest
|
||||
|
||||
Learn Python by doing, **right in the browser**: nothing to install, works offline (PWA), for
|
||||
beginners and advanced learners alike.
|
||||
|
||||
- Real Python (CPython compiled to WebAssembly through [Pyodide](https://pyodide.org)) running in
|
||||
a Web Worker: genuine error messages, translated into plain language.
|
||||
- Notebook-style cells, progressive hints, automatic exercise validation.
|
||||
- Declarative levels (YAML): adding a level requires no code change.
|
||||
- XP, badges, daily streaks, optional sounds and voice, French/English interface.
|
||||
- Accessibility target: WCAG 2.2 AA (full keyboard use, light/dark themes, adjustable text size).
|
||||
|
||||
> Version française : [README.md](README.md)
|
||||
|
||||
## Quick start
|
||||
|
||||
Requirements: Python 3.12+, Node.js 20+, `make`, `curl`.
|
||||
|
||||
```bash
|
||||
make install # dev tools + pinned Pyodide in vendor/pyodide
|
||||
make dev # http://127.0.0.1:8000/
|
||||
make test # JS tests, Python tests, level validation
|
||||
make build # produces dist/ (static app to serve over HTTPS)
|
||||
```
|
||||
|
||||
`make help` lists every target.
|
||||
|
||||
## Layout
|
||||
|
||||
| Folder | Content |
|
||||
|---|---|
|
||||
| `app/` | Static application (ES modules JS, no framework) |
|
||||
| `levels/` | Levels (`level.yaml`), manifest and JSON Schema |
|
||||
| `scripts/` | Dev server, level validation, build, Pyodide download |
|
||||
| `tests/` | JS (`node:test`) and Python (`unittest`) tests |
|
||||
| `nginx/` | Example vhost with the COOP/COEP headers |
|
||||
| `docs/design/` | Architecture decisions and rationale (in French) |
|
||||
|
||||
## Deployment
|
||||
|
||||
The site must be served **over HTTPS**, at the root of a domain, with the headers
|
||||
`Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp`
|
||||
(see [nginx/pyquest.conf.example](nginx/pyquest.conf.example)). They allow an infinite loop to be
|
||||
interrupted cleanly. Without them the app still works but must restart its Python engine to stop
|
||||
a cell.
|
||||
|
||||
Pyodide is served from the same domain (never from a CDN): this is a COEP requirement.
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md), in particular to add a level.
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE). Pyodide (MPL-2.0) and js-yaml (MIT) keep their own licenses.
|
||||
Reference in New Issue
Block a user