ProjectFlow: default tasks_to_skip to None; retire the _old_spec archive - #35
Closed
jandrewjohnson wants to merge 37 commits into
Closed
ProjectFlow: default tasks_to_skip to None; retire the _old_spec archive#35jandrewjohnson wants to merge 37 commits into
jandrewjohnson wants to merge 37 commits into
Conversation
Feature/test infra
feat: add release process documentation for Hazelbean, detailing auto…
Feat/removing emojis
fixed internet availability check
…ct_features_in_shapefile_by_attribute
…s (vector.py) General-purpose deck mechanics (add_slide_header/bullets/figure/caption/box) and an Overpass QL transport (read_overpass), parameterized with no project-specific content. python-pptx and requests are existing hazelbean deps, imported lazily inside the functions.
env1 runs pandas 3.0.1 (future.infer_string=True), so df[col].values yields Arrow-backed string arrays that break GEMPACK/harpy HAR I/O and other code passing .values into numpy-expecting APIs. Set future.infer_string=False at import, guarded to no-op on older pandas. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lpers Add generic pptx slide primitives and read_overpass
Per-machine, never-committed settings (e.g. gtappy's solve-backend connection vars GTAP_VM_SSH_HOST / GTAP_GEMPACK_DIR) previously had to live in shell rc files — shell/OS-specific and invisible to IDE debug runs. hazelbean now loads KEY=value lines from ~/.config/hazelbean/machine.env at import, filling gaps in os.environ (setdefault semantics — a real env var always wins; missing file is a no-op). The parser tolerates 'export ' prefixes, quotes, and inline comments, so gtappy's modality_env.example.sh works verbatim as the file format and the same file can still be sourced from a shell. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add per-machine env loader (~/.config/hazelbean/machine.env)
…rsion Refactor code structure for improved readability and maintainability
…re get_path - assign_to_object: the unified value grammar now resolves paths by NAME (columns/keys ending in _path) instead of by value heuristic, which wrongly get_path'd ssh targets (user@192.168.64.2 — trailing .2 matched the extension regex), backend-machine paths (C:\GP), and free text (Expansion/Loss). Blank/'skip' pass through, 'nan' -> None, cat-ears keep leave_ref_path_if_fail=True. The value heuristic survives as public looks_like_path for value-conditional columns (aoi, calibration_parameters_source), resolved at their consumers in seals. - project_flow: bare ProjectFlow() derives its default project dir git-aware (inside a repo -> <repo_parent>/projects/<stem>, logged); get_path is skip-aware (in a skipped task it publishes the would-be path instead of raising; consume contexts still fail fast). Pairs with same-named branches in seals, gtappy, gtap_invest, seals_cgebox_dev, earth_economy_devstack, ngfs_pnas. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ration Name-driven *_path hydration; git-aware project dir; skip-aware get_path
add_all_functions_from_script_to_task_tree silently turned every function in the calling script into a task, which confused newcomers and made helper functions into landmines. execute() on an empty tree now raises with the canonical fix (p.add_task / build_task_tree) spelled out. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ir inference
Single entry point for run_*.py files, replacing the boilerplate they all
repeated: run_mode validation ('check'/'fresh_intermediate'/'full'), the
'full' timestamp on project_name, project_dir composition, set_project_dir,
and the fresh_intermediate deletion of intermediate/ and outputs/ (input/ is
kept for per-machine parameters.csv values; guarded to project names
containing 'test').
extra_dirs is now optional: _infer_project_parent_dir walks up from the
calling script to its git repo and derives the projects dir — a stack
library repo maps to <repo_parent>/projects, a wrapped project repo (repo
nested inside a projects/ tree, e.g. ngfs_pnas) maps to its wrapper's
parent, so outputs land beside the checkout, never inside it.
_derive_default_project_dir now shares the same walk.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Run files on the caller-configured convention call p.skip_tasks(p.tasks_to_skip) after building the task tree. Initializing the attribute in __init__ means a run that skips nothing needs no guard, which removes the getattr(p, 'tasks_to_skip', None) fallback from every run file in the stack. Also adds the ProjectFlow project-dir resolution tests covering the merged hb.ProjectFlow(project_name=..., run_mode=...) API, and deletes project_flow_old_spec.py. Git history is the archive for pre-conversion forms. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run files on the caller-configured convention call p.skip_tasks(p.tasks_to_skip) after building the task tree. Initializing the attribute in init means a run that skips nothing needs no guard, which removes the getattr(p, 'tasks_to_skip', None) fallback from every run file in the stack.
Also adds the ProjectFlow project-dir resolution tests covering the merged hb.ProjectFlow(project_name=..., run_mode=...) API, and deletes project_flow_old_spec.py. Git history is the archive for pre-conversion forms.