diff options
author | Luis Martinez | 2022-01-28 13:23:15 -0600 |
---|---|---|
committer | Luis Martinez | 2022-01-28 13:26:43 -0600 |
commit | 95fa9ab8214d625b2b12aac51a397476d1834b00 (patch) | |
tree | 43f082a88bf0565cd7a056422bc5af6a62599133 | |
download | aur-95fa9ab8214d625b2b12aac51a397476d1834b00.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | CHANGELOG.md | 170 | ||||
-rw-r--r-- | PKGBUILD | 31 |
3 files changed, 219 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f5035b718572 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = python-confu + pkgdesc = Configuration file validation and generation + pkgver = 1.8.0 + pkgrel = 1 + url = https://github.com/20c/confu + changelog = CHANGELOG.md + arch = any + license = Apache + checkdepends = python-pytest + checkdepends = python-click + makedepends = python-poetry-core + makedepends = python-build + makedepends = python-install + depends = python + source = python-confu-1.8.0.tar.gz::https://github.com/20c/confu/archive/1.8.0.tar.gz + sha256sums = e981f0f48374c01f2ffbfc0c043000a0168a6fce023c7068e594bf95f1b3647b + +pkgname = python-confu diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000000..88afcae6a68a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,170 @@ +# Changelog + + +## Unreleased + + +## 1.8.0 +### Added +- inet type `IpNetwork` +### Fixed +- collections.abc deprecation warning + + +## 1.7.1 +### Fixed +- mkdocs no longer a requirement for a normal installation of the package + + +## 1.7.0 +### Added +- `confu.util.SettingsManager`: scoped settings management with environment variable override support + + +## 1.6.1 +### Fixed +- version in pyproject.toml + + +## 1.6.0 +### Added +- Python 3.8 support (#33) +- Python 3.9 support (#41) +- `apply_argparse`: helper function to update Config object with output from parser (#31) +- `argparse_options`: `default_from_schema` keyword argument added (#31) +- Poetry added for dependency management (#39) +### Removed +- Python 3.5 support (#32) +- Python 3.4 support +- Python 2.7 support + + +## 1.5.0 +### Added +- Python 3.7 support (#29) +- `Directory Attribute`: `require_exist` argument (#28) +- `File Attribute`: `require_exist` argument (#25) +### Changed +- PyPI package renamed to `confu` +- `Directory Attribute`: expand user and make path absolute during validation (#27) +- `File Attribute`: expand user and make path absolute during validation (#26) + + +## 1.4.1 +### Fixed +- added missing docs files + + +## 1.4.0 +### Added +- `argparse_options`: `attributes` keyword argument added (#24) +- `click_options`: `attributes` keyword argument added (#24) +### Changed +- use pymdgen for automatic api docs (#22) + + +## 1.3.0 +### Added +- `Attribute`: `cli` argument can now be a function (#21) +### Fixed +- fix #23: better error handling in apply_defaults + + +## 1.2.0 +### Added +- `defaults` parameter for argparse_options and click_options (#20) +### Fixed +- `List` still requires name attribute on init (#17) + + +## 1.1.3 +### Fixed +- Fixed issue where `List` holding `Schema` type items would lose items to validation warnings (#18) + + +## 1.1.2 +### Fixed +- some attribute validators still have issues with a None default (#16) +- For string attributes a blank default value should infer blank=True (#15) + + +## 1.1.0 +### Fixed +- IPAddress field validation issue with blank=True (#13) +- Allow None as a default value (#14) +- Auto set attribute name if not specified (#12) +- added `valid` property to Config that will be true if config was validated without +- code cleanup +- test coverage to 91% +- updated outdated requirements to prepare for 1.0.0 release + + +## 1.0.0 + + +## 0.7.0 + + +## 0.6.0 +### Added +- `blank` argument for `Str` attribute - specifies whether value can be blank or not, defaults to `False` +### Fixed +- proxy schema needs to be able to apply defaults (#10) +- issue where list validation would sometimes lead to duplicate items added to the list +### Changed +- `Directory` attribute will forfeit validation if `blank` is `True` and value is `""` + + +## 0.5.2 +### Fixed +- recursive directory creation for Directory Attribute if `create` is specified + + +## 0.5.1 +### Fixed +- `apply_defaults` now properly works with nested items + + +## 0.5.0 +### Added +- `File` attribute +- `Email` attribute +- `Url` attribute +- `IpAddress` attribute +- `Schema` attribute now has an optional `item` argument that if set allows for validation of dicts with arbitrary keys. +- Support for ConfigParser instances in validate +### Changed +- schema moved to directory so it's easier to group and add new attributes going forward, imports remain unaffected. +- `validate` will now pass **kwargs on to `Schema.validate` +- Facsimile to Ctl + + +## 0.4.0 +### Added +- `ProxySchema` +- `apply_defaults` to apply schema defaults to a config dict +- `Config` object +### Fixed +- `Schema.walk` now triggers the callback before entering subschemas +### Changed +- Schema now extends Attribute and is now working on instances rather than classmethod based +- Attribute name is now optional when attribute is member of list +- renamed `ListAttribute` to `List` +- renamed `StringAttribute` to `Str` +- renamed `IntAttribute` to `Int` +- renamed `FloatAttribute` to `Float` +- renamed `BooleanAttribute` to `Bool` +- renamed `DirectoryAttribute` to `Directory` + + +## 0.3.0 +### Added +- py2.7 support +- DirectoryAttribute +- generator.generate shortcut +### Fixed +- validation: schema validation returning None value +- validation: warnings raised with the wrong exception type +- exceptions: can now have integers in config path (from list index for example) +### Changed +- renamed `UnicodeAttribute` to `StringAttribute` that is now looking for either string or unicode types during validation
\ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b633f2361545 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> + +pkgname=python-confu +pkgver=1.8.0 +pkgrel=1 +pkgdesc="Configuration file validation and generation" +arch=('any') +url="https://github.com/20c/confu" +license=('Apache') +depends=('python') +makedepends=('python-poetry-core' 'python-build' 'python-install') +checkdepends=('python-pytest' 'python-click') +changelog=CHANGELOG.md +source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz") +sha256sums=('e981f0f48374c01f2ffbfc0c043000a0168a6fce023c7068e594bf95f1b3647b') + +build() { + cd "confu-$pkgver" + python -m build --wheel --skip-dependency-check --no-isolation +} + +check() { + cd "confu-$pkgver" + PYTHONPATH=./src pytest -x +} + +package() { + export PYTHONHASHSEED=0 + cd "confu-$pkgver" + python -m install --optimize=1 --destdir="$pkgdir/" dist/*.whl +} |