Skip to content

Conversation

@cscully-allison
Copy link
Collaborator

Added a global configuration manager.

Features added:

  1. A configuration manager class
    a. Basically a dictionary we can validate input on and format output
  2. A validation class which performs basic type validation but can be extended to support arbitrary validation
    a. This class does require maintenance. When we add a new configuration we need to assign a validation function to the configuration key.
  3. A configuration file: hatchetrc.yaml in the base directory
    a. This is loaded by default when users do not have their own hatchetrc.yaml file in directory $HOME/.config/hatchet/
    b. This is a .yaml file and accordingly should conform to the YAML syntax and requirements; here is a tutorial with an overview of such syntax: https://www.cloudbees.com/blog/yaml-tutorial-everything-you-need-get-started/
  4. A global variable at hatchet root level scope: RcParams pointing to an instance of this class, it can be used in the following way:
import hatchet as ht
ht.RcParams["invert_colormap"] = True

@slabasan slabasan force-pushed the develop branch 17 times, most recently from b461833 to 48d44ce Compare August 9, 2022 05:03
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.

1 participant