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

Move CueGUI constants to a YAML config file. #1242

Merged

Conversation

bcipriano
Copy link
Collaborator

@bcipriano bcipriano commented Jan 13, 2023

Link the Issue(s) this Pull Request is related to.
#785

Summarize your change.
Prior to this change, most of the values in CueGUI's Constants.py could only be changed by editing the code directly. For some of those values, that was fine, as they are true constants, but that file contains a lot of settings that should be easily tweakable by users -- refresh settings, style settings, render log roots, plugin paths, etc.

This change creates a new cuegui.yaml file where all of that config can live:

  • Constants.py is kept to ease the transition, for now at least.
  • Config is stored in YAML format.
  • Default config is stored in config/cuegui.yaml. This file also provides an example users can work from to create their own config.
  • Custom config will be loaded from:
    • ~/.config/opencue/cuegui.yaml on Linux/Mac.
    • %APPDATA%/opencue/cuegui.yaml on Windows.
    • An arbitrary path specified by the CUEGUI_CONFIG_FILE env var.
  • Config.py is renamed to Layout.py, as it only really deals with saving/restoring window layout, so it was confusing.
  • We introduce a new constant CONFIG_PATH. Currently DEFAULT_INI_PATH is used for all config files, not just .ini files, which is confusing.
  • Removed any constants that weren't referenced elsewhere in the code to clean things up. There were about 10 of them.
  • Merged the existing cue_resources.yaml into the new YAML file.

@bcipriano bcipriano marked this pull request as ready for review January 13, 2023 02:43
Copy link
Collaborator

@DiegoTavares DiegoTavares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bcipriano bcipriano merged commit 8a33d83 into AcademySoftwareFoundation:master Jan 26, 2023
@bcipriano bcipriano deleted the cuegui-yaml-config branch January 26, 2023 23:23
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.

2 participants