aind_behavior_services.session package

Module contents

pydantic model aind_behavior_services.session.AindBehaviorSessionModel[source]

Bases: SchemaVersionedModel

Show JSON schema
{
   "title": "AindBehaviorSessionModel",
   "type": "object",
   "properties": {
      "aind_behavior_services_pkg_version": {
         "const": "0.11.0",
         "default": "0.11.0",
         "title": "aind_behavior_services package version",
         "type": "string"
      },
      "version": {
         "const": "0.3.1",
         "default": "0.3.1",
         "title": "Version",
         "type": "string"
      },
      "experiment": {
         "description": "Name of the experiment",
         "title": "Experiment",
         "type": "string"
      },
      "experimenter": {
         "default": [],
         "description": "Name of the experimenter",
         "items": {
            "type": "string"
         },
         "title": "Experimenter",
         "type": "array"
      },
      "date": {
         "description": "Date of the experiment",
         "format": "date-time",
         "title": "Date",
         "type": "string"
      },
      "root_path": {
         "description": "Root path where data will be logged",
         "title": "Root Path",
         "type": "string"
      },
      "session_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name of the session. This will be used to create a folder in the root path.",
         "title": "Session Name"
      },
      "subject": {
         "description": "Name of the subject",
         "title": "Subject",
         "type": "string"
      },
      "experiment_version": {
         "description": "Version of the experiment",
         "title": "Experiment Version",
         "type": "string"
      },
      "notes": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Notes about the experiment",
         "title": "Notes"
      },
      "commit_hash": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Commit hash of the repository",
         "title": "Commit Hash"
      },
      "allow_dirty_repo": {
         "default": false,
         "description": "Allow running from a dirty repository",
         "title": "Allow Dirty Repo",
         "type": "boolean"
      },
      "skip_hardware_validation": {
         "default": false,
         "description": "Skip hardware validation",
         "title": "Skip Hardware Validation",
         "type": "boolean"
      }
   },
   "required": [
      "experiment",
      "root_path",
      "subject",
      "experiment_version"
   ]
}

Fields:
Validators:
field aind_behavior_services_pkg_version: Literal[pkg_version] = '0.11.0'[source]
Constraints:
  • pattern = ^(0|[1-9]d*).(0|[1-9]d*).(0|[1-9]d*)(?:-((?:0|[1-9]d*|d*[a-zA-Z-][0-9a-zA-Z-]*)(?:.(?:0|[1-9]d*|d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:+([0-9a-zA-Z-]+(?:.[0-9a-zA-Z-]+)*))?$

Validated by:
field allow_dirty_repo: bool = False[source]

Allow running from a dirty repository

Validated by:
field commit_hash: str | None = None[source]

Commit hash of the repository

Validated by:
field date: Annotated[AwareDatetime, WrapValidator(func=_add_default_tz, json_schema_input_type=PydanticUndefined), FieldInfo(annotation=NoneType, required=True, validate_default=True)] [Optional][source]

Date of the experiment

Constraints:
  • func = <function _add_default_tz at 0x7f3f2bc9d800>

  • json_schema_input_type = PydanticUndefined

Validated by:
field experiment: str [Required][source]

Name of the experiment

Validated by:
field experiment_version: str [Required][source]

Version of the experiment

Validated by:
field experimenter: List[str] = [][source]

Name of the experimenter

Validated by:
field notes: str | None = None[source]

Notes about the experiment

Validated by:
field root_path: str [Required][source]

Root path where data will be logged

Validated by:
field session_name: str | None = None[source]

Name of the session. This will be used to create a folder in the root path.

Validated by:
field skip_hardware_validation: bool = False[source]

Skip hardware validation

Validated by:
field subject: str [Required][source]

Name of the subject

Validated by:
field version: Literal['0.3.1'] = '0.3.1'[source]
Validated by:
validator generate_session_name_default  »  all fields[source]
Return type:

Self