forked from latent-to/bittensor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (29 loc) · 1.15 KB
/
Makefile
File metadata and controls
38 lines (29 loc) · 1.15 KB
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
SHELL := /bin/bash
.PHONY: init-venv clean-venv clean install install-dev reinstall reinstall-dev ruff check
init-venv:
python3 -m venv venv && source ./venv/bin/activate
clean-venv:
source ./venv/bin/activate && \
pip freeze > make_venv_to_uninstall.txt && \
pip uninstall -r make_venv_to_uninstall.txt -y && \
rm make_venv_to_uninstall.txt
clean:
@rm -rf dist/ build/ bittensor.egg-info/ .pytest_cache/ lib/ .mypy_cache .ruff_cache \
$(shell find . -type d \( -name ".hypothesis" -o -name "__pycache__" \))
install: init-venv
source ./venv/bin/activate && \
python3 -m pip install .
install-dev: init-venv
source ./venv/bin/activate && \
python3 -m pip install -e '.[dev]'
reinstall: clean clean-venv install
reinstall-dev: clean clean-venv install-dev
ruff:
@python -m ruff format .
check: ruff
@mypy --ignore-missing-imports bittensor/ --python-version=3.10
@mypy --ignore-missing-imports bittensor/ --python-version=3.11
@mypy --ignore-missing-imports bittensor/ --python-version=3.12
@mypy --ignore-missing-imports bittensor/ --python-version=3.13
@mypy --ignore-missing-imports bittensor/ --python-version=3.14
@flake8 bittensor/ --count