Development Setup
Clone, build, and test Zedda from source with CMake, Ninja, and scikit-build-core.
Thank you for your interest in contributing to Zedda! π
We welcome all forms of contribution β from fixing a typo in docs to implementing a new algorithm in C++. Every contribution matters.
Table of Contents
- Code of Conduct
- How to Report Issues
- Development Setup
- Project Structure
- Making Changes
- Running Tests
- Submitting a Pull Request
- Coding Standards
- Where to Get Help
Code of Conduct
By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing.
How to Report Issues
- Bug reports: Use the Bug Report template.
- Feature requests: Use the Feature Request template.
- Security vulnerabilities: Do NOT open a public issue. See SECURITY.md for responsible disclosure instructions.
Development Setup
Prerequisites
| Tool | Minimum Version | Notes |
|---|---|---|
| Python | 3.9+ | Required |
| C++ Compiler | C++17 support | GCC 9+, Clang 10+, or MSVC 2019+ |
| CMake | 3.21+ | For building the C++ core |
| Git | Any | For cloning with submodules |
Step-by-Step Setup
1. Fork and clone the repository
git clone https://github.com/<your-username>/Zedda.git --recursive
cd Zedda
The
--recursiveflag is required to pull innanobindandarrowas git submodules.
2. Create a virtual environment (recommended)
python -m venv .venv
# Activate it
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
3. Install in editable/development mode
This compiles the C++ core and installs the Python package:
pip install -e ".[dev]"
If you only want to change Python code (not the C++ core), this step builds the native extension once and subsequent Python changes are reflected immediately.
4. Verify your setup
import zedda as zd
zd.profile("tests/data/titanic.csv")
Project Structure
Zedda/
βββ src/ # C++ source files
β βββ core/
β βββ arrow_profiler.cpp # Parquet/Arrow scanning via Arrow C Data Interface
β βββ stream_reader.cpp # CSV streaming engine (mmap + fgets)
β βββ profile_builder.cpp # Multi-threaded profile orchestrator
β βββ simd_scanner.cpp # AVX2/AVX-512 SIMD field scanner
β βββ mmap_reader.cpp # Memory-mapped file reader
βββ include/
β βββ zedda/ # C++ header files
βββ python/
β βββ zedda/ # Python package
β βββ __init__.py # Public API: scan, profile, compare, fix, ml_ready
β βββ cli.py # CLI (Typer app: `zedda run`, `zedda compare`)
β βββ report.py # HTML report utilities (XSS-safe templates)
β βββ ai_insights.py # OpenAI integration (optional)
βββ tests/ # Python tests (pytest)
βββ docs/ # Documentation and assets
βββ extern/ # Git submodules (nanobind, etc.)
βββ CMakeLists.txt # C++ build configuration
βββ pyproject.toml # Python project metadata (scikit-build-core)
Making Changes
Python-only changes
For changes to python/zedda/*.py, you donβt need to rebuild the C++ extension. Just edit the files and your changes are live.
C++ changes
After editing any file in src/ or include/, you need to recompile:
pip install -e ".[dev]"
Or if you have CMake set up directly:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
Running Tests
# Run the full test suite
pytest tests/
# Run a specific test file
pytest tests/test_profile.py -v
# Run with coverage
pytest tests/ --cov=zedda --cov-report=term-missing
All tests must pass before submitting a PR.
Submitting a Pull Request
-
Create a feature branch from
main:git checkout -b feat/your-feature-name -
Make your changes, following the Coding Standards below.
-
Add or update tests for any changed behavior.
-
Ensure all tests pass:
pytest tests/ -
Commit with a clear message:
git commit -m "feat: add HLL cardinality estimation for string columns"We follow Conventional Commits (
feat:,fix:,docs:,test:,refactor:). -
Push your branch and open a Pull Request against
main. -
Fill in the PR template β describe what you changed and why.
Coding Standards
Python
- Follow PEP 8.
- Add type hints to all new public functions.
- Write Google-style or NumPy-style docstrings for all public functions.
- Avoid adding new heavy dependencies without discussion.
C++
- Use C++17 features; target compatibility with GCC 9+, Clang 10+, and MSVC 2019+.
- Prefer
constreferences andstd::string_viewover copies. - Write memory-safe code β no raw
new/delete(usestd::unique_ptr). - Document non-obvious algorithms with inline comments referencing the source paper.
Security
- Never interpolate raw user data (e.g., column names from CSV files) into HTML, SQL, or generated code without proper escaping. See the patterns in
python/zedda/report.py. - Always use
repr()when embedding column names in generated Python code (see_safe_col_name()in__init__.py).
Where to Get Help
- GitHub Discussions β for questions, ideas, and general discussion.
- GitHub Issues β for confirmed bugs and feature requests.
- Pull Request comments β for review feedback on specific changes.
We aim to respond to all issues and PRs within 3 business days.
Thank you for helping make Zedda better! β‘