-
Notifications
You must be signed in to change notification settings - Fork 41
chore: Update CONTRIBUTING.md to use uv #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 27 commits
6eb90f4
665f199
c91307e
bffa122
1c1c886
1998f0b
760ae1a
8d88050
6c4dd97
ec4ad5b
d391711
0783b83
1a38742
7f3458e
e00b711
4a02853
958d652
38e3cc7
4c0a097
6eb73ed
114fec0
b9696da
5077401
3f5bab2
0ff8e00
cb35c6c
afe4c91
45f4eb0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,89 +1,87 @@ | ||||||||||||||
| # Contributing to the Kubeflow SDK | ||||||||||||||
|
|
||||||||||||||
| Thank you for your interest in contributing to the Kubeflow SDK! | ||||||||||||||
| This guide explains how to contribute to the Kubeflow SDK project. | ||||||||||||||
| For the Kubeflow SDK documentation, please check [the official Kubeflow documentation](https://www.kubeflow.org/docs/components/). | ||||||||||||||
|
|
||||||||||||||
| ## Getting Started | ||||||||||||||
|
|
||||||||||||||
| ### Prerequisites | ||||||||||||||
| - Python 3.8–3.11 | ||||||||||||||
| - [pip](https://pip.pypa.io/en/stable/) | ||||||||||||||
| ## Requirements | ||||||||||||||
| - [Supported Python version](./pyproject.toml#L4) | ||||||||||||||
| - [pre-commit](https://pre-commit.com/) | ||||||||||||||
| - [uv](https://docs.astral.sh/uv/getting-started/installation/) | ||||||||||||||
|
|
||||||||||||||
| ### Setting Up Your Development Environment | ||||||||||||||
| Clone the repository: | ||||||||||||||
| ```sh | ||||||||||||||
| git clone https://github.com/kubeflow/sdk.git | ||||||||||||||
| cd sdk | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| Create a virtual environment and activate it: | ||||||||||||||
| ```sh | ||||||||||||||
| python3 -m venv .venv | ||||||||||||||
| source .venv/bin/activate | ||||||||||||||
| ``` | ||||||||||||||
| ## Development | ||||||||||||||
|
|
||||||||||||||
| Install dependencies in editable mode: | ||||||||||||||
| ```sh | ||||||||||||||
| pip install -e . | ||||||||||||||
| ``` | ||||||||||||||
| The Kubeflow SDK project includes a Makefile with several helpful commands to streamline your development workflow. | ||||||||||||||
|
|
||||||||||||||
| To install all dependencies (including dev tools) and create virtual environment, run | ||||||||||||||
|
|
||||||||||||||
| #### Development Build (Optional) | ||||||||||||||
| To install development tools and the latest API modules directly from the master branch: | ||||||||||||||
| ```sh | ||||||||||||||
| uv pip install -e . --group dev | ||||||||||||||
| make install-dev | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ## Development Workflow | ||||||||||||||
| ### Coding Style | ||||||||||||||
| Make sure to install [pre-commit](https://pre-commit.com/) (`uv pip install pre-commit`) and run `pre-commit install` from the root of the repository at least once before creating git commits. | ||||||||||||||
|
|
||||||||||||||
| The pre-commit hooks ensure code quality and consistency. They are executed in CI. PRs that fail to comply with the hooks will not be able to pass the corresponding CI gate. The hooks are only executed against staged files unless you run `pre-commit run --all`, in which case, they'll be executed against every file in the repository. | ||||||||||||||
|
|
||||||||||||||
| Specific programmatically generated files listed in the `exclude` field in [.pre-commit-config.yaml](.pre-commit-config.yaml) are deliberately excluded from the hooks. | ||||||||||||||
|
|
||||||||||||||
| ### Pre-commit | ||||||||||||||
| To check formatting: | ||||||||||||||
|
|
||||||||||||||
| ```shell | ||||||||||||||
| make verify | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| #### Pre-commit | ||||||||||||||
| We use pre-commit to ensure consistent code formatting. To enable pre-commit hooks, run: | ||||||||||||||
|
||||||||||||||
| #### Pre-commit | |
| We use pre-commit to ensure consistent code formatting. To enable pre-commit hooks, run: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove those sections, since you explain it here: https://github.com/kubeflow/sdk/blob/afe4c9160412090c885e9ab5c214d34c6ea788c3/CONTRIBUTING.md#coding-style
| ```shell | |
| pre-commit install | |
| ``` | |
| To run all hooks manually: | |
| ```sh | |
| pre-commit run --all-files |
Uh oh!
There was an error while loading. Please reload this page.