Skip to content
Snippets Groups Projects
Commit d34d58fc authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Merge branch 'nbparameterise-public' into 'master'

Use publicly released nbparameterise

See merge request detectors/pycalibration!480
parents e62c3dbe 6321e822
No related branches found
No related tags found
1 merge request!480Use publicly released nbparameterise
...@@ -74,7 +74,6 @@ setup( ...@@ -74,7 +74,6 @@ setup(
ext_modules=cythonize(ext_modules), ext_modules=cythonize(ext_modules),
install_requires=[ install_requires=[
"iCalibrationDB @ git+ssh://git@git.xfel.eu:10022/detectors/cal_db_interactive.git@2.0.5", # noqa "iCalibrationDB @ git+ssh://git@git.xfel.eu:10022/detectors/cal_db_interactive.git@2.0.5", # noqa
"nbparameterise @ git+ssh://git@git.xfel.eu:10022/detectors/nbparameterise.git@0.3", # noqa
"XFELDetectorAnalysis @ git+ssh://git@git.xfel.eu:10022/karaboDevices/pyDetLib.git@2.5.6-2.10.0#subdirectory=lib", # noqa "XFELDetectorAnalysis @ git+ssh://git@git.xfel.eu:10022/karaboDevices/pyDetLib.git@2.5.6-2.10.0#subdirectory=lib", # noqa
"Cython==0.29.21", "Cython==0.29.21",
"Jinja2==2.11.2", "Jinja2==2.11.2",
...@@ -101,6 +100,7 @@ setup( ...@@ -101,6 +100,7 @@ setup(
"nbclient==0.5.1", "nbclient==0.5.1",
"nbconvert==5.6.1", "nbconvert==5.6.1",
"nbformat==5.0.7", "nbformat==5.0.7",
"nbparameterise==0.5",
"notebook==6.1.5", "notebook==6.1.5",
"numpy==1.19.1", "numpy==1.19.1",
"prettytable==0.7.2", "prettytable==0.7.2",
......
...@@ -407,7 +407,7 @@ def add_args_from_nb(nb, parser, cvar=None, no_required=False): ...@@ -407,7 +407,7 @@ def add_args_from_nb(nb, parser, cvar=None, no_required=False):
:param bool no_required: If True, none of the added options are required. :param bool no_required: If True, none of the added options are required.
""" """
parser.description = make_epilog(nb) parser.description = make_epilog(nb)
parms = extract_parameters(nb, lang='python3') parms = extract_parameters(nb, lang='python')
for p in parms: for p in parms:
...@@ -676,7 +676,7 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None, ...@@ -676,7 +676,7 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None,
suffix = flatten_list(cval) suffix = flatten_list(cval)
# first convert the notebook # first convert the notebook
parms = extract_parameters(nb, lang='python3') parms = extract_parameters(nb, lang='python')
if has_parm(parms, "cluster_profile"): if has_parm(parms, "cluster_profile"):
cluster_profile = f"{args['cluster_profile']}_{suffix}" cluster_profile = f"{args['cluster_profile']}_{suffix}"
...@@ -686,7 +686,7 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None, ...@@ -686,7 +686,7 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None,
params = parameter_values(parms, **args) params = parameter_values(parms, **args)
params = parameter_values(params, cluster_profile=cluster_profile) params = parameter_values(params, cluster_profile=cluster_profile)
new_nb = replace_definitions(nb, params, execute=False, lang='python3') new_nb = replace_definitions(nb, params, execute=False, lang='python')
if not show_title: if not show_title:
first_markdown_cell(new_nb).source = '' first_markdown_cell(new_nb).source = ''
set_figure_format(new_nb, args["vector_figs"]) set_figure_format(new_nb, args["vector_figs"])
...@@ -843,7 +843,7 @@ def run(): ...@@ -843,7 +843,7 @@ def run():
if ext_func is not None: if ext_func is not None:
extend_params(nb, ext_func) extend_params(nb, ext_func)
parms = extract_parameters(nb, lang='python3') parms = extract_parameters(nb, lang='python')
title, author, version = extract_title_author_version(nb) title, author, version = extract_title_author_version(nb)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment