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

Update handling configuration items in template #2341

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Mar 28, 2022

  1. Change recommended config item access in template

    Previously the template core module read the values of the configuration
    items at class creation and stored them in class attributes. This meant
    that changing the configuration items at runtime had no effect.
    
    Now the template implements private properties that return the current
    configuration item value, or the class (or instance) attribute value if
    the user has changed it. This enables the users to use the full
    functionality of the `astropy` configuration system, but users not
    familiar with it can still override it entirely through the attributes.
    eerovaher committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    cbd4900 View commit details
    Browse the repository at this point in the history
  2. Update configuration item names in template

    The template core module allows users to set configuration items in two
    ways, either through the `astropy` configuration system or through class
    or instance attributes. The attribute names are no longer in capital
    letters because the convention is to reserve such names for constants,
    and the configuration item names now match the attribute names.
    eerovaher committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    5137807 View commit details
    Browse the repository at this point in the history
  3. Add __init__() to template core module

    The template now recommends implementing an `__init__()` function that
    allows the users to conveniently override the `astropy` configuration
    system.
    eerovaher committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    1ffb0d9 View commit details
    Browse the repository at this point in the history