Skip to content

Commit 6bea275

Browse files
committed
🚧 add makefile to document local build on mac
- Makefile also has environment packages listed which could be added (be aware to use package folder name, not PyPI name, e.g. PIL and not pillow) - should work with local python environment with jupyter installed - switched to windowed build
1 parent 550c78a commit 6bea275

File tree

3 files changed

+257
-2
lines changed

3 files changed

+257
-2
lines changed

.github/workflows/cdci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ jobs:
157157
- name: Build executable
158158
run: |
159159
cd gui
160-
pyinstaller -n vuegen_gui -D --collect-all pyvis --collect-all streamlit --collect-all st_aggrid --collect-all customtkinter --collect-all quarto_cli --collect-all plotly --collect-all _plotly_utils --collect-all pyvis --collect-all pandas --collect-all numpy --collect-all matplotlib --collect-all openpyxl --collect-all xlrd --collect-all nbformat --collect-all nbclient --collect-all altair --collect-all itables --collect-all kaleido --collect-all pyarrow --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook app.py
160+
pyinstaller -n vuegen_gui -D -w --collect-all pyvis --collect-all streamlit --collect-all st_aggrid --collect-all customtkinter --collect-all quarto_cli --collect-all plotly --collect-all _plotly_utils --collect-all traitlets --collect-all referencing --collect-all rpds --collect-all tenacity --collect-all pyvis --collect-all pandas --collect-all numpy --collect-all matplotlib --collect-all openpyxl --collect-all xlrd --collect-all nbformat --collect-all nbclient --collect-all altair --collect-all itables --collect-all kaleido --collect-all pyarrow --collect-all dataframe_image --collect-all narwhals --collect-all PIL --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook app.py
161161
# -w -F
162-
# --collect-all vl_convert --collect-all yaml --collect-all dataframe_image --collect-all strenum --collect-all jinja2 --collect-all fastjsonschema --collect-all jsonschema --collect-all jsonschema_specifications --collect-all traitlets --collect-all referencing --collect-all rpds --collect-all tenacity
162+
# --collect-all vl_convert --collect-all yaml --collect-all strenum --collect-all jinja2 --collect-all fastjsonschema --collect-all jsonschema --collect-all jsonschema_specifications
163163
# replace by spec file once done...
164164
- name: Upload executable
165165
uses: actions/upload-artifact@v4

gui/Makefile

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
clean:
2+
rm -r dist build lib vuegen.spec quarto_report streamlit_report
3+
4+
clean-all: clean
5+
rm -r logs
6+
7+
bundle:
8+
pip install -e ../.
9+
pyinstaller \
10+
-n vuegen_gui \
11+
--noconfirm \
12+
--onedir \
13+
--windowed \
14+
--collect-all streamlit \
15+
--collect-all st_aggrid \
16+
--collect-all customtkinter \
17+
--collect-all quarto_cli \
18+
--collect-all plotly \
19+
--collect-all _plotly_utils \
20+
--collect-all pyvis \
21+
--collect-all pandas \
22+
--collect-all numpy \
23+
--collect-all matplotlib \
24+
--collect-all openpyxl \
25+
--collect-all xlrd \
26+
--collect-all nbformat \
27+
--collect-all nbclient \
28+
--collect-all altair \
29+
--collect-all itables \
30+
--collect-all kaleido \
31+
--collect-all pyarrow \
32+
--collect-all dataframe_image \
33+
--collect-all narwhals \
34+
--collect-all PIL \
35+
--collect-all traitlets \
36+
--collect-all referencing \
37+
--collect-all rpds \
38+
--collect-all tenacity \
39+
--add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook \
40+
app.py
41+
42+
43+
# jupyter kernel specific:
44+
# --collect-all vl_convert \
45+
# --collect-all yaml \
46+
# --collect-all strenum \
47+
# --collect-all jinja2 \
48+
# --collect-all fastjsonschema \
49+
# --collect-all jsonschema \
50+
# --collect-all jsonschema_specifications \
51+
# --collect-all nbclient \
52+
# --collect-all nbformat \
53+
54+
# beautifulsoup4, bleach, defusedxml, importlib-metadata, jinja2, jupyter-core, jupyterlab-pygments, markupsafe, mistune, nbclient, nbformat, packaging, pandocfilters, pygments, traitlets
55+
# remaining packages in full environment:
56+
# --collect-all jupyterlab \
57+
# --collect-all jupyter_core \
58+
# --collect-all yaml \
59+
# --collect-all ipykernel \
60+
# --collect-all nbconvert \
61+
# --collect-all notebook \
62+
# --collect-all ipywidgets \
63+
# --collect-all jupyter_console \
64+
# --collect-all jupyter_client \
65+
# --collect-all webencodings \
66+
# --collect-all wcwidth \
67+
# --collect-all pytz \
68+
# --collect-all python-decouple\
69+
# --collect-all pure-eval \
70+
# --collect-all ptyprocess \
71+
# --collect-all kaleido \
72+
# --collect-all fastjsonschema\
73+
# --collect-all xlrd \
74+
# --collect-all widgetsnbextension\
75+
# --collect-all wheel \
76+
# --collect-all websocket-client\
77+
# --collect-all webcolors \
78+
# --collect-all vl-convert-python\
79+
# --collect-all urllib3 \
80+
# --collect-all uri-template \
81+
# --collect-all tzdata \
82+
# --collect-all typing-extensions\
83+
# --collect-all types-python-dateutil \
84+
# --collect-all traitlets \
85+
# --collect-all tornado \
86+
# --collect-all toml \
87+
# --collect-all tinycss2 \
88+
89+
# --collect-all soupsieve \
90+
# --collect-all sniffio \
91+
# --collect-all smmap \
92+
# --collect-all six \
93+
# --collect-all setuptools \
94+
# --collect-all send2trash \
95+
# --collect-all rpds-py \
96+
# --collect-all rfc3986-validator\
97+
# --collect-all pyzmq \
98+
# --collect-all pyyaml \
99+
# --collect-all python-json-logger\
100+
# --collect-all pyparsing \
101+
# --collect-all pygments \
102+
# --collect-all pycparser \
103+
# --collect-all pyarrow \
104+
# --collect-all psutil \
105+
# --collect-all protobuf \
106+
# --collect-all propcache \
107+
# --collect-all prompt_toolkit\
108+
# --collect-all prometheus-client \
109+
# --collect-all platformdirs \
110+
# --collect-all pillow \ # PIL
111+
# --collect-all pexpect \
112+
# --collect-all parso \
113+
# --collect-all pandocfilters\
114+
# --collect-all packaging \
115+
# --collect-all overrides \
116+
# --collect-all numpy \
117+
# --collect-all networkx \
118+
# --collect-all nest-asyncio \
119+
# --collect-all multidict \
120+
# --collect-all more-itertools\
121+
# --collect-all mistune \
122+
# --collect-all mdurl \
123+
# --collect-all MarkupSafe \
124+
# --collect-all lxml \
125+
# --collect-all kiwisolver \
126+
# --collect-all jupyterlab_widgets\
127+
# --collect-all jupyterlab_pygments \
128+
# --collect-all jsonpointer \
129+
# --collect-all jsonpickle \
130+
# --collect-all json5 \
131+
# --collect-all idna \
132+
# --collect-all h11\
133+
# --collect-all greenlet \
134+
# --collect-all frozenlist \
135+
# --collect-all fqdn \
136+
# --collect-all fonttools \
137+
# --collect-all executing \
138+
# --collect-all et-xmlfile \
139+
# --collect-all defusedxml \
140+
# --collect-all decorator \
141+
# --collect-all debugpy \
142+
# --collect-all cycler \
143+
# --collect-all cssselect \
144+
# --collect-all click \
145+
# --collect-all charset-normalizer\
146+
# --collect-all certifi \
147+
# --collect-all cachetools \
148+
# --collect-all blinker \
149+
# --collect-all bleach \
150+
# --collect-all babel \
151+
# --collect-all attrs \
152+
# --collect-all async-lru \
153+
# --collect-all asttokens \
154+
# --collect-all appnope \
155+
# --collect-all aiohappyeyeballs\
156+
# --collect-all yarl \
157+
# --collect-all terminado \
158+
# --collect-all stack_data \
159+
# --collect-all rfc3339-validator\
160+
# --collect-all requests \
161+
# --collect-all referencing\
162+
# --collect-all python-dateutil \
163+
# --collect-all pyee \
164+
# --collect-all plotly \
165+
# --collect-all openpyxl \
166+
# --collect-all matplotlib-inline\
167+
# --collect-all markdown-it-py \
168+
# --collect-all jupyter-core \
169+
# --collect-all jinja2 \
170+
# --collect-all jedi \
171+
# --collect-all ipython-pygments-lexers\
172+
# --collect-all httpcore \
173+
# --collect-all gitdb \
174+
# --collect-all cssutils \
175+
# --collect-all contourpy \
176+
# --collect-all comm \
177+
# --collect-all cffi \
178+
# --collect-all beautifulsoup4\
179+
# --collect-all anyio \
180+
# --collect-all aiosignal \
181+
# --collect-all rich \
182+
# --collect-all pydeck \
183+
# --collect-all playwright \
184+
# --collect-all pandas \
185+
# --collect-all matplotlib \
186+
# --collect-all jupyter-server-terminals\
187+
# --collect-all jupyter-client \
188+
# --collect-all jsonschema-specifications \
189+
# --collect-all ipython \
190+
# --collect-all httpx \
191+
# --collect-all gitpython \
192+
# --collect-all arrow \
193+
# --collect-all argon2-cffi-bindings\
194+
# --collect-all aiohttp \
195+
# --collect-all pyvis \
196+
# --collect-all jsonschema \
197+
# --collect-all isoduration\
198+
# --collect-all ipywidgets \
199+
# --collect-all ipykernel \
200+
# --collect-all argon2-cffi\
201+
# --collect-all nbformat \
202+
# --collect-all jupyter-console\
203+
# --collect-all altair \
204+
# --collect-all streamlit \
205+
# --collect-all nbclient \
206+
# --collect-all jupyter-events\
207+
# --collect-all streamlit-aggrid \
208+
# --collect-all nbconvert \
209+
# --collect-all jupyter-server\
210+
# --collect-all dataframe-image \
211+
# --collect-all notebook-shim \
212+
# --collect-all jupyterlab-server \
213+
# --collect-all jupyter-lsp \
214+
# --collect-all jupyterlab \
215+
# --collect-all notebook \
216+
# --collect-all jupyter \
217+
# --collect-all vuegen
218+

gui/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,40 @@ Windows and macOS specific options:
6767
6868
## test shipping a python virtual environment with vuegen installed
6969
70+
## Bundled PyInstaller execution (current status)
71+
72+
1. Can be executed. Streamlit apps can be run (although sometimes not easily terminated)
73+
2. All quarto based reports need to specify a path to a python environment where python 3.12
74+
is installed along `jupyter`
75+
- This could be partly replace by a full anaconda distribution on the system.
76+
- maybe a self-contained minimal virtual environment for kernel starting can be added later
77+
- we could add some logic to make sure a correct path is added.
78+
79+
### Create environment using conda
80+
81+
```bash
82+
conda create -n vuegen_gui -c conda-forge python=3.12 jupyter
83+
conda info -e # find environment location
84+
```
85+
86+
This might for example display the following path for the `vuegen_gui` environment:
87+
88+
```
89+
/Users/user/miniforge3/envs/vuegen_gui
90+
```
91+
92+
In the app, set the python environment path to this location, but to the `bin` folder, e.g.
93+
94+
```bash
95+
/Users/user/miniforge3/envs/vuegen_gui/bin
96+
```
97+
98+
### virtualenv
99+
100+
- tbc
101+
102+
[virutalenv documentation](https://docs.python.org/3/library/venv.html)
103+
104+
```bash
105+
python -m venv .venv --copies --clear --prompt vuegenvenv
106+
```

0 commit comments

Comments
 (0)