Skip to content

Use template to generate DHS Madagascar Environment#2

Merged
TinasheMTapera merged 2 commits into
mainfrom
prospectorDHSMadagascar
Jul 6, 2026
Merged

Use template to generate DHS Madagascar Environment#2
TinasheMTapera merged 2 commits into
mainfrom
prospectorDHSMadagascar

Conversation

@TinasheMTapera

Copy link
Copy Markdown
Member

No description provided.

- refined environment variable settings for spack integration
- added additional paths for user and misc cache
- ensured compatibility with previous builds by addressing malformed variables

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the prospectorDHSMadagascar project notebooks from legacy, superseded chapters to a newer template-based workflow for defining and building a reproducible Singularity/Spack-based environment, and aligns an import path in an existing project notebook.

Changes:

  • Replaces multiple legacy DHS Madagascar notebooks with new, template-style chapters (contract → platform recipe → sysdeps → datascience → activation → build/install).
  • Updates the DHS Madagascar “misc helpers” notebook to include execution and submitit display helpers intended for reuse.
  • Switches prospectorMahery project activation to import show_spython / spython_exec from rse_workbench.helpers.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
notebooks/projects/prospectorMahery/05_project-activation.qmd Updates helper import path for Singularity execution display utilities.
notebooks/projects/prospectorDHSMadagascar/setup.qmd Removes legacy setup notebook (superseded).
notebooks/projects/prospectorDHSMadagascar/06_launch.qmd Removes legacy launch notebook (superseded).
notebooks/projects/prospectorDHSMadagascar/05_recipe.qmd Removes legacy container-build notebook (superseded).
notebooks/projects/prospectorDHSMadagascar/04_devtools.qmd Removes legacy devtools notebook (superseded).
notebooks/projects/prospectorDHSMadagascar/03_datascience_lang.qmd Removes legacy language-layer notebook (superseded).
notebooks/projects/prospectorDHSMadagascar/02_spack.qmd Removes legacy Spack-layer notebook (superseded).
notebooks/projects/prospectorDHSMadagascar/01_base_platform.qmd Removes legacy base-platform notebook (superseded).
notebooks/projects/prospectorDHSMadagascar/00_misc.qmd Adds helper utilities for spython execution + submitit job output display.
notebooks/projects/prospectorDHSMadagascar/01_project-contract.qmd Adds project contract chapter defining paths, versions, and Slurm parameters.
notebooks/projects/prospectorDHSMadagascar/02_platform-recipe.qmd Adds platform recipe chapter for base image/tooling installation in container.
notebooks/projects/prospectorDHSMadagascar/03_sci-sysdeps.qmd Adds Spack system-dependency layer chapter and spack.yaml generation.
notebooks/projects/prospectorDHSMadagascar/04_datascience.qmd Adds language package layer chapter for R/Python dependency TOMLs.
notebooks/projects/prospectorDHSMadagascar/05_project-activation.qmd Adds activation/bridge chapter to validate environment variables and Spack activation.
notebooks/projects/prospectorDHSMadagascar/06_build-launch.qmd Adds Slurm/submitit build + in-container install orchestration chapter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +49 to +51
SLURM_MEM = "32G"
SLURM_HOURS = 2 # this is the project build time, not the runtime for a single job
SLURM_EMAIL = "aaaapr3lk7gfdswioulcmvi3te@harvard.org.slack.com" # aaaapr3lk7gfdswioulcmvi3te@harvard.org.slack.com
from rse_workbench.platform_contract import compose_platform_recipe, recipe_to_definition
```

THe platform recipe section tells us what foundation to build
Comment on lines +146 to +149
#| sorting-hat: remove
from spython.main import Client

TMP_SANDBOX = Path(f"/tmp/{os.environ['USER']}-{PROJECT_NAME}-sandbox")
Comment on lines +13 to +15
```{python}
show_spython(
spython_exec(
Comment on lines +19 to +21
from rse_workbench.helpers import show_submitit_job
from rse_workbench.build_install import install_in_container

Comment on lines +133 to +145
"""Slurm display and launch-script helpers."""

from __future__ import annotations

from pathlib import Path
from typing import Any

from rich.console import Console
from rich.panel import Panel
from rich.text import Text

console = Console()

Comment on lines +76 to +80
"cairo",
"readline",
"libuv",
"libgit2"
]
Comment on lines +86 to +90
"udunits",
"libuv",
"zlib",
"r-udunits2"
])
@TinasheMTapera
TinasheMTapera merged commit 1443872 into main Jul 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants