<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pint.git/pint/errors.py, branch master</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>Python's 3.9 compatible typing annotations</title>
<updated>2023-05-14T21:46:01+00:00</updated>
<author>
<name>Hernan Grecco</name>
<email>hgrecco@gmail.com</email>
</author>
<published>2023-05-14T21:46:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=499cce40459bfd8cdadbad46ad2e1139f4f873fe'/>
<id>499cce40459bfd8cdadbad46ad2e1139f4f873fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Typing related fixes</title>
<updated>2023-05-09T22:45:34+00:00</updated>
<author>
<name>Hernan Grecco</name>
<email>hgrecco@gmail.com</email>
</author>
<published>2023-05-09T22:45:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=e5c8b03a02e650134d6139ad38305797a2c962c8'/>
<id>e5c8b03a02e650134d6139ad38305797a2c962c8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Typing improvements</title>
<updated>2023-05-01T22:12:18+00:00</updated>
<author>
<name>Hernan Grecco</name>
<email>hgrecco@gmail.com</email>
</author>
<published>2023-05-01T13:00:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=d0442e776bff3053ef900143cd64facf173e1650'/>
<id>d0442e776bff3053ef900143cd64facf173e1650</id>
<content type='text'>
While there is still a lot of work to do (mainly in Registry, Quantity, Unit),
this large PR makes several changes all around the code. There has not been
any intended functional change, but certain typing improvements required
code minor code refactoring to streamline input and output types of functions.

An important experimental idea is the PintScalar and PintArray protocols,
and Magnitude type. This is to overcome the lack of a proper numerical
hierarchy in Python.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While there is still a lot of work to do (mainly in Registry, Quantity, Unit),
this large PR makes several changes all around the code. There has not been
any intended functional change, but certain typing improvements required
code minor code refactoring to streamline input and output types of functions.

An important experimental idea is the PintScalar and PintArray protocols,
and Magnitude type. This is to overcome the lack of a proper numerical
hierarchy in Python.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into fix-nonmult-doc</title>
<updated>2023-04-25T03:09:01+00:00</updated>
<author>
<name>Hernan Grecco</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2023-04-25T03:09:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=0a44bd39a956fae90a0237511433a34f21652eac'/>
<id>0a44bd39a956fae90a0237511433a34f21652eac</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Run pre-commit run --all-files . Mostly removed empty lines</title>
<updated>2023-04-25T00:16:13+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2023-04-25T00:16:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=bd935fd679d642758e88f23ed42d528f7399da6e'/>
<id>bd935fd679d642758e88f23ed42d528f7399da6e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update error URLs for log / offset units.</title>
<updated>2023-03-20T14:07:06+00:00</updated>
<author>
<name>Constantine Evans</name>
<email>const@costi.eu</email>
</author>
<published>2023-03-20T14:03:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=5a7d03b4f73490f91e25382d49d20b8e8bb77141'/>
<id>5a7d03b4f73490f91e25382d49d20b8e8bb77141</id>
<content type='text'>
Log / offset unit documentation changed location, making the URLs shown
in  error message no longer valid.  In addition, the two are on separate
pages in the most recent documentation.  This commit updates the URLs.
It also, as it seems most likely to be stably useful for users, points
to the latest stable documentation, rather than the latest dev version.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Log / offset unit documentation changed location, making the URLs shown
in  error message no longer valid.  In addition, the two are on separate
pages in the most recent documentation.  This commit updates the URLs.
It also, as it seems most likely to be stably useful for users, points
to the latest stable documentation, rather than the latest dev version.
</pre>
</div>
</content>
</entry>
<entry>
<title>Using frozen=False in errors to avoid problems with dask</title>
<updated>2022-10-13T01:28:51+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2022-10-13T01:28:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=08b9807e5e197b7b94bcad00585f0aaa3b5fe19e'/>
<id>08b9807e5e197b7b94bcad00585f0aaa3b5fe19e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Final step to split the registry from the parser</title>
<updated>2022-09-30T03:06:28+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2022-08-07T23:22:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=e83491c69449e4864c4e49a2d28ffbace019dacb'/>
<id>e83491c69449e4864c4e49a2d28ffbace019dacb</id>
<content type='text'>
Overview:
- All the code in facets is now independent of the definition textual format.
  In particular, defintions such as UnitDefinition, ContextDefinition an so on
  cannot be built directly from a string.
  (some functions are kept only temporarily to simplify but transition)
  Building Definition objects from string requires a parser that emits them.
- The standart pint format is implemented in delegates/txt_parser
  using flexparser. Briefly each single line statement is mapped to
  a ParsedStatement class and each larger construct to a Block class.
- The registry then has an adder function that takes a definition an
  incorporate it into the registry.

A few nice features of this approach:
1. The Definition objects are standalone public objects,
   you can now build them in a programatic way and incorporate
   them to the registry using the define function that will
   dispatch to the correct adder:

      &gt;&gt;&gt; new_unit = UnitDefintion( ....)
      &gt;&gt;&gt; ureg.define(new_unit)  # might be called add in the future

   No more being forced to use string definitions
   (but you can still use them if you want)

2. Composition over inheritance. The Registry does not know how to
   parse a definition, but it delegates this to another class which
   can be changed. This makes it very easy to write another parser
   (faster, simpler) o try out a completely different file format.

3. Error messages can be more meaningful.

Backwards incompatible changes
- is_base parameter Definitions is not needed any more. It is
  now computed automatically leading to a leaner experience and
  also avoiding incompatible states
- alias for dimensionality has been removed (for now at least)
  The only one defined was speed as an alias of velocity.
- (Context|Group|System).from_lines and Definition.from string
  have been rewritten in terms of the new parser.
  But will be likely removed in the future
- Changing non_int_type is not possible after registry has been
  created
- load_definition raises FileNotFoundError instead of a generic exception
  if the file was not found
- the string representation of several definitions is now
  not so user friendly terms of the new parser.
  But will be likely removed in the future
- Changing non_int_type is not possible after registry has been
  created
- load_definition raises FileNotFoundError instead of a generic exception
  if the file was not found
- the string representation of several definitions is now
  not so user friendly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Overview:
- All the code in facets is now independent of the definition textual format.
  In particular, defintions such as UnitDefinition, ContextDefinition an so on
  cannot be built directly from a string.
  (some functions are kept only temporarily to simplify but transition)
  Building Definition objects from string requires a parser that emits them.
- The standart pint format is implemented in delegates/txt_parser
  using flexparser. Briefly each single line statement is mapped to
  a ParsedStatement class and each larger construct to a Block class.
- The registry then has an adder function that takes a definition an
  incorporate it into the registry.

A few nice features of this approach:
1. The Definition objects are standalone public objects,
   you can now build them in a programatic way and incorporate
   them to the registry using the define function that will
   dispatch to the correct adder:

      &gt;&gt;&gt; new_unit = UnitDefintion( ....)
      &gt;&gt;&gt; ureg.define(new_unit)  # might be called add in the future

   No more being forced to use string definitions
   (but you can still use them if you want)

2. Composition over inheritance. The Registry does not know how to
   parse a definition, but it delegates this to another class which
   can be changed. This makes it very easy to write another parser
   (faster, simpler) o try out a completely different file format.

3. Error messages can be more meaningful.

Backwards incompatible changes
- is_base parameter Definitions is not needed any more. It is
  now computed automatically leading to a leaner experience and
  also avoiding incompatible states
- alias for dimensionality has been removed (for now at least)
  The only one defined was speed as an alias of velocity.
- (Context|Group|System).from_lines and Definition.from string
  have been rewritten in terms of the new parser.
  But will be likely removed in the future
- Changing non_int_type is not possible after registry has been
  created
- load_definition raises FileNotFoundError instead of a generic exception
  if the file was not found
- the string representation of several definitions is now
  not so user friendly terms of the new parser.
  But will be likely removed in the future
- Changing non_int_type is not possible after registry has been
  created
- load_definition raises FileNotFoundError instead of a generic exception
  if the file was not found
- the string representation of several definitions is now
  not so user friendly.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved type checking consistency</title>
<updated>2022-05-07T21:36:27+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2022-04-30T03:00:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=d77a96655c2d2e8f877f9acbad39c409425df6c2'/>
<id>d77a96655c2d2e8f877f9acbad39c409425df6c2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add root exception for all pint errors</title>
<updated>2021-05-28T14:56:24+00:00</updated>
<author>
<name>Clemens Wolff</name>
<email>clemens@justamouse.com</email>
</author>
<published>2021-05-28T14:54:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=5a464de530817cb71ac760be236201643c9410c4'/>
<id>5a464de530817cb71ac760be236201643c9410c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
