Closed perdasilva closed 8 months ago
I looked at the example. I wonder if we can separate the interface used by the solverAPI and interface provided by the entity source (deppysource)? The Get, Filter, Groupby and sort are not source type dependent once the entities from the deppy source are cached. So these functions can be provided in the interface used by the solverAPI without the entitysource interface implementing it. So the entity source just need to provide the sync function. WDYT @perdasilva
I put the entitysource interface in the source
package and also made a use of the EntityUniverse
. But it causes import cycle not allowed error. So I had to make the entitysource
pakage out of the source pakcage. If the EntityUniverse
is in the source
package, I can put the entitysource into the source
package, too. @perdasilva WDYT
This issue has become stale because it has been open 60 days with no activity. The maintainers of this repo will remove this label during issue triage or it will be removed automatically after an update. Adding the lifecycle/frozen
label will cause this issue to ignore lifecycle events.
Obsolete, closing
User Story
As a user I would like to create to provide content to my solver from different sources (e.g. service, file, hard-coded, etc.)
Summary / Background
Deppy is a framework for creating constraint solvers over "entities". It is composed of the following components:
Entity
: a structure with an unique string id and a set of properties (map[string]string)EntitySource
: an interface to a source of entities. It implements an entity query interface that allows consumers to find entities that contain certain properties, sort the result rest on an arbitrary basis, and also group entities by an arbitrary key function (e.g.GroupBy(func(entity *Entity) string) map[string][]Entity)
)ConstraintGenerator
: an interface that can produce []solver.Variable given an entity query interface (something that can query over a set of EntitySources`)Acceptance Criteria
GroupBy(func(entity *Entity) string) map[string][]Entity)
)Scenarios
Assumptions
Links (docs, drawings, designs, etc)
Deppy-as-a-Framework
Dependencies
Definition of Done