-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add script to generate config file #520
Conversation
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.
Maybe create_config should read from the existing templates file somehow? Or it could live in some kind of data folder that is packaged in pypi?
I'd be in favor of those approaches. I'll look into including the default file in the installed package. |
@mcoughlin I'm able to get I'm thinking I can add a script to create a basic set of scope directories in the current working directory, and then allow that base directory to be specified in the config file. This will require changes to the code wherever we currently use |
@bfhealy All that makes sense. Might also check with Theo if he has thoughts too. |
Hi @Theodlz - we're considering how best to package scope for a PyPI release and have been discussing issues about the config file, where it gets installed, and how users interact with scope (see above). Do you have any thoughts on these issues and how best to address them? |
Hi Brian! Yes, a few suggestions, though I see that some of your changes go in that direction as well:
Overall I would go for a system where you can specify a config yaml if you'd like. Or maybe, you'd rather want the user to pass the config in the code, and it's their job to handle configuration. Maybe you can just provide the config class to load a config yaml, a method to generate a config yaml given a location, but then let them take care of whether or not they want to use that or just pass the config the way they want it to scope. Does that make sense? I'm afraid that forcing them to use a specific way to pass the config other than in the code itself, explicitly, might actually turn out to be a limiting factor in some applications. If you'd like, I'm happy to open a PR this weekend with some suggestions which you can keep or not in the final version |
These are very helpful points, thanks Theo! I'd welcome a PR with some suggestions as well. I definitely want to avoid implementing anything in the release that becomes a limitation for new users. |
No longer needed due to changes in #514. |
This PR adds a script to generate
config.defaults.yaml
(andconfig.yaml
if it doesn't exist) in support of efforts to make scope pip-installable. The GH Actions workflows are updated to use the new code.The downside of this change is that we lose comments in the yaml file that could help new users. For this reason,
config.yaml.defaults
remains unchanged in this repo. (check_configs
inscope.py
passes with both versions of the default file). We should also augment the setup documentation in this regard once a pip-installable scope package is realized.