You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Settings are intended to be configured via the JSON config files gui_config.json and cli_config.json.
However, those files have to be in the directory NR is run from to be discovered. For now, this means cloning the repo.
When installing via pip and running from a Python terminal, those files may not exist. In that case, NR will grab the default gui_config.json and cli_config.json from the installed package, which the user can't easily find and edit.
Here's the code in constants.py that does this:
JSON_CLI_CONFIG_PATH: Path=Path("cli_config.json")
"""Settings that configure cli_settings.py."""ifnotJSON_CLI_CONFIG_PATH.exists():
# __name__ will get to the utils module# and cli_config.json is at root directoryJSON_CLI_CONFIG_PATH=Path(
pkg_resources.resource_filename(__name__, "../../cli_config.json")
)
JSON_GUI_CONFIG_PATH: Path=Path("gui_config.json")
"""Settings that configure gui_settings.py."""ifnotJSON_GUI_CONFIG_PATH.exists():
# __name__ will get to the utils module# and gui_config.json is at root directoryJSON_GUI_CONFIG_PATH=Path(
pkg_resources.resource_filename(__name__, "../../gui_config.json")
)
One solution would be to create an importable function (in NeuroRuler.__init__) that puts these files in cwd so that the user can edit and re-run GUI or CLI. Then these settings will persist as long as the user runs from that directory.
One could also create a function that simply modifies values in gui_settings.py or cli_settings.py.
The text was updated successfully, but these errors were encountered:
Settings are intended to be configured via the JSON config files
gui_config.json
andcli_config.json
.However, those files have to be in the directory NR is run from to be discovered. For now, this means cloning the repo.
When installing via pip and running from a Python terminal, those files may not exist. In that case, NR will grab the default
gui_config.json
andcli_config.json
from the installed package, which the user can't easily find and edit.Here's the code in
constants.py
that does this:One solution would be to create an importable function (in NeuroRuler.__init__) that puts these files in cwd so that the user can edit and re-run GUI or CLI. Then these settings will persist as long as the user runs from that directory.
One could also create a function that simply modifies values in
gui_settings.py
orcli_settings.py
.The text was updated successfully, but these errors were encountered: