<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/buildstream.git/src/buildstream/_gitsourcebase.py, branch update_committers</title>
<subtitle>gitlab.com: buildstream/buildstream.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/'/>
<entry>
<title>node: Add 'as_enum' on ScalarNode and 'get_enum' helper on MappingNode</title>
<updated>2019-07-29T09:42:02+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>contact@benschubert.me</email>
</author>
<published>2019-07-26T14:30:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=0f074dd37524047cb53214be5c0f10436d3abb1d'/>
<id>0f074dd37524047cb53214be5c0f10436d3abb1d</id>
<content type='text'>
This adds a method to ensure that a value is from a set of valid values
and raises an error message accordingly.

- Define Enum types for each of the relevant cases
- Adapt call places that were doing such things manually
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a method to ensure that a value is from a set of valid values
and raises an error message accordingly.

- Define Enum types for each of the relevant cases
- Adapt call places that were doing such things manually
</pre>
</div>
</content>
</entry>
<entry>
<title>plugin: remove 'node_get_provenance', use the Node API directly</title>
<updated>2019-07-15T14:14:03+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>contact@benschubert.me</email>
</author>
<published>2019-07-08T18:15:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=61ea58e52b75802ea0e4b760563a50149c905b31'/>
<id>61ea58e52b75802ea0e4b760563a50149c905b31</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>_yaml: Remove 'node_validate' and replace by 'MappingNode.validate_keys'</title>
<updated>2019-07-15T14:14:03+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>ben.c.schubert@gmail.com</email>
</author>
<published>2019-07-03T17:01:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=8c9f41922ad16f8a031ac612bb35e493e8581380'/>
<id>8c9f41922ad16f8a031ac612bb35e493e8581380</id>
<content type='text'>
- adapt all call sites to use the new API
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- adapt all call sites to use the new API
</pre>
</div>
</content>
</entry>
<entry>
<title>_yaml: Remove 'node_keys' and add 'MappingNode.keys' to replace it</title>
<updated>2019-07-15T14:14:03+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>contact@benschubert.me</email>
</author>
<published>2019-06-25T19:00:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=ed2dde6110a5f9087ff3596df9d86ba5468dcac8'/>
<id>ed2dde6110a5f9087ff3596df9d86ba5468dcac8</id>
<content type='text'>
This mimics the dict.keys() method but returns a list instead of a
dict_keys, for cython performance reasons
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This mimics the dict.keys() method but returns a list instead of a
dict_keys, for cython performance reasons
</pre>
</div>
</content>
</entry>
<entry>
<title>_yaml: Introduce 'get_sequence()' and 'sequence_at()'/'mapping_at()'</title>
<updated>2019-07-15T14:14:02+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>ben.c.schubert@gmail.com</email>
</author>
<published>2019-06-11T17:19:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=7298136642010d4e02a607f4275ffe3ad5657a14'/>
<id>7298136642010d4e02a607f4275ffe3ad5657a14</id>
<content type='text'>
- Adding 'get_sequence' on MappingNode to access sequences in a mapping
- Adding 'sequence_at' on SequenceNode to access sequences in a sequence
- Adding 'mapping_at' on SequenceNode to access mappings in a sequence

Using "*_at" in sequences allows us to quickly understand if we are
dealing with a sequence or a mapping.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Adding 'get_sequence' on MappingNode to access sequences in a mapping
- Adding 'sequence_at' on SequenceNode to access sequences in a sequence
- Adding 'mapping_at' on SequenceNode to access mappings in a sequence

Using "*_at" in sequences allows us to quickly understand if we are
dealing with a sequence or a mapping.
</pre>
</div>
</content>
</entry>
<entry>
<title>_yaml: Add 'as_bool()' and 'is_none()' to ScalarNode</title>
<updated>2019-07-15T14:14:02+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>ben.c.schubert@gmail.com</email>
</author>
<published>2019-06-10T13:20:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=d14b809cc7b56b7be9e3e40c2e12e8f7245ba680'/>
<id>d14b809cc7b56b7be9e3e40c2e12e8f7245ba680</id>
<content type='text'>
- 'as_bool()' casts a ScalarNode into a boolean, understanding both
  'True' and 'False' as truthy-falsy values, as per node_get(type=bool)
  behavior
- 'is_none()' allwos checking whether the scalar node contains a 'None'
  value. Since 'None' cannot be used when working with booleans, we need
  to have a way of checking for 'None' when we actually need the
  information of whether the value is unset.
- Adapt all call places to use the new API
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 'as_bool()' casts a ScalarNode into a boolean, understanding both
  'True' and 'False' as truthy-falsy values, as per node_get(type=bool)
  behavior
- 'is_none()' allwos checking whether the scalar node contains a 'None'
  value. Since 'None' cannot be used when working with booleans, we need
  to have a way of checking for 'None' when we actually need the
  information of whether the value is unset.
- Adapt all call places to use the new API
</pre>
</div>
</content>
</entry>
<entry>
<title>_yaml: Add 'as_str()' on ScalarNode and 'get_scalar()' on MappingNode</title>
<updated>2019-07-15T14:14:02+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>contact@benschubert.me</email>
</author>
<published>2019-06-10T06:51:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=38671fb53f4522d046bed94699db8cc344ac2862'/>
<id>38671fb53f4522d046bed94699db8cc344ac2862</id>
<content type='text'>
- 'get_scalar()' allows retrieving a scalar node from a mapping.
- 'as_str()' casts a ScalarNode into a string (thus removing the node
  information).

Both together, those replace 'node_get(mapping, key, type=str)' but
also allow retrieving the 'Node' itself, which will allow in the future
lazier provenance computation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 'get_scalar()' allows retrieving a scalar node from a mapping.
- 'as_str()' casts a ScalarNode into a string (thus removing the node
  information).

Both together, those replace 'node_get(mapping, key, type=str)' but
also allow retrieving the 'Node' itself, which will allow in the future
lazier provenance computation.
</pre>
</div>
</content>
</entry>
<entry>
<title>_yaml: add 'get_mapping()' to MappingNode</title>
<updated>2019-07-15T14:14:02+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>contact@benschubert.me</email>
</author>
<published>2019-06-09T13:22:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=fcef3658433f74a2f396ed353bb3534f0001f3d8'/>
<id>fcef3658433f74a2f396ed353bb3534f0001f3d8</id>
<content type='text'>
This allows to get a mapping node from another 'MappingNode',
replacing 'node_get(my_mapping, key, type=dict)'

Also changes all places where 'node_get' was called like that by
the new API.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows to get a mapping node from another 'MappingNode',
replacing 'node_get(my_mapping, key, type=dict)'

Also changes all places where 'node_get' was called like that by
the new API.
</pre>
</div>
</content>
</entry>
<entry>
<title>_gitsourcebase: ignore or fix arguments-differ err</title>
<updated>2019-06-18T09:45:00+00:00</updated>
<author>
<name>Angelos Evripiotis</name>
<email>jevripiotis@bloomberg.net</email>
</author>
<published>2019-06-06T16:40:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=f1f6a5a6e09e275566bf56f4728826844b38dd47'/>
<id>f1f6a5a6e09e275566bf56f4728826844b38dd47</id>
<content type='text'>
PyLint helpfully points out that _GitMirror.fetch() does not match
SourceFetcher.fetch() - it is missing the *kwargs argument. The same for
_GitSourceBase.track().

Move towards being able to enable the 'arguments-differ' error faster
by side-stepping the class design debate and ignoring the error for now.

Change _GitSourceBase.set_ref() argument names to match
Source.set_ref().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyLint helpfully points out that _GitMirror.fetch() does not match
SourceFetcher.fetch() - it is missing the *kwargs argument. The same for
_GitSourceBase.track().

Move towards being able to enable the 'arguments-differ' error faster
by side-stepping the class design debate and ignoring the error for now.

Change _GitSourceBase.set_ref() argument names to match
Source.set_ref().
</pre>
</div>
</content>
</entry>
<entry>
<title>_yaml.pyx: Forbid expected_type=Mapping, and remove isinstance check</title>
<updated>2019-06-03T14:12:36+00:00</updated>
<author>
<name>Benjamin Schubert</name>
<email>ben.c.schubert@gmail.com</email>
</author>
<published>2019-06-03T13:34:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=49262bda8e5bc3a1886256a848618ae22229135e'/>
<id>49262bda8e5bc3a1886256a848618ae22229135e</id>
<content type='text'>
Calls to `isinstance` can be particularily costly. Using type() is
much faster. The only known case where the `isinstance` was useful
is for dictionnaries where we would ask for a 'Mapping' instead.

Disallowing 'Mapping' for expected_type considerably speeds up the
calls to this functions.

Also add into NEWS
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calls to `isinstance` can be particularily costly. Using type() is
much faster. The only known case where the `isinstance` was useful
is for dictionnaries where we would ask for a 'Mapping' instead.

Disallowing 'Mapping' for expected_type considerably speeds up the
calls to this functions.

Also add into NEWS
</pre>
</div>
</content>
</entry>
</feed>
