RepoConfig#

pydantic model mobu.models.repo.RepoConfig#

In-repo configuration for mobu behavior.

This can be placed into a yaml file in the root of a repo to configure certain mobu behavior.

Parameters:

data (Any)

Show JSON schema
{
   "title": "RepoConfig",
   "description": "In-repo configuration for mobu behavior.\n\nThis can be placed into a yaml file in the root of a repo to configure\ncertain mobu behavior.",
   "type": "object",
   "properties": {
      "exclude_dirs": {
         "default": [],
         "description": "DEPRECATED: use collection_rules instead. If both exclude_dirs and collection_rules are set, exclude_dirs will be added as exclude rules to the collection_rules. These directories are relative to the repo root. Any notebooks in child directories of these directories will also be excluded. Only used by the NotebookRunner businesses.",
         "examples": [
            "some-dir",
            "some-dir/some-other-dir"
         ],
         "items": {
            "format": "path",
            "type": "string"
         },
         "title": "Any notebooks in these directories will not be run",
         "type": "array",
         "uniqueItems": true
      },
      "collection_rules": {
         "default": [],
         "description": "A set of rules describing which notebooks in a repo to run. Only used by NotebookRunner businesses.",
         "items": {
            "$ref": "#/$defs/CollectionRule"
         },
         "title": "Collection rules",
         "type": "array"
      }
   },
   "$defs": {
      "CollectionRule": {
         "description": "A set of patterns to filter the list of notebooks to run in a repo.",
         "properties": {
            "type": {
               "description": "intersect_union_of will evaluate the intersection of the current collection in the rule evaluation chain with union of all of the patterns in this rule. 'exclude_union_of' will subtract the union of the notebooks found by any pattern in this rule from the current current collection in the rule chain.",
               "enum": [
                  "intersect_union_of",
                  "exclude_union_of"
               ],
               "title": "Collection rule type",
               "type": "string"
            },
            "patterns": {
               "description": "A set of Python pathlib glob patterns: https://docs.python.org/3/library/pathlib.html#pattern-language This rule will gather all of the notebooks matched by any pattern in this list to either intersect or exclude.",
               "items": {
                  "type": "string"
               },
               "title": "patterns",
               "type": "array",
               "uniqueItems": true
            }
         },
         "required": [
            "type",
            "patterns"
         ],
         "title": "CollectionRule",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

Fields:
field collection_rules: list[CollectionRule] = []#

A set of rules describing which notebooks in a repo to run. Only used by NotebookRunner businesses.

field exclude_dirs: set[Path] = {}#

DEPRECATED: use collection_rules instead. If both exclude_dirs and collection_rules are set, exclude_dirs will be added as exclude rules to the collection_rules. These directories are relative to the repo root. Any notebooks in child directories of these directories will also be excluded. Only used by the NotebookRunner businesses.