Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common-config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
id
eigenservice
common-config
Commits
d750001b
Commit
d750001b
authored
3 months ago
by
David Huss
Browse files
Options
Downloads
Patches
Plain Diff
Remove some hardcoded Eigenservice values
parent
bfc3bde9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
common_config/common.py
+10
-6
10 additions, 6 deletions
common_config/common.py
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
with
11 additions
and
7 deletions
common_config/common.py
+
10
−
6
View file @
d750001b
...
@@ -379,12 +379,14 @@ def create_config():
...
@@ -379,12 +379,14 @@ def create_config():
"""
"""
Interactivally create a config directory at a choice of different places with a default config in it.
Interactivally create a config directory at a choice of different places with a default config in it.
"""
"""
helptext
=
f
"""
Configs are read from the following
directories (later overrides earlier)
:
helptext
=
f
"""
Config
uration file
s are read from the following
locations
:
1. DEFAULT_CONFIG (use config default to inspect)
1. DEFAULT_CONFIG (use config default to inspect)
2. /etc/
{
APPLICATION_NAME
}
/*
{
SUFFIX
}
.toml (in alphabetical order)
2. /etc/
{
APPLICATION_NAME
}
/*
{
SUFFIX
}
.toml (in alphabetical order)
3. $XDG_CONFIG_HOME/
{
APPLICATION_NAME
}
/*
{
SUFFIX
}
.toml (in alphabetical order)
3. $XDG_CONFIG_HOME/
{
APPLICATION_NAME
}
/*
{
SUFFIX
}
.toml (in alphabetical order)
4. $EIGENSERVICE_CONFIG_DIR/*
{
SUFFIX
}
.toml (in alphabetical order)
4. $
{
APPLICATION_NAME
}
_CONFIG_DIR/*
{
SUFFIX
}
.toml (in alphabetical order)
5. $EIGENSERVICE_CONFIG_PATH (final override)
5. $
{
APPLICATION_NAME
}
_CONFIG_PATH (final override)
(Each overriding the fields in the previous one, where set)
"""
"""
print
(
helptext
)
print
(
helptext
)
print
()
print
()
...
@@ -512,12 +514,14 @@ def print_help():
...
@@ -512,12 +514,14 @@ def print_help():
Helper tool for managing and installing a
{
APPLICATION_NAME
}
config.
Helper tool for managing and installing a
{
APPLICATION_NAME
}
config.
Configs are read from the following
directories (later overrides earlier)
:
Config
uration file
s are read from the following
locations
:
1. DEFAULT_CONFIG (see below)
1. DEFAULT_CONFIG (see below)
2. /etc/
{
APPLICATION_NAME
}
/*
{
SUFFIX
}
.toml (in alphabetical order)
2. /etc/
{
APPLICATION_NAME
}
/*
{
SUFFIX
}
.toml (in alphabetical order)
3. $XDG_CONFIG_HOME/
{
APPLICATION_NAME
}
/*
{
SUFFIX
}
.toml (in alphabetical order)
3. $XDG_CONFIG_HOME/
{
APPLICATION_NAME
}
/*
{
SUFFIX
}
.toml (in alphabetical order)
4. $EIGENSERVICE_CONFIG_DIR/*
{
SUFFIX
}
.toml (in alphabetical order)
4. $
{
APPLICATION_NAME
}
_CONFIG_DIR/*
{
SUFFIX
}
.toml (in alphabetical order)
5. $EIGENSERVICE_CONFIG_PATH (final override)
5. $
{
APPLICATION_NAME
}
_CONFIG_PATH (final override)
(Each overriding the fields in the previous one, where set)
Commands:
Commands:
create . . . . . Interactivly create a default config file
create . . . . . Interactivly create a default config file
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
1
View file @
d750001b
[tool.poetry]
[tool.poetry]
name
=
"common-config"
name
=
"common-config"
version
=
"0.1.2
0
"
version
=
"0.1.2
1
"
description
=
"A config library for python based services"
description
=
"A config library for python based services"
authors
=
[
"David Huss <dh@atoav.com>"
]
authors
=
[
"David Huss <dh@atoav.com>"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment