Skip to content

Commit

Permalink
Fixing ruff commands in Makefile #825 (#859)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
2 people authored and twiecki committed Sep 10, 2024
1 parent 054055d commit 242fffc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
13 changes: 9 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,24 +128,29 @@ We recommend that your contribution complies with the following guidelines befor
```bash
make check_lint
```
If you want to fix linting errors automatically, run
- If you want to fix linting errors automatically, run
```bash
make lint
```
1. To run tests:
- To run tests:
```bash
make test
```
6. To check code style:
- To check code style:
```bash
make check_lint
make check_format
```
- To fix code style automatically:
```bash
make format
```
## Overview of the MMM codebase
Expand Down
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
.PHONY: init lint check_lint test html cleandocs run_notebooks
.PHONY: init lint check_lint format check_format test html cleandocs run_notebooks uml

PACKAGE_DIR = pymc_marketing

init:
python3 -m pip install -e .

lint:
pip install .[lint]
ruff . --fix
ruff check $(PACKAGE_DIR) --fix
mypy .

check_lint:
pip install .[lint]
ruff .
ruff check $(PACKAGE_DIR)
mypy .

format:
pip install .[lint]
ruff format $(PACKAGE_DIR)

check_format:
pip install .[lint]
ruff format --check $(PACKAGE_DIR)

test:
pip install .[test]
pytest
Expand Down

0 comments on commit 242fffc

Please sign in to comment.