-
Notifications
You must be signed in to change notification settings - Fork 2.2k
default.cfg isn't documented #178
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
Comments
Apologies for my lack of communication about this. But the current config system already solves this, as follows. As you correctly point out, the When a user wants to change the config, there are other files they need to create/modify. The current config system already supports this. The idea is to have a "cascading" set of files, each overriding the previous one. See this line in config.py. So in order to change the default library-wide configuration, a user can create a new
and save it as Lastly, if the user wants to change the config on a per-run basis, the current config system also supports the Finally, if there is a I'm open to discussion of the locations, names, and priorities of these cascading config files, but I think the current system works and fixes the problem you are bringing up. What do you think?
|
Why not just add it to the |
I think I beat @raghavg123 to the punch ;) But to be completely clear: the whole point of the config system use |
Right, I guess this is the real issue then.
Looks perfectly fine and better than my solution. This already works just fine on windows though so I see no need for changes there? Shifting gears to communication then, obviously end users aren't going to figure this out themselves. As easy as it is to use, it isn't intuitive at all. Is that in some documentation already? Also tbh a small hint in the |
My next step in terms of the config system is definitely a more extensive documentation. I like your idea of also leaving a comment inside
That's what I thought, I just hadn't tested it yet. |
Speaking of this, is there anything blocking us from generating documentation now? @PgBiel |
So, starting out with documentation is as easy as: start writing docstrings more systematically (though #174 should be decided upon before that). And then running sphinx with default settings. Changing the sphinx settings in the future should not affect the actual docstrings (or other documentation files). I know @PgBiel wants to take the lead on this, but I also know they're in exams right now :) |
I'm closing this as there now exists a file documenting the config system in docs/build/tutorials/configuration.html. This file is far from complete, but at least it explains the cascading system, which is the subject of this issue. |
Now that #98 has been merged it has replaced the temporary
dirs.py
I added exactly like I had envisioned that happening. So now it's time to open this issue on one last improvement on that front I'd like to see.See, both
dirs.py
anddefault.cfg
had/have this one issue, that's most relevant to devs, but not irrelevant to standard users either. Whendefault.cfg
is edited, Git will recognize this as a change that might be uploaded to the repo, which of course isn't ever the case. While this can easily be ignored locally, switching branches will overwrite thedefault.cfg
. Further if we ever change thedefault.cfg
, which we should do as rarely as possible but let's be real, it will probably happen a few times, this also would overwrite any custom changes by the user, and this last point is also what's affecting all users, not just devs.The question is, what do we actually do about that? I've thought about it for a while but I'm not entirely sure what's the best approach. The best idea I had involves versioning and is this:
default.cfg
to[version].cfg
and add internal cfg versioningdefault.cfg
to .gitignore (which btw still contains a reference to media_dir.txt we can delete with the same PR)default.cfg
, and if it's not found will offer to rename[version].cfg
intodefault.cfg
, making sure that hassle for end users is kept to an absolute minimumdefault.cfg
once which can be automatically done on the CLI, after which thatdefault.cfg
interferes neither with dev work like branch switching, nor will it ever be overwritten by updates. Necessary updates instead include a[newer version].cfg
and will throw a warning/error at users, informing them of the need to migrate their changes to the newer version.Thoughts are any issues with this plan?
The text was updated successfully, but these errors were encountered: