Skip to content

Commit 3ca61ac

Browse files
committed
docs: update CONTRIBUTING.md
1 parent 9011f4a commit 3ca61ac

File tree

2 files changed

+76
-19
lines changed

2 files changed

+76
-19
lines changed

CONTRIBUTING.md

Lines changed: 75 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22

33
That would be awesome if you want to contribute something to TileLang!
44

5-
- [Contributing](CONTRIBUTING.md#contributing)
6-
- [Reporting Bugs](CONTRIBUTING.md#reporting-bugs)
7-
- [Asking Questions](CONTRIBUTING.md#asking-questions)
8-
- [Submitting Pull Requests](CONTRIBUTING.md#submitting-pull-requests)
9-
- [Repository Setup](CONTRIBUTING.md#repository-setup)
10-
- [Running Tests](CONTRIBUTING.md#running-tests)
5+
### Table of Contents <!-- omit in toc --> <!-- markdownlint-disable heading-increment -->
116

12-
## Reporting Bugs
7+
- [Report Bugs](#report-bugs)
8+
- [Ask Questions](#ask-questions)
9+
- [Submit Pull Requests](#submit-pull-requests)
10+
- [Setup Development Environment](#setup-development-environment)
11+
- [Install Develop Version](#install-develop-version)
12+
- [Lint Check](#lint-check)
13+
- [Test Locally](#test-locally)
14+
- [Build Wheels](#build-wheels)
15+
- [Documentation](#documentation)
16+
17+
## Report Bugs
1318

1419
If you run into any weird behavior while using TileLang, feel free to open a new issue in this repository! Please run a **search before opening** a new issue, to make sure that someone else hasn't already reported or solved the bug you've found.
1520

@@ -18,35 +23,86 @@ Any issue you open must include:
1823
- Code snippet that reproduces the bug with a minimal setup.
1924
- A clear explanation of what the issue is.
2025

21-
22-
## Asking Questions
26+
## Ask Questions
2327

2428
Please ask questions in issues.
2529

26-
## Submitting Pull Requests
30+
## Submit Pull Requests
2731

2832
All pull requests are super welcomed and greatly appreciated! Issues in need of a solution are marked with a [`♥ help`](https://github.com/ianstormtaylor/TileLang/issues?q=is%3Aissue+is%3Aopen+label%3A%22%E2%99%A5+help%22) label if you're looking for somewhere to start.
2933

30-
Please run `./format.sh` before submitting a pull request to make sure that your code is formatted correctly.
34+
If you're new to contributing to TileLang, you can follow the following guidelines before submitting a pull request.
35+
36+
> [!NOTE]
37+
> Please include tests and docs with every pull request if applicable!
38+
39+
## Setup Development Environment
40+
41+
Before contributing to TileLang, please follow the instructions below to setup.
42+
43+
1. Fork TileLang ([fork](https://github.com/tile-ai/tilelang/fork)) on GitHub and clone the repository.
44+
45+
```bash
46+
git clone --recurse-submodules git@github.com:<your username>/tilelang.git # use the SSH protocol
47+
cd tilelang
48+
49+
git remote add upstream git@github.com:tile-ai/tilelang.git
50+
```
51+
52+
2. Setup a development environment:
53+
54+
```bash
55+
uv venv --seed venv # use `python3 -m venv venv` if you don't have `uv`
56+
57+
source venv/bin/activate
58+
python3 -m pip install --upgrade pip setuptools wheel "build[uv]"
59+
uv pip install --requirements requirements-dev.txt
60+
```
61+
62+
3. Setup the [`pre-commit`](https://pre-commit.com) hooks:
63+
64+
```bash
65+
pre-commit install --install-hooks
66+
```
3167
32-
Please include tests and docs with every pull request!
68+
Then you are ready to rock. Thanks for contributing to TileLang!
3369
34-
## Repository Setup
70+
## Install Develop Version
3571
36-
To run the build, you need to have the TileLang repository cloned to your computer. After that, you need to `cd` into the directory where you cloned it, and install the dependencies with `python`:
72+
To install TileLang in an "editable" mode, run:
3773
3874
```bash
39-
python setup.py install
75+
python3 -m pip install --no-build-isolation --verbose --editable .
4076
```
4177
78+
in the main directory. This installation is removable by:
4279
43-
## Running Tests
80+
```bash
81+
python3 -m pip uninstall tilelang
82+
```
83+
84+
## Lint Check
85+
86+
To check the linting, run:
87+
88+
```bash
89+
pre-commit run --all-files
90+
```
91+
92+
## Test Locally
4493
45-
To run the tests, start by building the project as described in the [Repository Setup](CONTRIBUTING.md#repository-setup) section.
94+
To run the tests, start by building the project as described in the [Setup Development Environment](#setup-development-environment) section.
4695
4796
Then you can rerun the tests with:
4897
49-
```text
50-
python -m pytest testing
98+
```bash
99+
python3 -m pytest testing
51100
```
52101
102+
## Build Wheels
103+
104+
_TBA_
105+
106+
## Documentation
107+
108+
_TBA_

requirements-lint.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# formatting
2+
pre-commit
23
yapf==0.43.0
34
ruff==0.14.0
45
codespell[toml]==2.4.1

0 commit comments

Comments
 (0)