Contributing¶
Thanks for taking the time to improve ninejs. This guide covers the local setup and the main checks to run before opening a pull request.
Before making changes, comment on an existing issue or open a new one.
Fork and clone¶
Fork the repository on GitHub, then clone your fork locally:
git clone git@github.com:<your-username>/ninejs.git
cd ninejs
git remote add upstream https://github.com/y-sunflower/ninejs.git
git fetch upstream
Create a branch for your change:
Prerequisites¶
Install these tools before setting up the project:
- Git
uvfor Python dependency managementbunfor JavaScript dependencies and tests- (optional but recommended)
justfor running project tasks - (optional but recommended)
prettieron yourPATH, used by the formatting check
Install dependencies¶
Install Python dependencies, JavaScript dependencies, and the Chromium browser used by Playwright:
This checks that uv and bun are installed, then runs:
Run tests¶
Run the full test suite:
This runs both the Python tests and the JavaScript tests. The Python test run includes the Playwright-backed browser tests.
To run smaller subsets:
Use just test-browser when you only want to run the browser interaction suite.
Formatting and checks¶
Run the repository check command before opening a pull request:
This runs:
uv run ty checkuv run ruff format --check .prettier . --write
Documentation¶
Serve the documentation locally with:
Then open http://localhost:8000 to preview the documentation website.