-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Backlog/connect config #424
base: main
Are you sure you want to change the base?
Conversation
…le.json to login.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See feedback
|
||
|
||
def read_json_config(): | ||
def read_json_login(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would perhaps name it load_credentials
|
||
|
||
def write_json_config(config): | ||
def write_json_login(config): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
store_credentials
'ftrack_connect', level=loggingLevels[namespace.verbosity] | ||
) | ||
|
||
# TODO: Discuss if those keys should might be FTRACK_CONNECT_PLUGIN_PATH and | ||
# FTRACK_CONNECT_LAUNCH_PATH even though they are | ||
# not environment variables anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of like as you have it now - plugin_path
@@ -7,15 +7,18 @@ | |||
import errno | |||
|
|||
|
|||
def get_default_log_directory(): | |||
return platformdirs.user_data_dir('ftrack-connect', 'ftrack', 'log') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider moving this into the config file aswell.
|
||
|
||
def get_config_file_path(): | ||
def get_login_file_path(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would perhaps name it get_credentials_file_path
|
||
if os.path.isfile(config_file): | ||
logger.debug(u'Reading config from {0}'.format(config_file)) | ||
if os.path.isfile(login_file): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like it does not port over the existing config.json, I think we need to do this so all users do not need to login to Connect again.
config_file = os.path.join( | ||
platformdirs.user_data_dir('ftrack-connect', 'ftrack'), 'config.json' | ||
login_file = os.path.join( | ||
platformdirs.user_data_dir('ftrack-connect', 'ftrack'), 'login.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platformdirs.user_data_dir('ftrack-connect', 'ftrack'), 'login.json' | |
platformdirs.user_data_dir('ftrack-connect', 'ftrack'), 'credentials.json' |
Idéa to make migration easier: if FTRACK_CONNECT_PLUGIN_PATH is detected, output a deprecation warning to logs and tell users to achieve this through the config file instead. |
Co-authored-by: Henrik Norin <[email protected]>
Co-authored-by: Henrik Norin <[email protected]>
Co-authored-by: Henrik Norin <[email protected]>
Resolves :
This PR has been tested on :
Changes
Test