diff --git a/Makefile b/Makefile index 3635ad16..fea152c1 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ all-debug: ## compile all outputs, falling to debugger on failure poetry run doit run --pdb doit-list: ## list all the doit tasks - poetry run doit list + poetry run doit list --all $(DEV_CONFIG_ABSOLUTE_YAML): $(DEV_CONFIG_YAML) scripts/create-dev-config-absolute.py poetry run python scripts/create-dev-config-absolute.py diff --git a/src/local/notebook_steps/figures.py b/src/local/notebook_steps/figures.py index 6cbd70c7..384ed9e8 100644 --- a/src/local/notebook_steps/figures.py +++ b/src/local/notebook_steps/figures.py @@ -62,6 +62,16 @@ def get_figures_notebook_steps( ) notebook_output_dir.mkdir(exist_ok=True, parents=True) + # TODO: refactor this + notebook_base_tasks = [ + { + "basename": nb.summary, + "name": None, + "doc": nb.doc, + } + for nb in figures_notebooks + ] + steps = [ NotebookStep.from_unconfigured_notebook( unconfigured=nb, @@ -72,4 +82,4 @@ def get_figures_notebook_steps( for nb in figures_notebooks ] - return steps + return notebook_base_tasks, steps diff --git a/src/local/pydoit_nb/notebook_step.py b/src/local/pydoit_nb/notebook_step.py index af93fb88..1e565e40 100644 --- a/src/local/pydoit_nb/notebook_step.py +++ b/src/local/pydoit_nb/notebook_step.py @@ -141,7 +141,7 @@ def to_doit_task( task = dict( basename=self.summary_notebook, name=self.branch_config_id, - doc=f"{self.doc_notebook} for config {self.branch_config_id}", + doc=f"{self.doc_notebook}. branch_config_id={self.branch_config_id!r}", actions=[ ( run_notebook, diff --git a/src/local/pydoit_nb/tasks_notebooks.py b/src/local/pydoit_nb/tasks_notebooks.py index e9cff512..057b1b90 100644 --- a/src/local/pydoit_nb/tasks_notebooks.py +++ b/src/local/pydoit_nb/tasks_notebooks.py @@ -31,5 +31,13 @@ def get_notebook_branch_tasks( # noqa: PLR0913 root_dir_raw_notebooks=root_dir_raw_notebooks, ) + # TODO: refactor this + if isinstance(steps, tuple): + base_tasks = steps[0] + steps = steps[1] + + for bt in base_tasks: + yield bt + for step in steps: yield step.to_doit_task(converter=converter, clean=clean)