Contribute
Contributing to Waldiez Projects¶
Thank you for your interest in contributing to our projects! This document outlines the guidelines for contributing to Waldiez projects, including how to report issues, submit code changes, and adhere to our code of conduct.
[Project Specific Guidelines]¶
This project consists of two components:
- A Python package, located in the
waldiez
folder, built usinghatch
- A TypeScript (React) library and web application, located in the
src
folder, built usingbun
🐍 Contributing to the Python Part (waldiez/
)¶
The Python backend is a package managed primarily using Hatch, with optional support for uv
and plain venv
.
🚀 Quick Setup (Recommended: Hatch)¶
- Install Hatch:
- Create the dev environment:
- All optional dependencies are managed via extras (
dev
,test
,docs
, etc.), and available via:
⚡ Alternative: Fast Setup with uv
¶
- Install uv:
- Create and activate an environment:
- Install extras:
🔧 Alternative: Plain Python with venv
and requirements/
¶
This project also supports traditional requirements-based setup:
- Create a virtualenv:
- Install dependencies:
pip install -r requirements/all.txt
# or (to manually select what you need):
pip install -r requirements/dev.txt
pip install -r requirements/test.txt
pip install -r requirements/docs.txt
If using this method, you won’t have access to Hatch’s
hatch run
commands. Instead, use:python scripts/lint.py python scripts/test.py python scripts/format.py python scripts/build.py
Or you prefer make, you can use make
commands:
Usage: make [target]
Default target: help
Targets:
help Show this message and exit
requirements Generate requirements/*.txt files
format Run the formatters for the python package
lint Run the linters for the python package
forlint Alias for 'format' and 'lint'
clean Cleanup unneeded files
test Run the tests for the python package
test-models Run the tests for the models
test-exporting Run the tests for exporting
test-running Run the tests for running
test-io Run the tests for the IO stream
build Build the python package
docs Generate the python documentation
docs-live Generate the documentation in 'live' mode
images Build the podman/docker images
some Run some (not all) of the above
🧪 Testing (Python)¶
To run all tests with full coverage reports:
To run only selected test modules:
To test against multiple Python versions (3.10–3.13):
🧹 Formatting & Linting (Python)¶
To auto-format everything:
To run all linters:
This runs: black
, ruff
, mypy
, flake8
, bandit
, pylint
, yamllint
📦 Build & Release (Python)¶
To generate build artifacts:
To generate the documentation:
Note: For the "full" documentation (and the react related parts), we should first generate the React markdown files using
bun docs
. Then, we can generate the full documentation using:
To run all checks + matrix tests + docs + build:
⚛️ Contributing to the React Part (src/
)¶
The React frontend is a TypeScript project built with Bun, and Vite. It includes integrated support for Monaco editor, Playwright browser testing, Vitest, and full lint/style/format scripts.
🧰 Prerequisites¶
- Node.js 22.x or later
- Bun v1.2.11 or later
🚀 Setup¶
- Clone the repository if not already done:
- Install the dependencies:
🧪 Development (React)¶
Start the dev server:
This runs bun monaco && vite
and launches the app at:
🧹 Formatting & Linting (React)¶
To check and fix code style:
This runs:
prettier
stylelint
eslint --fix
To check only (no changes):
Or do both:
🧪 Testing (React)¶
Run all tests (components + browser):
Run just unit/component tests:
Run browser tests (Playwright required):
Update UI snapshots:
Run tests with coverage:
📦 Build (React)¶
Full build pipeline (library + web app + archive):
Build documentation (this will only generate the React markdown files in docs/reference/react
):
Preview build output:
🔧 Cleaning (React)¶
Clean all outputs (builds, coverage, tsbuildinfo, etc.):
You can also run partial cleaning scripts:
bun clean:lintcache
bun clean:dist
bun clean:coverage
bun clean:web
bun clean:docs
bun clean:archive
🔗 Combined Project Pipeline¶
You can run the full project build pipeline (React + Python) using the unified helpers:
# or ./scripts/do.{sh,ps1} all
python do.py all
# or:
node --import=tsx do.ts all # or npx tsx do.ts all
This will:
- Format, lint, and test the React project
- Build the React frontend and archive
- Format, lint, and test the Python package
- Build the Python wheel/sdist
- Build documentation
- Build a Docker image with the python package
✅ Submitting Changes¶
- Ensure lint and tests pass:
# either on the react part:
bun format
bun lint
bun test
bun schema
# or on the python part:
hatch run format
hatch run lint
hatch run test
# or the make/python way:
make forlint
make test
- Optionally (but recommended) ensure everything (Python + React) is working:
- Commit and push:
- Open a pull request targeting the
dev
branch.
💡 Tip: All low-level commands are also available in
scripts/
, such as:
scripts/do.sh
scripts/do.ps1
scripts/monaco.ts
scripts/changelog.ts
scripts/mkdir.ts
scripts/pack.ts
scripts/schema.ts
scripts/image.py
scripts/format.py
scripts/lint.py
scripts/test.py
scripts/build.py
Code of Conduct¶
We expect all contributors to adhere to our Code of Conduct. Please read it carefully and ensure that your contributions align with our community values.
Reporting Issues¶
If you encounter any issues while using our projects, please report them to the relevant Project's issue tracker. When reporting an issue, please provide as much detail as possible, including:
- A clear and descriptive title for the issue
- A detailed description of the problem
- Steps to reproduce the issue
- Any relevant screenshots or error messages
- Your environment details (e.g., operating system, version, etc.)
- Any other information that may help us understand the issue
Submitting Code Changes¶
If you would like to contribute code changes, please follow these steps:
- Fork the repository (prefer the dev branch if available) and create a new branch for your changes.
- Work on your changes in the new branch. Ensure that your code adheres to our coding standards and best practices.
- Run tests to ensure that your changes do not introduce any new issues.
- Submit a pull request to the dev (or main a dev is not available) branch of the original repository.
- Include a description of your changes and reference any related issues in the pull request.
- Ensure that your pull request passes all checks and adheres to our contribution guidelines.
- Be responsive to feedback and make any necessary changes to your pull request.
- Once your pull request is approved, it will be merged into the main branch.
- Celebrate your contribution to the Waldiez community!
Contributor License Agreement (CLA)¶
By submitting code changes, you agree to the terms of our Contributor License Agreement (CLA). Please read the CLA carefully before submitting your changes. If you have any questions or concerns about the CLA, please contact us, and we will be happy to assist you.
Developer Certificate of Origin (DCO)¶
By contributing to a project owned by Waldiez, you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution.
Security Policy¶
If you discover a security vulnerability in any of our projects, please report it to us immediately. Do not disclose the vulnerability publicly until we have had a chance to address it. For more information, please refer to our Security Policy.
License¶
By contributing to Waldiez projects, you agree to the terms of our License. Please read the license carefully before submitting your contributions. If you have any questions or concerns about the license, please contact us, and we will be happy to assist you.