brash-student-40401
10/17/2022, 8:18 PMbrash-student-40401
10/17/2022, 8:24 PMBUILD
that looks like:
python_sources()
python_requirement(
name="app_analytics",
requirements=["analytics-python~=1.4.0"],
)
python_test_utils(
name="test_utils",
)
pex_binary(
name="app_bin",
entry_point="__init__.py",
dependencies=["src/services/app/app:app_analytics"]
)
pex_binary(
name="app_voila_bin",
entry_point="_voila.py",
dependencies=["src/services/app/app:app_bin"]
)
and _voila.py
is simply
from <http://voila.app|voila.app> import Voila
import sys
config = {}
if __name__ == "__main__":
Voila.launch_instance(argv=sys.argv)
I try to run the app_voila_bin
goal as so ./pants run src/services/app/app:app_voila_bin -- --option1 --option2 ... src/services/app/notebooks/app.ipynb --optionN
, which is how I would sort the options when I run Voila through Poetry. But this throws _voila.py: error: unrecognized arguments: src/services/app/notebooks/app.ipynb
.
If I try to put the Notebook path first, I instead get ValueError: provided more than 1 argument: ['/home/vscode/.pex/unzipped_pexes/d5f6d5a9fbc653c7cb5a6dd3e16771e175d24b82/app/_voila.py', 'src/services/app/notebooks/app.ipynb']
brash-student-40401
10/17/2022, 8:25 PMhappy-kitchen-89482
10/17/2022, 9:32 PMpex_binary
depending on another pex_binary
, and I’m not sure that will work (or what is expected to happen)?brash-student-40401
10/18/2022, 2:10 PMbrash-student-40401
10/18/2022, 2:18 PMpython_source
(no reason to binary it) seems to be doing maybe what I expect sort of!