A testing ground for Keg related code and ideas.
Project description
Keg Elements is a collection of helpers and base classes for building apps with Keg or Keg extensions.
A Simple Example
For a simple example and a checklist of sorts for app setup, see the Getting Started guide in the docs.
Development
To develop on this project, begin by running our tests:
git clone https://github.com/level12/keg-elements keg-elements-src cd keg-elements-src tox
You can then examine tox.ini for insights into our development process. In particular, we:
use
py.test
for testing (and coverage analysis)use
flake8
for linting
Preview Readme
When updating the readme, use restview --long-description
to preview changes.
Pre-commit Hooks
You should install the pre-commit hooks by running
pre-commit install
This will ensure that your code is ready for review.
Issues & Discussion
Please direct questions, comments, bugs, feature requests, etc. to: https://github.com/level12/keg-elements/issues
Links
Documentation: https://keg-elements.readthedocs.io/en/stable/index.html
Releases: https://pypi.org/project/KegElements/
Issue tracker: https://github.com/level12/keg-elements/issues
Keg framework: https://github.com/level12/keg
Questions & comments: http://groups.google.com/group/blazelibs
Changelog
0.12.0 released 2024-06-28
0.11.0 released 2024-01-16
use sentry SDK for cron monitor setup and check-ins (405f677)
0.10.0 released 2023-12-01
0.9.1 released 2023-05-22
support monitoring jobs with Sentry (8bd9cb5)
0.9.0 released 2023-03-03
0.8.0 released 2022-12-12
fix select2 inclusion in form view template, document template updates (d01f7dc)
support rendering WTForms form fields (e0e3136)
resolve radio ID duplication and error display in Bootstrap 4 (74b7215)
BC break change oid kwarg in MethodsMixin.edit to _oid (4d67937)
BC break replace testing_create with fake, for brevity (747d208)
drop remaining python 2 support and six usage (decd030)
add stable requirements set for CI (1fbcea4)
BC break drop tabindex explicit arguments from form macro templates (09c4e8b)
add generic form-view.html and grid-view.html templates (1eb8db2)
fix Bootstrap 4 usage for horizontal forms (57fc4ab)
build in datetime form controls helper, namespaced for keg-elements (d098f07)
change form-level error class used to one Bootstrap 4 will display (55b9c67)
allow passing name and/or id to form in form macro (fe1ac26)
enable skipped sqlite tests and fix session breakage (90e2d88)
add a form ident field to the keg-elements base form (941e4a7)
add query-level insert/update methods to supplement ORM-level add/edit (60fac30)
prevent select box choices filtered improperly when no query applied (aef1cf0)
handle SA ORM attributes and hybrid properties for relationship form fields (97244de)
resolve library warnings and deprecations (9ecb616)
0.7.2 released 2022-03-04
adjust form mixin interface to clarify methods related to forms and make overrides easier (2a326b5)
0.7.1 released 2022-03-04
add method errors out on invalid field name (9511f73)
0.7.0 released 2022-03-04
add base class/mixin for form views (fcf8f02)
multiselect field will not coerce every option to an object, performance issue (0ccd609)
edit method errors out on invalid field name (98ad0b0)
factor test column data skipping (639bcb8)
support SA column properties in test data generation (1148633)
support WTForms 3.0.0 with form-level validation errors, field flags changes (794ce75)
0.6.0 released 2021-09-10
Note: due to the form field description change listed below, JS popover usage from the previous UX can be removed from apps.
Move form field descriptions to be more visible (f7a287e)
Resolve jinja2 Markup deprecation (86cfe0e)
Adds column check to verify date/time defaults are not set to an instantiated value Fixes #149 (d8489d1)
Drop python 3.6 from testing, add 3.9 (93ee3df)
Support webgrid form posts in GridView (requires webgrid’s form args loader) (b945bb4)
0.5.30 released 2021-02-02
0.5.29 released 2021-01-29
Add RelationshipField and RelationshipMultipleField for generating select fields from ORM (8d90b5a)
Add form meta option include_required_foreign_keys for form generation (8d90b5a)
Add standard testing FormBase for field verification (2b0ee8a)
Allow model form subclasses to utilize the super’s FieldsMeta (84dcc1f)
Use blank FieldMeta object by default when no meta is given (2457605)
Provide a model mixin for generic id/value lookup tables (a392941)
Add testing_set_related entity method to wrap related object creation (e6fe3d9)
0.5.28 released 2020-11-13
0.5.27 released 2020-06-09
Properly handle missing or empty config keys in Sentry filtering (bfb413b)
0.5.26 released 2020-06-09
0.5.25 released 2020-05-12
0.5.24 released 2020-03-23
select all/none feature for MultiCheckbox fields (vanilla JS) (7a727b6)
0.5.23 released 2020-03-20
0.5.22 released 2020-02-27
Add missing class to checkbox input (4b4e44c)
0.5.21 released 2020-02-21
0.5.20 released 2020-02-03
Fix BS4 Field Description (a9d3479)
0.5.19 released 2019-11-19
Adds a U.S. state select field (3abd696)
Add type hint widget for use with form text inputs (fe089e0)
Use recommended classes and tag layout for rendering bootstrap 4 checkboxes (d20b084)
Add Python 3.8 support and drop support for Python 3.5 (d87b2db)
Exclude create/update timestamp fields from model form generation by default (012fe38)
0.5.18 released 2019-08-05
Prevent double rendering of hidden form inputs in template macros (e0b47dc)
0.5.17 released 2019-07-29
0.5.16 released 2019-07-09
0.5.15 released 2019-07-02
0.5.14 released 2019-06-28
0.5.13 released 2019-06-17
Add additional testing helpers and fix float field form generation issue (4b725fd)
0.5.12 released 2019-02-07
Fix Deprecation Warnings and Remove Wheelhouse (7af6f55)
0.5.11 released 2018-11-20
Switch yield tests to loops to resolve pytest warning (a3e1b5c)
0.5.10 released 2018-11-13
0.5.9 released 2018-09-19
FEAT: Add additional metadata to the results of Form.fields_todict (2f863f1)
0.5.8 released 2018-07-19
Merge pull request #82 from level12/add-alphanumeric-validator (bbf43ec)
0.5.7 released 2018-06-19
Merge pull request #80 from level12/check-for-missing-app-ctx (1d0f3d8)
0.5.6 released 2018-04-30
0.5.5 released 2018-04-25
FEAT: Add custom Sentry client to filter out flask config object from reports (927e012)
0.5.4 released 2017-08-08
0.5.3 - 2017-04-26
FEAT: Add DontCare for Easy Testing (28643d6)
0.5.2 - 2017-03-23
0.5.0 - 2016-12-19
0.4.2 - 2016-11-11
0.4.1 - 2016-10-19
Add unique form validator (a0c7447)
0.4.0 - 2016-09-08
FEATURE: Port MethodsMixin with a number of helpful functions when working with SQLAlchemy ORM entities. (GH-49, GH-51)
FEATURE: Add a new TimeZone Column. (GH-50)
MAINTENANCE: Provide better testing support for polymorphic SQLAlchemy ORM entities. (GH-47)
BUG: Fix descriptions when implicitly rendering checkboxes (GH-48)
0.3.2 - 2016-08-03
Support
dirty_check
flag on form objects (GH-46)
0.3.1
Allow FieldMeta to override default widget and add extra validators (GH-38)
Allow customization of readonly and disabled attributes on input, select, and radio fields (GH-37)
Improve the logic for when to default a form field to RequiredBoolRadioField (GH-36)
Upgrades to the CI Environment
0.3.0
Allow static renders to be configured with custom macros. (GH-34)
Synchronize static templates with dynamic templates. (GH-31)
You can now give a field a description with a string or callback. (GH-23, GH-22)
Introduced a RequiredBoolRadioField for use with boolean columns. (GH-25)
Support randomly filling EmailTypes. (GH-24)
Support additional parameters for randomizing integers. (GH-19)
testing_create will randomly select a boolean value for SQLAlchemy boolean fields. (GH-28)
We now have a working CI. (GH-27)
Constraint tests will fail if all fields are not covered. (GH-21)
Introduced a new form-upload macro. (GH-18)
Static render now uses element.data unless it is a SelectField (GH-16)
MethodsMixin has a new to_dict method. (d83d93f)
MethodsMixin has a new ensure method. (e5687ed)
Fix bug where static renders would not output the label. (GH-33)
Fix property names when using automatic test cases. (GH-29)
Fix issue where we wouldn’t use a consistent json parser. (GH-13)
Fix a bug where polymorphic columns are included in testing_create. (147c23)
development version: 2015-07-28
Add db.mixins with DefaultColsMixin (id, Arrow lib UTC timestamps) and MethodsMixin (incomplete).
Some MethodsMixin methods now have support for commit/flush parameters.
Add .testing:EntityBase which uses named tuples to declare the checks needed and adds some additional logic.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file KegElements-0.12.0.tar.gz
.
File metadata
- Download URL: KegElements-0.12.0.tar.gz
- Upload date:
- Size: 94.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58e6d9b83f3ead3c867a8feed57da8a35492352fa58ad20afdafbd2fe39996b9 |
|
MD5 | 2e27be6994c1cddc9a70cc7b8f9f941f |
|
BLAKE2b-256 | 42938d0a30f296f9e3c414df0527193531f51516e94adc5e3ff4598f1fadf6a6 |
File details
Details for the file KegElements-0.12.0-py2.py3-none-any.whl
.
File metadata
- Download URL: KegElements-0.12.0-py2.py3-none-any.whl
- Upload date:
- Size: 101.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5e5920b7f7962d3b6bc21434195b0107997ba473738965e77d947be85c42c07 |
|
MD5 | a2a10814085788d2f3de3761f18fe7ab |
|
BLAKE2b-256 | 148612baa36e069cd7fc96216ad7c527685e0d3b7a77a585863de446600a05d4 |