Skip to content

Implement stpipe CLI command for saving a Step's default + CRDS config file #44

@stscijgbot-jp

Description

@stscijgbot-jp

Issue JP-1897 was created on JIRA by Edward Slavich:

The "stpipe print-config" or "stpipe save-config" subcommand (part of this ticket will be polling opinions on which of these will work best) will allow users to save Step subclass default and CRDS parameters to an ASDF config file which the user can customize.  An example help output for the "print-config" option, which prints the ASDF to stdout where it can be redirected as needed:

$ ./stpipe print-config -h
usage: stpipe print-config [-h] <class> <input-file>

print step or pipeline config to stdout

positional arguments:
  <class>       step or pipeline class name (case-insensitive, module path may be omitted for unique class names)
  <input-file>  input dataset or association (used to fetch parameters from CRDS)

optional arguments:
  -h, --help    show this help message and exit

examples:
  save a pipeline config to a local file:

    stpipe print-config jwst.pipeline.Detector1Pipeline dataset.fits > config.asdf

See #8 for discussion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions