-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
82 lines (63 loc) · 1.96 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Makefile
define HELP_MESSAGE
teleop
# Installing
1. Create a new Conda environment: `conda create -y -n teleop python=3.11`
2. Activate the environment: `conda activate teleop`
3. Install the package: `make install-dev`
# Running Tests
1. Run autoformatting: `make format`
2. Run static checks: `make static-checks`
endef
export HELP_MESSAGE
all:
@echo "$$HELP_MESSAGE"
.PHONY: all
# ------------------------ #
# Train #
# ------------------------ #
demo:
@python -m
# ------------------------ #
# Build #
# ------------------------ #
install: install-dependencies
@pip install --verbose -e .
.PHONY: install
h5py:
@echo "Cloning and installing h5py"
sudo apt-get update
sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
sudo apt-get install python3-pip
sudo pip3 install -U pip testresources setuptools
sudo ln -s /usr/include/locale.h /usr/include/xlocale.h
pip3 install Cython==0.29.36
pip3 install pkgconfig
git clone https://github.com/h5py/h5py.git
git checkout 3.1.0
git cherry-pick 3bf862daa4ebeb2eeaf3a0491e05f5415c1818e4
H5PY_SETUP_REQUIRES=0 pip3 install . --no-deps --no-build-isolation
cd h5py && source dev-install.sh
.PHONY: h5py
install-dependencies:
@git submodule update --init --recursive
@cd firmware/ && pip install --verbose -e .
build-ext:
@python setup.py build_ext --inplace
.PHONY: build-ext
clean:
rm -rf build dist *.so **/*.so **/*.pyi **/*.pyc **/*.pyd **/*.pyo **/__pycache__ *.egg-info .eggs/ .ruff_cache/
.PHONY: clean
# ------------------------ #
# Static Checks #
# ------------------------ #
format:
@isort --profile black demo.py data_collection
@black demo.py data_collection
@ruff format demo.py data_collection
.PHONY: format
static-checks:
@isort --profile black --check --diff demo.py data_collection
@black --diff --check demo.py data_collection
@ruff check demo.py data_collection
.PHONY: lint