<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pint.git/pint/testsuite/test_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>Run refurb --python-version 3.9 in pint/testsuite</title>
<updated>2023-04-29T23:36:04+00:00</updated>
<author>
<name>Hernan Grecco</name>
<email>hgrecco@gmail.com</email>
</author>
<published>2023-04-29T23:36:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=10a2311992a3ad89b9968cd102edb67646a84412'/>
<id>10a2311992a3ad89b9968cd102edb67646a84412</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>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>
<entry>
<title>Migration of all tests to pytest</title>
<updated>2021-01-10T06:58:32+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2021-01-08T23:20:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=659f6304d0054c844c3347af9df6dffa14cb7f9f'/>
<id>659f6304d0054c844c3347af9df6dffa14cb7f9f</id>
<content type='text'>
The intento of this large commit is to move away from unittest
into pytest.

To speed-up migration we made certain choices that might
need to be revisted in the future:
- use pytest-subtests to replace unittest subtest infrastructure
  A lot of this might be better using parametrize
- While we have removed certain classes and flatten them to
  functions, some were kept for no particular reason
  (rewriting the QuantityTestCase base class)
- We have created some fixtures but not optimized.
  Feature optimization (i.e. using global registries for certain
  tests might speed up testing as it will void constructing
  the registry over and over)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The intento of this large commit is to move away from unittest
into pytest.

To speed-up migration we made certain choices that might
need to be revisted in the future:
- use pytest-subtests to replace unittest subtest infrastructure
  A lot of this might be better using parametrize
- While we have removed certain classes and flatten them to
  functions, some were kept for no particular reason
  (rewriting the QuantityTestCase base class)
- We have created some fixtures but not optimized.
  Feature optimization (i.e. using global registries for certain
  tests might speed up testing as it will void constructing
  the registry over and over)
</pre>
</div>
</content>
</entry>
<entry>
<title>Corrects typo: decibel, not decibell (as pointed out by @terikin)</title>
<updated>2020-08-25T09:58:04+00:00</updated>
<author>
<name>signor82</name>
<email>Giorgio.Signorello@imec.be</email>
</author>
<published>2020-08-25T09:58:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=ef28ffcc5fbe8aae9d86d0a16a522b746bff9d0e'/>
<id>ef28ffcc5fbe8aae9d86d0a16a522b746bff9d0e</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>Support pickle protocol 0/1</title>
<updated>2020-02-28T14:37:13+00:00</updated>
<author>
<name>Guido Imperiale</name>
<email>crusaderky@gmail.com</email>
</author>
<published>2020-02-28T10:57:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=52dcebe63a454bafc489379fa164ac1cd574263e'/>
<id>52dcebe63a454bafc489379fa164ac1cd574263e</id>
<content type='text'>
More tests


CHANGES


Support pickle protocol 0/1


Polish

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
More tests


CHANGES


Support pickle protocol 0/1


Polish

</pre>
</div>
</content>
</entry>
<entry>
<title>Gets test_errors compliant with isort</title>
<updated>2020-02-14T19:28:42+00:00</updated>
<author>
<name>5igno</name>
<email>signobox@gmail.com</email>
</author>
<published>2020-02-14T19:28:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=8352736a14ce688815217865d5a04b0a303974ee'/>
<id>8352736a14ce688815217865d5a04b0a303974ee</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implements Error for LogarithmicUnit computation</title>
<updated>2020-02-14T19:17:53+00:00</updated>
<author>
<name>5igno</name>
<email>signobox@gmail.com</email>
</author>
<published>2020-02-14T19:17:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=39202f8d02219b99c67e2df612d9d08a93235b8a'/>
<id>39202f8d02219b99c67e2df612d9d08a93235b8a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant encoding information (utf8 is the default)</title>
<updated>2019-12-13T14:33:44+00:00</updated>
<author>
<name>Guido Imperiale</name>
<email>crusaderky@gmail.com</email>
</author>
<published>2019-12-13T14:33:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=bf3beebc8c4a34a70c41d350b65d5b99efe97e62'/>
<id>bf3beebc8c4a34a70c41d350b65d5b99efe97e62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
