Skip to content

Commit 28ea158

Browse files
MuradKhalilMurad Khalilov
andauthored
Fixing ruff commands in Makefile #825 (#859)
* updated the ruff lint command, added ruff code formating command in Makefile, updated contributing.md * fixing the issue with the new line at the end of makefile * updated the PHONY list in makefile --------- Co-authored-by: Murad Khalilov <[email protected]>
1 parent 8234c4b commit 28ea158

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,29 @@ We recommend that your contribution complies with the following guidelines befor
128128
```bash
129129
make check_lint
130130
```
131-
If you want to fix linting errors automatically, run
131+
- If you want to fix linting errors automatically, run
132132
133133
```bash
134134
make lint
135135
```
136136
137-
1. To run tests:
137+
- To run tests:
138138
139139
```bash
140140
make test
141141
```
142142
143-
6. To check code style:
143+
- To check code style:
144144
145145
```bash
146-
make check_lint
146+
make check_format
147147
```
148148
149+
- To fix code style automatically:
150+
151+
```bash
152+
make format
153+
```
149154
150155
## Overview of the MMM codebase
151156

Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
.PHONY: init lint check_lint test html cleandocs run_notebooks
1+
.PHONY: init lint check_lint format check_format test html cleandocs run_notebooks uml
2+
3+
PACKAGE_DIR = pymc_marketing
24

35
init:
46
python3 -m pip install -e .
57

68
lint:
79
pip install .[lint]
8-
ruff . --fix
10+
ruff check $(PACKAGE_DIR) --fix
911
mypy .
1012

1113
check_lint:
1214
pip install .[lint]
13-
ruff .
15+
ruff check $(PACKAGE_DIR)
1416
mypy .
1517

18+
format:
19+
pip install .[lint]
20+
ruff format $(PACKAGE_DIR)
21+
22+
check_format:
23+
pip install .[lint]
24+
ruff format --check $(PACKAGE_DIR)
25+
1626
test:
1727
pip install .[test]
1828
pytest

0 commit comments

Comments
 (0)