Skip to content

Replace setup.py with pyproject.toml, add pipeline CLI entrypoints - #93

Merged
adrien-laposta merged 7 commits into
simonsobs:mainfrom
sbiquard:sb/cli-entrypoints
Sep 17, 2026
Merged

adrien-laposta merged 7 commits into
simonsobs:mainfrom
sbiquard:sb/cli-entrypoints

Conversation

@sbiquard

@sbiquard sbiquard commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Replaces setup.py with pyproject.toml (hatchling backend) and adds soopercool-* console-script entrypoints for the pipeline scripts, so they're runnable without python pipeline/foo.py.

List of changes:

  • Wrap pipeline/ scripts in cli() functions
  • Add __init__.py files to package so entrypoints resolve
  • Make sibling imports relative
  • Unused scripts commented out in [project.scripts] table
  • Add missing scikit-learn dependency
  • Swap sotodlib for stdlib logging in precompute_cov_couplings.py, using the same loglevel (warning)
  • Drop requirements.txt, deps now live in pyproject.toml
  • CI: python setup.py install becomes pip install .

Comment thread pipeline/precompute_cov_couplings.py Outdated
@sbiquard
sbiquard marked this pull request as ready for review September 17, 2026 13:54
main(args)


if __name__ == "__main__":

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pip-installed console scripts need a callable without any arguments (entry = "module:func" calls bare func()). Wrapping the argument parser and main(args) call in a cli() function called from the if __name__ == "__main__": block is the most minimal fix to apply and it preserves main's signature.

Comment thread pipeline/precompute_cov_couplings.py Outdated
@adrien-laposta
adrien-laposta merged commit 372592b into simonsobs:main Sep 17, 2026
1 check passed
@sbiquard
sbiquard deleted the sb/cli-entrypoints branch September 17, 2026 14:38
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