Added `env_bool` function, csv/kval functions now allow separator to be overriden, + more
New functions / code improvements
- Added
env_bool
function tocommon.py
for loading an environment var as a boolean - Added
csvsplit
parameter to parse/env_csv and keyval, to allow changing the item separator from,
- Added
valsplit
parameter to parse/env_keyval, to allow customising the separator between key's and value's from:
Documentation
- Added PyDoc param's / return's for various functions, and fleshed out some others
- Wrapped various docstring values such as
True
and0
with backticks so they display better - Various small formatting improvements to existing docstrings
- Added
PrivexBaseCase
andenv_bool
to the docs
Unit Testing
- Refactored various attributes in
test.py
into the base classPrivexBaseClass
- Added example to the PyDoc in
tests.py
showing how to run tests withpytest
- Wrote new unit tests:
test_kval_custom_clean
- Validates thatparse_keyval
works properly with customvalsplit
/csvsplit
test_kval_custom_spaced
- Validates thatparse_keyval
works properly with space padded values and customvalsplit
/csvsplit
test_env_nonexist_bool
,test_env_bool_true
,test_env_bool_false
- Validate that the newenv_bool
function returns the correct values.