Skip to content

agile-learning-institute/stage0_mongo_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stage0 Mongo API

This is a mongoDB Configuration API, based on the stage0_mongodb_api utility. It provides a versioned configuration as code utility for the Stage0 product.

Prerequisites

Contributing Guide

The configurations here are versioned, it's important that you not change any of the existing dictionaries or types. You can update a collection configuration file to define a new version of the collection, and create a new dictionaries as needed. You can add a new version to the enumerators data file, or define new custom types as needed.

Edit the appropriate files. Then use make test and visit http://localhost:8082. You can edit the files in place, and refresh the page to load new configurations. You may need to drop the database in order to re-test processing, but the service does not need to be restarted.

INPUT_FOLDER/
├── collections/                # Collection Configuration Files      
│   ├── bot.yaml            
│   ├── chain.yaml          
│   ├── ...
│   └── workshop.yaml
├── data/                       # Test data and Enumerators
│   ├── enumerators.json    
│   ├── bot.1.0.0.1.json    
│   ├── ...
│   └── workshop.1.0.0.1.yaml
└── dictionary/                 # Data Dictionaries (Simple Schema)
    ├── types/                  # Simple Schema custom types
    │   ├── word.yaml
    │   ├── sentence.yaml
    │   └── ...
    ├── bot.1.0.0.1.yaml
    ├── ...
    └── workshop.1.2.3.4.yaml

Developer Commands

The make-test and make-prod commands both tail the API logs. You will have to press Ctrl-C to stop tailing the logs.

## Test /input configurations interactively
make test

## Build and run the container to test before making a PR
make prod

## Shut down services after testing
make down

Reference Information

Test Data Patterns

ObjectID Collection Mapping

All ObjectID values in test data files follow a consistent pattern where the first 3 characters indicate the collection type. All ObjectIDs must be 24-character hex strings using only characters 0-9 and A-E.

Collection Prefix Example ObjectID
User AAA AAA000000000000000000001
Bot BBB BBB000000000000000000001
Chain CCC CCC000000000000000000001
Exercise DDD DDD000000000000000000001
Execution EEE EEE000000000000000000001
Workshop 000 000000000000000000000001
Conversation 111 111000000000000000000001
Runbook 222 222000000000000000000001
Template 333 333000000000000000000001

Test data is locked in, so feel free to use this to create end-to-end testing

About

Mongo Database configuration for the stage0 product.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published