If config_file is None, use cwd, not its parent#8894
Merged
jmchilton merged 1 commit intogalaxyproject:devfrom Oct 28, 2019
Merged
If config_file is None, use cwd, not its parent#8894jmchilton merged 1 commit intogalaxyproject:devfrom
jmchilton merged 1 commit intogalaxyproject:devfrom
Conversation
Addresses this comment: galaxyproject#921 (comment)
nsoranzo
approved these changes
Oct 28, 2019
Member
|
I'm still not sure if overwriting |
Member
|
This needs to be back ported to 19.09 I think. |
jmchilton
approved these changes
Oct 28, 2019
Member
Author
|
@nsoranzo about line 139: I don't know. As I understand, if the config file is not specified, cannot be found, etc., and galaxy is running from source tree, just use the |
Member
Author
|
backporting in a min.. |
jdavcs
added a commit
to jdavcs/galaxy
that referenced
this pull request
Oct 28, 2019
Member
|
@ic4f One issue is that if a value is specified for |
Member
Author
|
@nsoranzo you're right! ( |
jdavcs
added a commit
to jdavcs/galaxy
that referenced
this pull request
Oct 30, 2019
1. Split method body in two 2. Change assignment of config_dir when running from source 3. Ensure value of config_dir is an absolute path I think splitting the method imporoves readability: its functionality can be easily grouped into 2 parts: (1) finding and reading the main config file (I've removed the comment because it was not quite in place and, I think, not essential to understanding the code); and (2) setting paths for core config properties based on part (1). The change to config_dir addresses previous discussions: galaxyproject#8894 (comment) galaxyproject#921 (comment) I could've changed the line in question: galaxyproject#921 (comment) to this: `if self.config_file is None and `config_dir` is not in config_kwargs:` However, in my opinion, such an edit would further obfuscate the logic of assigning that value. The proposed solution, I think, although more verbose, makes the code more straightforward: it is immediately clear what values are assigned under what circumstances. Finally, in the previous version `config_dir` can be a relative path if `config_file` exists, but `config_dir` is set by the user (to a relative path). That, I believe, was a bug.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses this comment:
#921 (comment)
@natefoo , @nsoranzo - is this correct?
(the added empty lines improve readability, I hope)