Benjamin Renard
8a0a65465d
Update pre-commit config and fix some pylint & bandit warnings
2023-10-27 13:35:59 +02:00
Benjamin Renard
f597164305
Config: add stuff to handle just-try mode in ConfigurableObject class
2023-06-19 17:07:59 +02:00
Benjamin Renard
93b06d6127
ConfigurableObject: add set_default() / set_defaults() methods
2023-03-13 19:12:47 +01:00
Benjamin Renard
b5df95a2dd
Config: add set_default() / set_defaults() methods
2023-03-13 18:53:29 +01:00
Benjamin Renard
62c3fadf96
Introduce pyupgrade,isort,black and configure pre-commit hooks to run all testing tools before commit
ci/woodpecker/push/woodpecker Pipeline failed
2023-01-16 12:56:12 +01:00
Benjamin Renard
3a43b8d07d
Config.parse_arguments_options(): add hardcoded_options argument
ci/woodpecker/push/woodpecker Pipeline was successful
2023-01-10 10:52:26 +01:00
Benjamin Renard
56162452ac
config: if option value was previously set, ignore from options value
2023-01-10 10:50:48 +01:00
Benjamin Renard
5fefc1ed84
Config: make the configparser always defined to allow to set options at any moment
2023-01-10 10:48:57 +01:00
Benjamin Renard
e9477b1566
config: add optional --reconfigure parameter
ci/woodpecker/push/woodpecker Pipeline was successful
2023-01-09 13:34:07 +01:00
Benjamin Renard
6a7368deb5
ConfigOption: add _get_user_input method to allow to mock it in tests
2023-01-09 13:32:25 +01:00
Benjamin Renard
014a0802f8
config: make sure to reload file after saving it
...
To ensure the configparser object is uptodate.
2023-01-09 13:27:52 +01:00
Benjamin Renard
135a742b6e
config: add --console-stderr parameter
ci/woodpecker/push/woodpecker Pipeline was successful
2023-01-09 11:25:58 +01:00
Benjamin Renard
eb183b0d3b
config: split console logging between stdout & stderr base on level
ci/woodpecker/push/woodpecker Pipeline was successful
2023-01-06 18:19:48 +01:00
Benjamin Renard
55782df47c
config: code cleaning
2023-01-06 18:19:48 +01:00
Benjamin Renard
85d34b7b9a
Config: allow access/setting config options as with a dict
2022-11-09 10:25:13 +01:00
Benjamin Renard
5f0527f0c3
config: add get_option() method
2022-05-27 15:15:34 +02:00
Benjamin Renard
3bf87222fd
config: start adding support of multiline values
ci/woodpecker/push/woodpecker Pipeline was successful
2022-05-13 14:47:01 +02:00
Benjamin Renard
bca3f4f347
config.BooleanOption: fix handling argparse options
...
The argparse option now reverse the default value set in configuration
file instead of only the default value set on adding the configuration
option.
2022-04-21 14:16:30 +02:00
Benjamin Renard
63600416b3
config: use a section to configure console logging
2022-02-24 17:03:12 +01:00
Benjamin Renard
ef94c6969f
config: fix console logged message format
2022-02-24 12:33:24 +01:00
Benjamin Renard
9a89638e54
Code cleaning
2022-01-20 19:14:16 +01:00
Benjamin Renard
b90994037a
config.Config: add constructor parameter default_config_dirpath
2022-01-20 19:11:51 +01:00
Benjamin Renard
c851e7aca7
config: fix save method when file exists and is writeable but not the directory
2022-01-19 19:17:32 +01:00
Benjamin Renard
ba4e85be50
config: add ConfigurableObject object class
2022-01-19 17:26:47 +01:00
Benjamin Renard
0823353c0a
config: Fix configuration interactive mode
2022-01-19 17:20:53 +01:00
Benjamin Renard
4d4e8f133b
Fix some pylint warnings
2021-11-23 13:08:44 +01:00
Benjamin Renard
d15c4f36fb
Config: add configure method
...
This method is an entry point of a script you could use to created your
configuration file.
Note: make sure to load to define all your configuration section and
options
before running it.
2021-11-23 13:02:12 +01:00
Benjamin Renard
6601891f9d
config: add ask_values and execute_callback parameters to parse_arguments_options
2021-11-23 12:35:40 +01:00
Benjamin Renard
2e829c4cc3
config: add ask_values method that allowing interactive configuration
2021-11-23 12:34:50 +01:00
Benjamin Renard
e058d315d4
config: BaseOption.set now also set parser option value
2021-11-23 12:31:33 +01:00
Benjamin Renard
8438f95e68
Config: Add config_file_env_variable parameter
...
The new config_file_env_variable parameter allow to specify environment
variable name that will be used to determine configuration file path if
it's not explicitly provided using -c/--config parameter.
2021-11-19 16:16:46 +01:00
Benjamin Renard
e6ce412db0
Config: Implement custom argparse TextHelpFormatter to keep line return
2021-11-19 16:13:36 +01:00
Benjamin Renard
366260e92a
Config.get_arguments_parser: allow to override argparse description
2021-11-18 21:20:53 +01:00
Benjamin Renard
4691ba7386
config: Add -C/--console parameter
2021-11-18 19:55:44 +01:00
Benjamin Renard
94ed2e50fd
config.BooleanOption: change default argument name to add enable/disable
2021-11-06 15:15:03 +01:00
Benjamin Renard
f8d78f6fe2
config.BaseOption: add no_arg parameter
2021-11-06 15:14:06 +01:00
Benjamin Renard
dc0f17dd20
Add config lib
2021-11-03 17:38:31 +01:00