Skip to content

[config] Use only .cfg extension, unify getting conf location #827

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

Merged
merged 4 commits into from
Mar 28, 2022

Conversation

ix5
Copy link
Member

@ix5 ix5 commented Mar 22, 2022

config: Unify getting default file name

Previously, the way of loading Isso's config was via accessing the defaults.ini file by importing Isso's pkg_resources at each instance.

Now, isso.config provides default_file(), which can be used instead.

This makes it easier to keep track of mentions of isso's config, which used to be scattered between defaults.ini and share/isso.conf (a symlink to the former).

Replace treewide:

config.load(pkg_resources.resource_filename('isso', 'defaults.ini'))

With:

config.load(config.default_file())

treewide: Settle on .cfg extension for config files

This cuts down on some confusion.

Since most of the docs tell users to use .cfg as the file extension for their own config files, settle on that extension.

isso: config: Use isso/isso.cfg as default

defaults.ini was a symlink to share/isso.cfg. The previous commits settled upon isso.cfg as a config filename, so keep with that convention.

Move the config to isso/ so that pkg_resources can find it

This helps avoid confusion and cuts down the amount of different config files flying around.

Makefile: Omit isso.cfg from rst sources

Since the conf is no longer provided as a :download in sphinx, it can be removed from the target dependencies.

@ix5 ix5 added server (Python) server code feature labels Mar 22, 2022
@ix5 ix5 added this to the 0.13 milestone Mar 22, 2022
@ix5 ix5 changed the title Conf unify [config] Use only .cfg extension, unify getting conf location Mar 22, 2022
@ix5 ix5 force-pushed the conf-unify branch 3 times, most recently from 6bd3b74 to b4e9a31 Compare March 23, 2022 11:37
ix5 added 4 commits March 28, 2022 21:55
Previously, the way of loading Isso's config was via
accessing the `defaults.ini` file by importing Isso's
`pkg_resources` at each instance.

Now, `isso.config` provides `default_file()`, which can be
used instead.

This makes it easier to keep track of mentions of isso's
config, which used to be scattered between `defaults.ini`
and `share/isso.conf` (a symlink to the former).

Replace treewide:
```
config.load(pkg_resources.resource_filename('isso', 'defaults.ini'))
```
With:
```
config.load(config.default_file())
```
This cuts down on some confusion.

Since most of the docs tell users to use `.cfg` as the file
extension for their own config files, settle on that
extension.
`defaults.ini` was a symlink to `share/isso.cfg`. The
previous commits settled upon `isso.cfg` as a config
filename, so keep with that convention.

Move the config to `isso/` so that `pkg_resources` can find
it

This helps avoid confusion and cuts down the amount of
different config files flying around.
Since the conf is no longer provided as a `:download` in
sphinx, it can be removed from the target dependencies.
@ix5 ix5 merged commit 0711f22 into isso-comments:master Mar 28, 2022
@ix5 ix5 deleted the conf-unify branch March 28, 2022 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature server (Python) server code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant