summaryrefslogtreecommitdiff
path: root/src/buildstream/_projectrefs.py
Commit message (Collapse)AuthorAgeFilesLines
* _yaml: Split Node-related parts into 'node.pyx'Benjamin Schubert2019-07-151-1/+2
| | | | | This makes the 'Node' API public, and available for use directly for plugins.
* _yaml: Mark new_syntethic_file as BuildStream privateBenjamin Schubert2019-07-151-1/+1
|
* _yaml: Mark attributes in ProvenanceInformation as Buildstream-privateBenjamin Schubert2019-07-151-1/+1
| | | | | Users should not need to get access to any of those, and should only need access to the ProvenanceInformation to print it.
* _yaml: Remove 'node_get_provenance' and add 'Node.get_provenance'Benjamin Schubert2019-07-151-1/+1
| | | | | | | | This replaces the helper method by adding a 'get_provenance' on the node directly - Adapt all call sites - Delay getting provenance wherever possible without major refactor
* _yaml: Remove 'node_validate' and replace by 'MappingNode.validate_keys'Benjamin Schubert2019-07-151-1/+1
| | | | - adapt all call sites to use the new API
* _yaml: Create 'from_dict' on Node and remove node creation methodsBenjamin Schubert2019-07-151-1/+1
| | | | | | | Using 'Node.from_dict({})' can replace new_empty_node, and the rest is not needed anymore. - Adapt all call sites
* _yaml: Remove 'node_extend_list' and add 'SequenceNode.append'Benjamin Schubert2019-07-151-9/+8
| | | | | | | There was a single place using 'node_extend_list', which we can replace more easily with 'SequenceNode.append'. Also rewrite _projectrefs.py:_lookup to use the new API more effectively
* _yaml: Move 'node_final_assertions' to 'Node._assert_fully_composited'Benjamin Schubert2019-07-151-1/+1
|
* _yaml: Remove 'node_set'. Now use __setitem__Benjamin Schubert2019-07-151-3/+3
| | | | | | - Implement __setitem__ on 'MappingNode' - Implement __setitem__ on 'SequenceNode' - Adapt all call sites to use the new calling way.
* _yaml: Remove 'node_get' and migrate all remaining calls to new APIBenjamin Schubert2019-07-151-1/+1
|
* _yaml: Introduce 'get_sequence()' and 'sequence_at()'/'mapping_at()'Benjamin Schubert2019-07-151-3/+3
| | | | | | | | | - 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.
* _yaml: add 'get_mapping()' to MappingNodeBenjamin Schubert2019-07-151-2/+2
| | | | | | | | 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.
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-211-0/+155
This was discussed in #1008. Fixes #1009.