<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pint.git/pint/definitions.py, branch develop</title>
<subtitle>github.com: hgrecco/pint.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/'/>
<entry>
<title>Add pint typing module</title>
<updated>2021-08-01T18:22:11+00:00</updated>
<author>
<name>Jules Chéron</name>
<email>jules.cheron@gmail.com</email>
</author>
<published>2021-05-22T21:03:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=c60e1af833391a60a82f3c47460fca899e220de5'/>
<id>c60e1af833391a60a82f3c47460fca899e220de5</id>
<content type='text'>
- Quantity as Generic class
- Add overloaded signature for __new__ Quantity
- Add typing module as private
- Add py.typed for PEP561 supports
- Add overloaded signature for __new__ Quantity
- Quantity as Generic class
- Add type hints throughout the project
- Add py.typed in package data in setup.cfg
- Add type hints for decorators
- Add type hints for public API of registry.py
- Add type hints for units.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Quantity as Generic class
- Add overloaded signature for __new__ Quantity
- Add typing module as private
- Add py.typed for PEP561 supports
- Add overloaded signature for __new__ Quantity
- Quantity as Generic class
- Add type hints throughout the project
- Add py.typed in package data in setup.cfg
- Add type hints for decorators
- Add type hints for public API of registry.py
- Add type hints for units.py
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos</title>
<updated>2021-01-08T20:12:35+00:00</updated>
<author>
<name>Miroslav Šedivý</name>
<email>6774676+eumiro@users.noreply.github.com</email>
</author>
<published>2021-01-08T20:04:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=32b6ef749695181c24540df13c46ed18f781b73e'/>
<id>32b6ef749695181c24540df13c46ed18f781b73e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Run linter on all files</title>
<updated>2021-01-07T05:25:28+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2021-01-07T05:25:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=a750205ae10c5c2c0247668279330f10659ed02b'/>
<id>a750205ae10c5c2c0247668279330f10659ed02b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into log-units WIP branch</title>
<updated>2020-07-15T19:00:47+00:00</updated>
<author>
<name>Clark Willison</name>
<email>clarkgwillison@gmail.com</email>
</author>
<published>2020-07-15T19:00:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=0cd5d5c1f45d652a693e1a221d0a125eece93c58'/>
<id>0cd5d5c1f45d652a693e1a221d0a125eece93c58</id>
<content type='text'>
fix merge conflicts with upstream master, and bring
this branch up-to-date with present work
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix merge conflicts with upstream master, and bring
this branch up-to-date with present work
</pre>
</div>
</content>
</entry>
<entry>
<title>fix doctest warnings, add some docstring sphinx formatting</title>
<updated>2020-06-17T08:27:20+00:00</updated>
<author>
<name>Clark Willison</name>
<email>clarkgwillison@gmail.com</email>
</author>
<published>2020-06-17T08:19:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=304b87dac78ad8d4ac126f0ae4f9d5e0727e0d0c'/>
<id>304b87dac78ad8d4ac126f0ae4f9d5e0727e0d0c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into _decimal</title>
<updated>2020-02-22T02:41:43+00:00</updated>
<author>
<name>Hernan Grecco</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2020-02-22T02:41:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=78b1e52958a326cba4983c3ef84016756274c92c'/>
<id>78b1e52958a326cba4983c3ef84016756274c92c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `ParsedDefinition` to `PreprocessedDefinition`</title>
<updated>2020-02-19T16:52:53+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2020-02-19T16:52:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=0b3e73694a4cc19184173589750d8184df766e81'/>
<id>0b3e73694a4cc19184173589750d8184df766e81</id>
<content type='text'>
Close #1010
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Close #1010
</pre>
</div>
</content>
</entry>
<entry>
<title>Exposes Definition's property is logaritmic</title>
<updated>2020-02-16T21:45:06+00:00</updated>
<author>
<name>5igno</name>
<email>signobox@gmail.com</email>
</author>
<published>2020-02-16T21:45:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=a53f89ca180418f0685a1c248b3ffe2eec67e2eb'/>
<id>a53f89ca180418f0685a1c248b3ffe2eec67e2eb</id>
<content type='text'>
A definition is logarithmic if its associated converter is logarithmic.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A definition is logarithmic if its associated converter is logarithmic.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implements UnitDefinition that uses LogConverter.</title>
<updated>2020-02-13T18:14:23+00:00</updated>
<author>
<name>5igno</name>
<email>signobox@gmail.com</email>
</author>
<published>2020-02-13T18:14:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=8e8530758ef5f3ef5400846a80ffe8314802b1d2'/>
<id>8e8530758ef5f3ef5400846a80ffe8314802b1d2</id>
<content type='text'>
Definition from string is split with one element, for compatibility with Log Units. Modifiers section is adapted to assing Logaritmic Converter
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Definition from string is split with one element, for compatibility with Log Units. Modifiers section is adapted to assing Logaritmic Converter
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for other numerical types at the registry level</title>
<updated>2020-01-22T07:13:56+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2020-01-22T07:04:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=032c6bd4e93f86046a702d6ff42afcf48d12e597'/>
<id>032c6bd4e93f86046a702d6ff42afcf48d12e597</id>
<content type='text'>
Until this commit, `int` and `float` were special types in Pint
(just as they are in Python). Numbers were parsed from strings
as int/float from the definition files and from user provided
strings; and exponents of units were also stored as int/float.

This commit change this by adding a new argument (`non_int_type`)
to classes and methods. It indicates how numeric values will be parsed
and defaulted. Any numerical class can be used such as `float` (default),
Decimal, Fraction.

This argument will be found in the following places
1. UnitRegistry: used for parsing the definition files and any
  value provided as a string.
2. UnitsContainer: used to compare equality with strings, multiply and
  divide by strings (which is equivalent to parse the string)
3. All methods OUTSIDE the UnitRegistry/Quantity that can parse
   strings have a `non_int_type` argument. (e.g. Definition.from_string)

Tests have been added for by duplicating most cases in `test_quantity.py`.
(Some tests have been deleted such as those dealing with numpy.)
The new file `test_non_int.py` run the tests for `Decimal`, `Fraction` and
`float` (which is redundant but is kept as a crosscheck for the implementation
of this testsuite)

BREAKING CHANGE: `use_decimal` is deprecated.
Use `non_int_type` keyword argument when instantiating the registry.
 &gt;&gt;&gt; from decimal import Decimal
 &gt;&gt;&gt; ureg = UnitRegistry(non_int_type=Decimal)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Until this commit, `int` and `float` were special types in Pint
(just as they are in Python). Numbers were parsed from strings
as int/float from the definition files and from user provided
strings; and exponents of units were also stored as int/float.

This commit change this by adding a new argument (`non_int_type`)
to classes and methods. It indicates how numeric values will be parsed
and defaulted. Any numerical class can be used such as `float` (default),
Decimal, Fraction.

This argument will be found in the following places
1. UnitRegistry: used for parsing the definition files and any
  value provided as a string.
2. UnitsContainer: used to compare equality with strings, multiply and
  divide by strings (which is equivalent to parse the string)
3. All methods OUTSIDE the UnitRegistry/Quantity that can parse
   strings have a `non_int_type` argument. (e.g. Definition.from_string)

Tests have been added for by duplicating most cases in `test_quantity.py`.
(Some tests have been deleted such as those dealing with numpy.)
The new file `test_non_int.py` run the tests for `Decimal`, `Fraction` and
`float` (which is redundant but is kept as a crosscheck for the implementation
of this testsuite)

BREAKING CHANGE: `use_decimal` is deprecated.
Use `non_int_type` keyword argument when instantiating the registry.
 &gt;&gt;&gt; from decimal import Decimal
 &gt;&gt;&gt; ureg = UnitRegistry(non_int_type=Decimal)
</pre>
</div>
</content>
</entry>
</feed>
