Skip to content
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 global config #42

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

nuclearcat
Copy link
Member

Implement support for a global configuration file to enable kci-dev functionality across any source directory location, but keep support of local configuration file. This enhancement will allow for more flexible project setup and improved workflow portability.

We can have local config file .kci-dev.toml, but also we
should have global config, so we can operate in any directory,
as any similar program.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
As we can have local config and "global" config, we should
document that.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
@nuclearcat nuclearcat marked this pull request as draft November 4, 2024 10:07
@nuclearcat nuclearcat marked this pull request as ready for review November 4, 2024 10:07
@@ -16,7 +16,9 @@ poetry run kci-dev

## Configuration

kci-dev uses a configuration file .kci-dev.toml in the program directory.
kci-dev uses a configuration file .kci-dev.toml in the current program directory
or global configuration directory, in user's home directory/.config/kci-dev.toml.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about to use something like "$HOME/.config/kci-dev/kci-dev.toml"
so that we can have a subdirectory under .config for kci-dev

Copy link
Member

@aliceinwire aliceinwire Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also this is not a global configuration but a USER configuration

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global configurations are under /etc/ in most OS

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current program directory configuration ".kci-dev.toml" is per SITE configuration

Copy link
Member

@aliceinwire aliceinwire Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and loading order is generally

  • Global
  • User
  • Site
  • kci-dev settings options

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i will update. About loading order, do you mean "site" for example override previous ones or global have highest priority and will be used as highest priority (if available)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each file read overrides any values read from previous files

site for example override previous ones

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i also added the kci-dev settings options in the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants