You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2023. It is now read-only.
[isort](https://readthedocs.org/projects/isort/), and
60
+
[flake8](http://flake8.pycqa.org/en/latest/) to ensure a consistent code format
61
+
throughout the project. `Black`, `isort`, and `flake8` can be installed with
62
+
`conda` or `pip`:
63
+
64
+
```bash
65
+
conda install black isort flake8
66
+
```
67
+
68
+
```bash
69
+
pip install black isort flake8
70
+
```
71
+
72
+
These tools are used to auto-format the Python code, as well as check the Cython
73
+
code in the repository. Additionally, there is a CI check in place to enforce
74
+
that committed code follows our standards. You can use the tools to
75
+
automatically format your python code by running:
76
+
77
+
```bash
78
+
isort --atomic python/**/*.py
79
+
black python
80
+
```
81
+
82
+
and then check the syntax of your Python code by running:
83
+
84
+
```bash
85
+
flake8 python
86
+
```
87
+
88
+
Additionally, many editors have plugins that will apply `isort` and `Black` as
89
+
you edit files, as well as use `flake8` to report any style / syntax issues.
90
+
91
+
#### Pre-commit hooks
92
+
93
+
Optionally, you may wish to setup [pre-commit hooks](https://pre-commit.com/)
94
+
to automatically run `isort`, `Black`, and `flake8` when you make a git commit.
95
+
This can be done by installing `pre-commit` via `conda` or `pip`:
96
+
97
+
```bash
98
+
conda install -c conda-forge pre_commit
99
+
```
100
+
101
+
```bash
102
+
pip install pre-commit
103
+
```
104
+
105
+
and then running:
106
+
107
+
```bash
108
+
pre-commit install
109
+
```
110
+
111
+
from the root of the CLX repository. Now `isort`, `Black`, and `flake8` will be
112
+
run each time you commit changes.
113
+
54
114
### Build from Source
55
115
56
116
The following instructions are for developers and contributors to CLX OSS development. These instructions are tested on Linux Ubuntu 16.04 & 18.04. Use these instructions to build CLX from source and contribute to its development. Other operating systems may be compatible, but are not currently tested.
0 commit comments