-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 1.12 KB
/
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
41
42
43
44
45
46
47
# Define the Python interpreter
PYTHON=python3
.PHONY: install test clean lint check format dist run
# Install dependencies
install:
$(PYTHON) -m pip install -r requirements.txt
# Run tests
test:
$(PYTHON) -m unittest discover -s tests
# Clean up build artifacts
clean:
rm -rf __pycache__
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
# Lint code
lint:
flake8 src/
# Run all checks (linting, testing)
check:
lint test
# Use black to format code
format:
black .
# Create a distribution package
dist:
$(PYTHON) setup.py sdist bdist_wheel
# Run the application
run:
$(PYTHON) src/main.py
run-localnet:
@printf "$(CYAN)*** Starting $(BLUE)sapphire-localnet$(CYAN)...$(OFF)\n"
@-docker run -it -p8545:8545 -p8546:8546 $(DOCKER_PLATFORM) ghcr.io/oasisprotocol/sapphire-localnet -test-mnemonic
run-localnet-debug:
@printf "$(CYAN)*** Starting $(BLUE)sapphire-localnet$(CYAN) in $(MAGENTA)DEBUG$(CYAN) mode...$(OFF)\n"
@-docker run -it -p8545:8545 -p8546:8546 $(DOCKER_PLATFORM) -e OASIS_NODE_LOG_LEVEL=debug -e LOG__LEVEL=debug ghcr.io/oasisprotocol/sapphire-localnet -test-mnemonic