@@ -810,6 +810,8 @@ def test_is_not_executable(self):
810
810
cur_dir = os .path .dirname (__file__ )
811
811
bqplot_dir = os .path .join (cur_dir , "./testdata/voila/bqplot/" )
812
812
bqplot_ipynb = os .path .join (bqplot_dir , "bqplot.ipynb" )
813
+ dashboard_dir = os .path .join (cur_dir , "./testdata/voila/dashboard/" )
814
+ dashboard_ipynb = os .path .join (dashboard_dir , "dashboard.ipynb" )
813
815
multivoila_dir = os .path .join (cur_dir , "./testdata/voila/multi-voila/" )
814
816
815
817
@@ -863,7 +865,7 @@ def test_guess_deploy_dir(self):
863
865
),
864
866
],
865
867
)
866
- def test_create_voila_manifest (path , entrypoint ):
868
+ def test_create_voila_manifest_1 (path , entrypoint ):
867
869
environment = Environment (
868
870
conda = None ,
869
871
contents = "bqplot\n " ,
@@ -921,6 +923,58 @@ def test_create_voila_manifest(path, entrypoint):
921
923
assert ans == json .loads (manifest .flattened_copy .json )
922
924
923
925
926
+ @pytest .mark .parametrize (
927
+ (
928
+ "path" ,
929
+ "entrypoint" ,
930
+ ),
931
+ [
932
+ (
933
+ dashboard_dir ,
934
+ dashboard_ipynb ,
935
+ ),
936
+ ],
937
+ )
938
+ def test_create_voila_manifest_2 (path , entrypoint ):
939
+ environment = Environment (
940
+ conda = None ,
941
+ contents = "numpy\n ipywidgets\n bqplot\n " ,
942
+ error = None ,
943
+ filename = "requirements.txt" ,
944
+ locale = "en_US.UTF-8" ,
945
+ package_manager = "pip" ,
946
+ pip = "23.0" ,
947
+ python = "3.8.12" ,
948
+ source = "file" ,
949
+ )
950
+ ans = {
951
+ "version" : 1 ,
952
+ "locale" : "en_US.UTF-8" ,
953
+ "metadata" : {"appmode" : "jupyter-voila" , "entrypoint" : "dashboard.ipynb" },
954
+ "python" : {
955
+ "version" : "3.8.12" ,
956
+ "package_manager" : {"name" : "pip" , "version" : "23.0" , "package_file" : "requirements.txt" },
957
+ },
958
+ "files" : {
959
+ "requirements.txt" : {"checksum" : "d51994456975ff487749acc247ae6d63" },
960
+ "bqplot.ipynb" : {"checksum" : "79f8622228eded646a3038848de5ffd9" },
961
+ "dashboard.ipynb" : {"checksum" : "6b42a0730d61e5344a3e734f5bbeec25" },
962
+ },
963
+ }
964
+ manifest = create_voila_manifest (
965
+ path ,
966
+ entrypoint ,
967
+ environment ,
968
+ app_mode = AppModes .JUPYTER_VOILA ,
969
+ extra_files = None ,
970
+ excludes = None ,
971
+ force_generate = True ,
972
+ image = None ,
973
+ multi_notebook = False ,
974
+ )
975
+ assert ans == json .loads (manifest .flattened_copy .json )
976
+
977
+
924
978
@pytest .mark .parametrize (
925
979
(
926
980
"path" ,
0 commit comments