Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __main__ #179

Merged
merged 1 commit into from
May 31, 2024
Merged

Add __main__ #179

merged 1 commit into from
May 31, 2024

Conversation

danielballan
Copy link
Contributor

This enables:

$ python -m nslsii.sync_experiment --help
usage: __main__.py [-h] -b BEAMLINE -p PROPOSAL [-v | --verbose | --no-verbose]

Start or switch beamline experiment and record it in Redis

options:
  -h, --help            show this help message and exit
  -b BEAMLINE, --beamline BEAMLINE
                        Which beamline (e.g. CHX)
  -p PROPOSAL, --proposal PROPOSAL
                        Which proposal (e.g. 123456)
  -v, --verbose, --no-verbose
15:44 dallan@tensorbook:nslsii 

and also usage with pdb like so:

python -m pdb -m nslsii.sync_experiment --help

@jwlodek
Copy link
Member

jwlodek commented May 31, 2024

I would suggest also adding a version argument for both sync_experiment, and maybe for the package as a whole, like we did with bluesky.

@mrakitin
Copy link
Member

I would suggest also adding a version argument for both sync_experiment, and maybe for the package as a whole, like we did with bluesky.

Decided to do it via a separate PR.

@mrakitin mrakitin merged commit 4788936 into NSLS-II:master May 31, 2024
3 checks passed
@danielballan danielballan deleted the sync-experiment-main branch May 31, 2024 17:02
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.

3 participants