Resolve "Create node only from MaestroBase - support reading nodes into supplied model"
requested to merge 126-create-node-only-from-maestrobase-support-reading-nodes-into-supplied-model into dev
Overarching ideas:
- Generalize work done on nested nodes
- Harmonize models, so that all nodes created in database originate from python object inheriting from
MaestroBase
- Remove redundant or unused code
- Create a robust
MaestroBase
base model, with methods for getting nested properties/nodes
Together, this allowed for general create_node
/read_node
functions, which allows us to create and read arbitrary subgraphs (e.g. a workflow with jobs, workflow steps, and artefacts) with a single Pydantic model.
Removed:
- Unused/duplicated models in submodule
src/maestro/artefact/
- Function
neo4j.match_node_by_props
- replaced withread_node
- Function
queue.get_jobs
- only used in tests - Model
Jobs
- only used inqueue.get_jobs
- (Partial) Function
MessageWatcher.fetch_input
- now usesread_node
- Models
WorkflowStepModel
andWorkflowStepModelPayload
- renamedWorkflowStepDetails
->WorkflowStep
- Function
subscribers.fetch_artefact
- unused -
api.schemas
- no longer required, using models from models.py
Closes #126 (closed)
Edited by Øyvind Evju