Skip to content

Conversation

@tristan-f-r
Copy link
Collaborator

@tristan-f-r tristan-f-r commented Jul 15, 2025

This PR adds a very naive SPRAS cli wrapper over Snakemake. Having a wrapping command line interface instead that wraps around Snakemake allows

  • generating configuration files without needing to use Snakemake, for automated parameter tuning and seedable configurations in feat!: typed PRA#run #329. This can be done with parameters inside the configuration, but this requires that we have a Snakemake run that immediately stops.
  • SPRAS to be installed as a pip module, so SPRAS binaries can be attached with release versions and pip-installable

After the next SPRAS release cycle, one could do:

pip install spras
spras run --configfile config.yaml --cores 8

We use the run subcommand to make extending this CLI easier later. We can easily supply a spras --version or a spras --help which links to the RTD, a spras tune for parameter tuning, etc...


This does make local development more annoying if you install SPRAS without python -m pip install -e .[dev]. The pixi PR (#382) helps with this.

We prefer this over Snakemake since it's easier to test separate components outside of Snakemake.

@tristan-f-r tristan-f-r added the enhancement New feature or request label Jul 15, 2025
@tristan-f-r tristan-f-r added the P-medium medium prirotity; this is needed for some external service or another PR label Jul 24, 2025
@read-the-docs-community
Copy link

read-the-docs-community bot commented Aug 24, 2025

Documentation build overview

📚 spras | 🛠️ Build #29949147 | 📁 Comparing 5d19632 against latest (ff63657)


🔍 Preview build

Show files changed (2 files in total): 📝 2 modified | ➕ 0 added | ➖ 0 deleted
File Status
usage.html 📝 modified
contributing/index.html 📝 modified

@ntalluri
Copy link
Collaborator

ntalluri commented Sep 9, 2025

Does PR allow for the old version (the conda env version) to still exist or does this PR get rid of it entirely?

Also does this change how Justin set up the CHTC integration?

@ntalluri
Copy link
Collaborator

ntalluri commented Sep 9, 2025

Also what do you mean by this "allows us to generate configuration files without needing to use Snakemake"

@tristan-f-r
Copy link
Collaborator Author

tristan-f-r commented Sep 9, 2025

Does PR allow for the old version (the conda env version) to still exist or does this PR get rid of it entirely?

You can still use conda env - this does not remove it. Optimally, once we have #382, using the spras CLI to run snakemake should be the easiest option.

Also does this change how Justin set up the CHTC integration?

This change is backwards compatible, so it won't break Justin's CHTC setup. However, from looking at it earlier, using this CLI might actually be nicer for the CHTC setup (since it avoids hardcoding the SPRAS Snakefile path)

Also what do you mean by this "allows us to generate configuration files without needing to use Snakemake"

For parameter tuning (as far as I'm aware) and configuration seeding, we need to be able to generate configuration files. Refactoring the Snakefile to be able to handle this seems like a lot (especially given its lack of test coverage), so having configuration generation outside of our Snakemake workflow (and inside the CLI) looks like the nicest solution here.

@tristan-f-r
Copy link
Collaborator Author

This CLI should no longer be helpful for parameter tuning - only for determinism and packaging.

@github-actions github-actions bot added the merge-conflict This PR has merge conflicts. label Oct 3, 2025
@github-actions github-actions bot removed the merge-conflict This PR has merge conflicts. label Oct 4, 2025
@tristan-f-r tristan-f-r added the tuning Workflow-spanning algorithm tuning label Oct 9, 2025
@tristan-f-r tristan-f-r mentioned this pull request Oct 10, 2025
@tristan-f-r tristan-f-r linked an issue Oct 10, 2025 that may be closed by this pull request
@github-actions github-actions bot added the merge-conflict This PR has merge conflicts. label Oct 14, 2025
@github-actions github-actions bot removed the merge-conflict This PR has merge conflicts. label Oct 15, 2025
@tristan-f-r tristan-f-r removed the tuning Workflow-spanning algorithm tuning label Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request P-medium medium prirotity; this is needed for some external service or another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SPRAS CLI

3 participants