Welcome to the Apache Hudi community! We appreciate your interest in contributing to this open-source data lake platform. This guide will walk you through the process of making your first contribution.
Testing and reporting bugs are also valueable contributions. Please follow the issue template to file bug reports.
- Install Rust, e.g. as described here
- Have a compatible Python version installed (check
python/pyproject.toml
for current requirement)
For most of the time, use dev commands specified in python/Makefile
, it applies to both Python
and Rust modules. You don't need to cd
to the root directory and run cargo
commands.
To setup python virtual env, run
make setup-venv
Note
This will run python
command to setup the virtual environment. You can either change that to python3.X
,
or simply alias python
to your local python3.X
installation, for example:
echo "alias python=/Library/Frameworks/Python.framework/Versions/3.12/bin/python3" >> ~/.zshrc`
Once activate virtual env, build the project for development by
make develop
This will install hudi
dependency built from your local repo to the virtual env.
For Rust,
# for all tests
make test-rust
# or
cargo test --workspace
# for all tests in a crate / package
cargo test -p hudi-core
# for a specific test case
cargo test -p hudi-core table::tests::hudi_table_get_schema
For Python,
# for all tests
make test-python
# or
pytest -s
# for a specific test case
pytest tests/test_table_read.py -s -k "test_sample_table"
Run check command and follow the suggestions to fix the code.
make check-rust
The pull request title must follow the format outlined in
the conventional commits spec. Conventional commits
is a standardized format for commit messages, and also allows us to auto-generate change logs and release notes. Since
only the main
branch requires this format, and we always squash commits and then merge the PR, incremental commits'
messages
do not need to conform to it.
We use codecov to generate code coverage report and enforce net positive coverage change for PRs, with a 5% lenacy.
We expect all community members to follow our Code of Conduct.