mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 01:17:26 +08:00
Polish CONTRIBUTING>md (#2005)
This commit is contained in:
parent
916fd273ea
commit
fecdb8717e
@ -5,26 +5,26 @@ possible.
|
|||||||
|
|
||||||
## Pull Requests
|
## Pull Requests
|
||||||
|
|
||||||
1. Fork and submit pull requests to the repo.
|
1. Fork and submit pull requests to the repo.
|
||||||
2. If you've added code that should be tested, add tests.
|
2. If you've added code that should be tested, add tests.
|
||||||
3. If a change is likely to impact efficiency, run some of the benchmarks before
|
3. If a change is likely to impact efficiency, run some of the benchmarks before
|
||||||
and after the change. Examples of benchmarks can be found in `benchmarks/python/`.
|
and after the change. Examples of benchmarks can be found in `benchmarks/python/`.
|
||||||
4. If you've changed APIs, update the documentation.
|
4. If you've changed APIs, update the documentation.
|
||||||
5. Every PR should have passing tests and at least one review.
|
5. Every PR should have passing tests and at least one review.
|
||||||
6. For code formatting install `pre-commit` using something like `pip install pre-commit` and run `pre-commit install`.
|
6. For code formatting install `pre-commit` using something like `pip install pre-commit` and run `pre-commit install`.
|
||||||
This should install hooks for running `black` and `clang-format` to ensure
|
This should install hooks for running `black` and `clang-format` to ensure
|
||||||
consistent style for C++ and python code.
|
consistent style for C++ and python code.
|
||||||
|
|
||||||
You can also run the formatters manually as follows:
|
You can also run the formatters manually as follows:
|
||||||
|
|
||||||
```
|
```shell
|
||||||
clang-format -i file.cpp
|
clang-format -i file.cpp
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```shell
|
||||||
black file.py
|
black file.py
|
||||||
```
|
```
|
||||||
|
|
||||||
or run `pre-commit run --all-files` to check all files in the repo.
|
or run `pre-commit run --all-files` to check all files in the repo.
|
||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
|
Loading…
Reference in New Issue
Block a user