Skip to content

Commit

Permalink
Updated README and CHANGES
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Dec 21, 2021
1 parent 40a4a02 commit e089a84
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 6 deletions.
8 changes: 7 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ mdform Changelog
0.6 (unreleased)
----------------

- Nothing changed yet.
- Fixed bug in FloatField defining min, max or step.
- Changed FloatField representation to #.#f[min:max:step]
(notice the trailing f).
- Added DecimalField with representation #.#[min:max:step:places].
- Added tests for Fields.
- Fixed parsing bug in RadioField / CheckBoxField for labels with
more than 1 letter.


0.5.1 (2021-12-16)
Expand Down
42 changes: 37 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,21 @@ Float fields (FloatField)

.. code-block:: text
value = #.#
value = #.#f
or:

.. code-block:: text
value = #.#[0:2:0.5]
value = #.#f[0:2:0.5]
Exactly 3 numeral will be matched. Any more will be handled as standard directives.
Exactly 3 numbers will be matched. Any more will be handled as standard directives.

Customizing:

.. code-block:: text
value = #.#[range]
value = #.#f[range]
The `range` is parsed like a numpy range.

Expand All @@ -222,6 +222,37 @@ Specific field attributes:
- step : float or None (default)


Decimal fields (DecimalField)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: text
value = #.#
or:

.. code-block:: text
value = #.#[0:2:0.5:1]
Exactly 4 numbers will be matched. Any more will be handled as standard directives.

Customizing:

.. code-block:: text
value = #.#[range:places]
The `range` is parsed like a numpy range. The last (fourth position)
is always the place

Specific field attributes:

- min : float or None (default)
- max : float or None (default)
- step : float or None (default)
- step : int (default = 2)

Text area (TextAreaField)
~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -458,7 +489,8 @@ Syntax summary
Specific fields:
- StringField ___[length] (length is optional)
- IntegerField ###[min:max:step] (min, max, step are optional)
- FloatField #.#[min:max:step] (min, max, step are optional)
- DecimalField #.#[min:max:step:places] (min, max, step, places are optional)
- FloatField #.#f[min:max:step] (min, max, step are optional)
- TextAreaField AAA[length] (length is optional)
- DateField d/m/y
- TimeField hh:mm
Expand Down

0 comments on commit e089a84

Please sign in to comment.