comparison piecrust/sources/interfaces.py @ 853:f070a4fc033c

core: Continue PieCrust3 refactor, simplify pages. The asset pipeline is still the only function pipeline at this point. * No more `QualifiedPage`, and several other pieces of code deleted. * Data providers are simpler and more focused. For instance, the page iterator doesn't try to support other types of items. * Route parameters are proper known source metadata to remove the confusion between the two. * Make the baker and pipeline more correctly manage records and record histories. * Add support for record collapsing and deleting stale outputs in the asset pipeline.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 21 May 2017 00:06:59 -0700
parents 4850f8c21b6e
children 86b684cc0551
comparison
equal deleted inserted replaced
852:4850f8c21b6e 853:f070a4fc033c
1
2
3 class IPaginationSource(object):
4 """ Defines the interface for a source that can be used as the data
5 for an iterator or a pagination.
6 """
7 def getItemsPerPage(self):
8 raise NotImplementedError()
9
10 def getSourceIterator(self):
11 raise NotImplementedError()
12
13 def getSorterIterator(self, it):
14 raise NotImplementedError()
15
16 def getTailIterator(self, it):
17 raise NotImplementedError()
18
19 def getSettingAccessor(self):
20 raise NotImplementedError()
21
22 1
23 class IPreparingSource(object): 2 class IPreparingSource(object):
24 """ Defines the interface for a source whose pages can be created by the 3 """ Defines the interface for a source whose pages can be created by the
25 `chef prepare` command. 4 `chef prepare` command.
26 """ 5 """