Skip to content

Commit

Permalink
Get dev run going
Browse files Browse the repository at this point in the history
  • Loading branch information
znichollscr committed Nov 6, 2023
1 parent 9a34333 commit 969d1c9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
.DEFAULT_GOAL := help

DEV_CONFIG_YAML=dev-config.yaml
DEV_CONFIG_ABSOLUTE_YAML=dev-config-absolute.yaml
DEV_RUN_ID="dev-test-run"
FINAL_DOIT_TASK="figures - Plot draws against each other"

# A helper script to get short descriptions of each target in the Makefile
define PRINT_HELP_PYSCRIPT
import re, sys
Expand All @@ -22,14 +27,17 @@ all: ## compile all outputs
poetry run doit run --verbosity=2

all-dev: ## compile all outputs using the dev run-id
poetry run doit run --run-id "dev-test"
poetry run doit generate_workflow_tasks --configuration-file $(DEV_CONFIG_YAML) --run-id $(DEV_RUN_ID) $(FINAL_DOIT_TASK)

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

$(DEV_CONFIG_ABSOLUTE_YAML): $(DEV_CONFIG_YAML) scripts/create-dev-config-absolute.py
poetry run python scripts/create-dev-config-absolute.py

.PHONY: checks
checks: ## run all the linting checks of the codebase
@echo "=== pre-commit ==="; poetry run pre-commit run --all-files || echo "--- pre-commit failed ---" >&2; \
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-dev-config-absolute.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
DEV_FILE: Path = Path("dev-config.yaml")
DEV_ABSOLUTE_FILE: Path = Path("dev-config-absolute.yaml")
ROOT_OUTPUT_DIR: Path = Path(__file__).parent.parent.absolute() / "output-bundles"
RUN_ID: str = "dev-run"
RUN_ID: str = "dev-test-run"

with open(DEV_FILE) as fh:
config_relative = converter_yaml.loads(fh.read(), Config)
Expand Down
4 changes: 2 additions & 2 deletions src/local/notebook_steps/figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_figures_notebook_steps(
raw_notebook_ext=".py",
summary="figures - Create clean table to plot from",
doc="Create a clean data table from which to plot",
configuration=None,
configuration=(),
dependencies=tuple(
[c.draw_file for c in config_covariance]
+ [c.draw_file for c in config_constraint]
Expand All @@ -45,7 +45,7 @@ def get_figures_notebook_steps(
raw_notebook_ext=".py",
summary="figures - Plot draws against each other",
doc="Create a figure showing the different samples",
configuration=None,
configuration=(),
dependencies=(config_branch.draw_comparison_table,),
targets=(config_branch.draw_comparison_figure,),
config_file=config_bundle.config_hydrated_path,
Expand Down

0 comments on commit 969d1c9

Please sign in to comment.