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

show all possible values in TelescopeParameters with (auto-generated) CaselessStrEnum traits #1874

Closed
kosack opened this issue Apr 11, 2022 · 0 comments

Comments

@kosack
Copy link
Contributor

kosack commented Apr 11, 2022

Please describe the use case that requires this feature.

create_class_enum_trait() can generate a configurable CaseLessStrEnum trait with all the possible values listed, e.g.

 --ImageProcessor.image_cleaner_type=<CaselessStrEnum>
     ImageCleaner to use.
     Choices: any of ['TailcutsImageCleaner', 'MARSImageCleaner', 'FACTImageCleaner'] (case-insensitive)
     Default: 'TailcutsImageCleaner'

This is very useful for letting the user know what options can be used.

However, this doesn't work when the trait is part of a TelescopeParameter, as in CameraCalibrator.extractor_type:

--CameraCalibrator.image_extractor_type=<telescopeparameter-item-1>...
    Name of the ImageExtractor subclass to be used.
    Default: [('type', '*', 'NeighborPeakWindowSum')]

Describe the solution you'd like

TelescopeParameters of CaselessStrEnums should show the possible Enum values in their help string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants