-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
40 lines (34 loc) · 911 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
SHELL = /bin/bash
.PHONY: help
help:
@echo "Commands:"
@echo "style : executes style formatting."
@echo "clean : cleans all unnecessary files."
@echo "test : runs all non training tests"
# @echo "conda_env : creates a conda environment."
# Styling
# Execute even if a file called style exists
.PHONY: style
style:
black .
flake8
python3 -m isort .
# # Environment possibilities
# conda_env:
# conda create -n make_ocean python=3.9.11
# conda activate make_ocean && \
# python -m pip install -e . ".[dev]" && \
# pre-commit install && \
# pre-commit autoupdate
# Cleaning
.PHONY: clean
clean: #style
find . -type f -name "*.DS_Store" -ls -delete
find . | grep -E "(__pycache__|\.pyc|\.pyo)" | xargs rm -rf
find . | grep -E ".pytest_cache" | xargs rm -rf
find . | grep -E ".ipynb_checkpoints" | xargs rm -rf
rm -f .coverage
# Test code
.PHONY: test
test:
pytest -m "not training"