Conversation
- Paths to cvmfs and lmods softcoded as constructor defaults - refactor repeated code into _sort_versions() - deleted format_versions_list and format_build_output - no longer used and do not belong in the builder - Other small tidying for readability
Use shpc to create the module files instead of generating a template module.lua Building always fetches the tool registry (containers.yaml) to check if the CMVFS version exists. Adds the container hash and tag to the .yaml if needed and shpc will always install using the local registry.
Spike test: Inspecting CVMFS images for aliases during buildUtilising shpc-registry helper scripts to create accurate registries from add_container.py: # Generate guts
cli = ManifestGenerator()
manifests = cli.diff(args.image)
# Assemble aliases
aliases = {}
for path in list(manifests.values())[0]["diff"]["unique_paths"]:
# Don't include system bin
if "sbin" in path or "/usr/bin" in path:
print(f"Skipping system bin {path}")
continue
name = os.path.basename(path)
if name in aliases:
print(f"Warning, duplicate alias {name}")
aliases[name] = path
container["aliases"] = aliases
print(f"Writing with aliases to {container_yaml}")
shpc.utils.write_yaml(container, container_yaml)
print(f"container_yaml={container_yaml} >> $GITHUB_OUTPUT")container_guts.main.ManifestGenerator() looks likes the way the shpc workflow automatically updates the aliases, but uses Docker so this is a no go for the BioShell environment Using module load star-fusion
star-fusion-exec find /usr/local/bin -perm +111 -maxdepth 1 | wc -l146 # MANY binaries...Can we diff out the utility tools (e.g. non bioinformatics binaries) from /usr/bin? star-fusion-exec find /usr/bin -perm +111 -maxdepth 1 | head/usr/bin/[
/usr/bin/[[
/usr/bin/ar
/usr/bin/awk
/usr/bin/basename
/usr/bin/bunzip2
/usr/bin/bzcat
/usr/bin/chrt
/usr/bin/chvtSTAR-fusion v1.0.0 conda build script: Resource for biocontainer builds: |
Initial testing Summary for issue-9 PR**Environment:**Nectar. bioimage_Shelley_with_Rstudio blast 2.17.0 (latest, registry hit)
blast 2.16.0 (registry hit, multiple builds)Build correctly prompted to select between available builds, user selected Issue found: Note for PR: The module should either auto-load singularity as a dependency, or shelley-bio should warn the user at build time that singularity must be loaded before using the module. blast 2.5.0--hc0b0e79_3 (old version, registry miss)Build failed as expected as this version predates the SHPC registry. The error message correctly lists the valid registered tags. However the suggestion text ("Check that CVMFS is mounted") is misleading here since the real issue is a registry gap, not a CVMFS problem. Note for PR: The error message should be updated to reflect the registry miss and point the user toward those options when they land. A thought on potential solutionsIgnore me if I am increadibly wrong, otherwise we can discuss this week. Is the brunt of A potential flowchart TD
A([shelley-bio build\ntool:version]) --> B[Check SHPC registry\nIs tool:version known?]
B -->|yes| L([Build success!])
B -->|no| W[⚠️ Warning: Tool not in SHPC registry\nConsider a newer version or choose a build option]
W --> F[Find a registered version\nshelley-bio find tool]
W --> M[Specify binaries manually\n--bins name1,name2]
W --> D[Auto-discover executables\n--detect-bins]
F --> V[Highlight versions in registry]
V --> S[singularity exec tool:version]
S --> R([shelley-bio build tool:version])
R -->|yes| L
M --> P[Parse provided binary list]
D --> I["Interactive checklist\nSelect executables you need:\n( )nblасtn, \n( )blastp, \n( )blastx, \n( )tblastn, \n( )etc."]
P --> K[Write local registry entry\n.shelley/shpc-registry/container.yaml]
I --> K
K --> L
The branch point is whether the requested tool version exists in the SHPC registry. If yes, build proceeds automatically. If no, there are three pathways: Pathway 1 — Use a registered version (easiest) Pathway 2 — Manual alias build ( Pathway 3 — Auto-detect executables ( |
RationaleContainer manifests on shpc are generated via a GitHub action which was enabled in 2025, so either very recent tool builds, or pre-2025 builds are not included. When running
This PR adds support for both of these cases by running Changes
Key things to testBuilding a tool version that's in the registry vs. not, checking that these are built, module loadable, and correct binaries usable Known issues
Setup instructions for review
curl -LsSf https://astral.sh/uv/install.sh | sh
# 1. Clone both repos side by side
git clone https://github.com/Sydney-Informatics-Hub/shelley-bio
git clone https://github.com/Sydney-Informatics-Hub/guts.git
# Change to the SIH dev branch that supports singularity
cd guts && git checkout singularity && cd ..
# 2. Create and activate the virtual environment
cd shelley-bio
uv venv .venv
source .venv/bin/activate
# 3. Install shelley-bio in editable mode with dev extras
# uv resolves the local ../guts path from pyproject.toml automatically
uv pip install -e ".[dev]"
# 4. Load required modules
module load singularity shpc
# 5. Verify
shelley-bio
pytest --collect-only # check pytest is installed correctly, but do not run
|
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
Testing SummaryManual Testing:
|
Quick Test: Container Alias overlapWhen multiple modules are loaded simultaneously, conflicting aliases silently resolve to whichever module was loaded last. For example, with both $ which freeramdisk
/home/ubuntu/shpc/wrappers/quay.io/biocontainers/vcftools/0.1.12b--pl5262h2e03b76_2/bin/freeramdisk
$ which telnet
/home/ubuntu/shpc/wrappers/quay.io/biocontainers/vcftools/0.1.12b--pl5262h2e03b76_2/bin/telnetNot sure this is a big deal but it means irrelevant binaries are being exposed, and they can silently shadow each other depending on module load order. Might influence usability and reproducibility in multi-tool workflows. There is no warning to the user that this has happened. |
|
Thanks Mitchell! I had a look at the same bcftools versions, and the star-fusion:1.0.0 i've been using to test, and agree that a Two different cases for the two tools:
Also conda binaries are in different paths between the base and target image, no diffing without additional parsing. |
Search subcommand is intentionally placed with `build`, outside of the MCP. MCP adds additional overhead for it not being used.
Highly duplicated code that should be integrated into shelley_bio properly
* Delete all use of MCP and MCP server code - these are no longer used in shelley and clutter cli.py * Move top-levle helper functions out of cli.py and into relevant shelley_bio.commands module * Remove use of async to purge MCP usage. Temporarily removes highly duplicated shelley-bio interactive code
Updating `search` with rsec metadata, bulk UI improvements
This PR makes shelley 🐢 build modules using
shpc installunder the hood, replacing creating a dummymodules.luafile.Manual tests
blast:2.5.0--hc0b0e79_3Notes:
star/2.7.11a--h0033a41_0
star-fusion:1.0.0Confirmed: registry aliases does not reflect older versions.
Possible solution is to use an automated binary detection like shpc-guts that is compatible with singularity?