evomimic / map-holons

3 stars 1 forks source link

Implement load_schema dance #90

Closed evomimic closed 3 months ago

evomimic commented 4 months ago

This enhancement adds the load_core_schema dance to the MAP's dance card. This dance requests a bulk load of the MAP's core (L0) descriptors. The functionality of the actual schema loader will be trivially small initially so that the basic dance logic can be tested. The schema loader can then incrementally add more and more elements (via Issue #87). To keep things simple, this enhancement will use the existing dances design that has a central dispatch table and places adapter files in the dances zome. It will also retain the existing descriptors test strategy. In the future, generalizing the DanceTestCase approach to MapTestCase and MapTestStep will allow us to bring a uniform testing infrastructure to all zomes.

Proposal

Enhance Native Descriptors functionality

pub fn load_core_schema(context: &HolonsContext) -> Result<Holon, HolonError>

Dance Enhancements

/// *DanceRequest:*
/// - dance_name: "load_core_schema"
/// - dance_type: Standalone
/// - request_body: None
///   
///
/// *ResponseBody:*
/// - the created Schema holon.
///

In the dancer.rs file:

_In the dance_response.rs file:_ No changes needed.

Testing Enhancements

_In the dances zome's tests directory, add a descriptor_fixtures.rs file:_

_In the test_data_types.rs file:_

Definition of Done: