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

Homogenize config format requirements #233

Open
3 tasks
raphaelshirley opened this issue Nov 12, 2024 · 1 comment
Open
3 tasks

Homogenize config format requirements #233

raphaelshirley opened this issue Nov 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@raphaelshirley
Copy link
Member

Feature request
We want all_types_to_keymap to be as general as possible. We can add this functionality by allowing it to take a string and load the para file or yaml file

if isinstance(config,str):
    if config.endswith('.yaml') or config.endswith('.yml'):
        config=lp.read_yaml_config(config)
    if config.endswith('.para'):
        config=lp.read_config(config)
    else:
        raise ValueError(f"Config file format not recognized: '{config}'")

Before submitting
Please check the following:

  • I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves.
  • I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality.
  • If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps.
@raphaelshirley raphaelshirley added the enhancement New feature or request label Nov 12, 2024
@raphaelshirley raphaelshirley self-assigned this Nov 12, 2024
@raphaelshirley raphaelshirley changed the title Update lephare.all_types_to_keymap to take a string link to a yaml or para file Homogenize config format requirements Nov 13, 2024
@raphaelshirley
Copy link
Member Author

Furthermore we want all methods that take a key map to also accept string dictionary configs. e.g.:

sedtolib, mag_gal, etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant