Skip to content

Resolve "Create node only from MaestroBase - support reading nodes into supplied model"

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 with read_node
  • Function queue.get_jobs - only used in tests
  • Model Jobs - only used in queue.get_jobs
  • (Partial) Function MessageWatcher.fetch_input - now uses read_node
  • Models WorkflowStepModel and WorkflowStepModelPayload - renamed WorkflowStepDetails -> WorkflowStep
  • Function subscribers.fetch_artefact - unused
  • api.schemas - no longer required, using models from models.py

Closes #126 (closed)

Edited by Øyvind Evju

Merge request reports