<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pint.git/pint/_vendor/flexparser.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>Pull flexparser.py from https://github.com/hgrecco/flexparser</title>
<updated>2022-10-26T12:54:17+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2022-10-26T12:48:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=1fc89cd3f0df780df78dd2c2b242e730abc93e62'/>
<id>1fc89cd3f0df780df78dd2c2b242e730abc93e62</id>
<content type='text'>
66b1338ccd0f1b6e50711e86a22718c7c8474516
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
66b1338ccd0f1b6e50711e86a22718c7c8474516
</pre>
</div>
</content>
</entry>
<entry>
<title>Pull flexparser.py from https://github.com/hgrecco/flexparser</title>
<updated>2022-10-25T13:36:53+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2022-10-25T13:36:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=2d8bfcd44e60e7c6d9f7bf9b4ae4dd1cb12e464d'/>
<id>2d8bfcd44e60e7c6d9f7bf9b4ae4dd1cb12e464d</id>
<content type='text'>
49e5c1154dd54640fc7fb7852b73d8e69407e684
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
49e5c1154dd54640fc7fb7852b73d8e69407e684
</pre>
</div>
</content>
</entry>
<entry>
<title>Pull flexparser.py 0.2 from https://github.com/hgrecco/flexparser</title>
<updated>2022-09-30T03:06:28+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2022-09-30T02:55:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=cf2c153dc854a1f80b3d4a20b7c67ad84ab9bc08'/>
<id>cf2c153dc854a1f80b3d4a20b7c67ad84ab9bc08</id>
<content type='text'>
7fab34c1a0365060f0be10eae1cd119ab6c30a72
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
7fab34c1a0365060f0be10eae1cd119ab6c30a72
</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>
</feed>
