/
Makefile
164 lines (118 loc) · 2.99 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
help:
@echo 'make install: Install package, hook, notebooks and gdslib'
@echo 'make test: Run tests with pytest'
@echo 'make test-force: Rebuilds regression test'
install: gdslib
bash install.sh
mamba:
mamba install pymeep=*=mpi_mpich_* gdspy -y
patch:
bumpversion patch
python docs/write_components_doc.py
minor:
bumpversion minor
python docs/write_components_doc.py
major:
bumpversion major
python docs/write_components_doc.py
plugins:
pip install -r requirements_sipann.txt
pip install sax jax jaxlib
mamba install pymeep=*=mpi_mpich_* -y
mamba install numpy==1.22 -y
meep:
mamba install pymeep=*=mpi_mpich_* -y
sax:
pip install sax jax jaxlib
update:
pur
pur -r requirements_dev.txt
publish:
anaconda upload environment.yml
update-pre:
pre-commit autoupdate --bleeding-edge
gds:
python gdsfactory/components/straight.py
gdslib:
git clone https://github.com/gdsfactory/gdslib.git -b data
test:
flake8
pytest -s
test-force:
echo 'Regenerating component metadata for regression test. Make sure there are not any unwanted regressions because this will overwrite them'
rm -rf gdslib/gds/gds_ref
rm -rf gdsfactory/samples/pdk/test_fab_c.gds
pytest --force-regen
test-meep:
pytest gdsfactory/simulation/gmeep
test-tidy3d:
pytest gdsfactory/simulation/gtidy3d
test-plugins:
pytest gdsfactory/simulation/gmeep gdsfactory/simulation/modes gdsfactory/simulation/lumerical gdsfactory/simulation/simphony gdsfactory/simulation/gtidy3d
test-notebooks:
py.test --nbval notebooks
diff:
python gdsfactory/merge_cells.py
cov:
pytest --cov=gdsfactory
venv:
python3 -m venv env
pipenv:
pip install pipenv --user
pipenv install
pyenv3:
pyenv shell 3.7.2
virtualenv venv
source venv/bin/activate
python -V # Print out python version for debugging
which python # Print out which python for debugging
python setup.py develop
docker-debug:
docker run -it joamatab/gdsfactory sh
docker-build:
docker build -t joamatab/gdsfactory .
docker-run:
docker run \
-p 8888:8888 \
-p 8082:8082 \
-e JUPYTER_ENABLE_LAB=yes \
joamatab/gdsfactory:latest
conda:
conda env create -f environment.yml
echo 'conda env installed, run `conda activate gdsfactory` to activate it'
mypy:
mypy gdsfactory --ignore-missing-imports
build:
python setup.py sdist bdist_wheel
upload-devpi:
pip install devpi-client wheel
devpi upload --format=bdist_wheel,sdist.tgz
upload-twine: build
pip install twine
twine upload dist/*
release:
git push
git push origin --tags
lint:
tox -e flake8
pylint:
pylint --rcfile .pylintrc gdsfactory/
lintdocs:
flake8 --select RST
pydocstyle:
pydocstyle gdsfactory
doc8:
doc8 docs/
autopep8:
autopep8 --in-place --aggressive --aggressive **/*.py
codestyle:
pycodestyle --max-line-length=88
doc:
python docs/write_components_doc.py
git-rm-merged:
git branch -D `git branch --merged | grep -v \* | xargs`
link:
lygadgets_link gdsfactory/klayout
spell:
codespell -i 3 -w -L TE,TE/TM,te,ba,FPR,fpr_spacing
.PHONY: gdsdiff build conda