Git objects

pydantic model git_dag.git_objects.GitObject[source]

A base class for git objects.

Show JSON schema
{
   "title": "GitObject",
   "description": "A base class for git objects.",
   "type": "object",
   "properties": {
      "sha": {
         "title": "Sha",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "sha"
   ]
}

Config:
  • extra: str = forbid

Fields:
field sha: str [Required]
model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

property is_ready: bool

Indicates whether the object is ready to use.

Note

See note in get_raw_objects().

abstract property kind: GitObjectKind

The object type.

pydantic model git_dag.git_objects.GitTag[source]

Git (annotated) tag object.

Show JSON schema
{
   "title": "GitTag",
   "description": "Git (annotated) tag object.",
   "type": "object",
   "properties": {
      "sha": {
         "title": "Sha",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "type": "string"
      },
      "raw_data": {
         "additionalProperties": {
            "type": "string"
         },
         "title": "Raw Data",
         "type": "object"
      },
      "is_deleted": {
         "default": false,
         "title": "Is Deleted",
         "type": "boolean"
      }
   },
   "additionalProperties": false,
   "required": [
      "sha",
      "name",
      "raw_data"
   ]
}

Config:
  • extra: str = forbid

Fields:
field is_deleted: bool = False
field name: str [Required]
field raw_data: GitTagRawDataType [Required]
model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

property anchor: GitObject

Return the associated anchor.

Note

An annotated tag can point to another tag: https://stackoverflow.com/a/19812276

kind: ClassVar[GitObjectKind] = 'tag'
property message: str

Return the message.

property tagger: str

Return tagger.

property tagger_date: str

Return tagger date.

property tagger_email: str

Return tagger email.

pydantic model git_dag.git_objects.GitCommit[source]

Git commit object.

Show JSON schema
{
   "title": "GitCommit",
   "description": "Git commit object.",
   "type": "object",
   "properties": {
      "sha": {
         "title": "Sha",
         "type": "string"
      },
      "is_reachable": {
         "title": "Is Reachable",
         "type": "boolean"
      },
      "raw_data": {
         "additionalProperties": {
            "anyOf": [
               {
                  "type": "string"
               },
               {
                  "items": {
                     "type": "string"
                  },
                  "type": "array"
               }
            ]
         },
         "title": "Raw Data",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "sha",
      "is_reachable",
      "raw_data"
   ]
}

Config:
  • extra: str = forbid

Fields:
field is_reachable: bool [Required]
field raw_data: GitCommitRawDataType [Required]
model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

property author: str

Return the author.

property author_date: str

Return the author date.

property author_email: str

Return the author email.

property committer: str

Return the committer.

property committer_date: str

Return the committer date.

property committer_email: str

Return the committer email.

kind: ClassVar[GitObjectKind] = 'commit'
property message: str

Return the commit message.

property parents: list[GitCommit]

Return the parents.

property tree: GitTree

Return the associated tree (there can be exactly one).

pydantic model git_dag.git_objects.GitTree[source]

Git tree object.

Show JSON schema
{
   "title": "GitTree",
   "description": "Git tree object.",
   "type": "object",
   "properties": {
      "sha": {
         "title": "Sha",
         "type": "string"
      },
      "raw_data": {
         "items": {
            "additionalProperties": {
               "type": "string"
            },
            "type": "object"
         },
         "title": "Raw Data",
         "type": "array"
      },
      "no_children": {
         "default": false,
         "title": "No Children",
         "type": "boolean"
      }
   },
   "additionalProperties": false,
   "required": [
      "sha",
      "raw_data"
   ]
}

Config:
  • extra: str = forbid

Fields:
field no_children: bool = False
field raw_data: GitTreeRawDataType [Required]

Raw data.

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

property children: list[GitTree | GitBlob]

Return the children.

kind: ClassVar[GitObjectKind] = 'tree'
pydantic model git_dag.git_objects.GitTagLightweight[source]

Git lightweight tag (this is not a GitObject).

Show JSON schema
{
   "title": "GitTagLightweight",
   "description": "Git lightweight tag (this is not a ``GitObject``).",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "anchor": {
         "$ref": "#/$defs/GitObject"
      }
   },
   "$defs": {
      "GitObject": {
         "additionalProperties": false,
         "description": "A base class for git objects.",
         "properties": {
            "sha": {
               "title": "Sha",
               "type": "string"
            }
         },
         "required": [
            "sha"
         ],
         "title": "GitObject",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "anchor"
   ]
}

Config:
  • extra: str = forbid

Fields:
field anchor: GitObject [Required]
field name: str [Required]
pydantic model git_dag.git_objects.GitBranch[source]

A branch.

Show JSON schema
{
   "title": "GitBranch",
   "description": "A branch.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "commit": {
         "$ref": "#/$defs/GitCommit"
      },
      "is_local": {
         "default": false,
         "title": "Is Local",
         "type": "boolean"
      },
      "tracking": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Tracking"
      }
   },
   "$defs": {
      "GitCommit": {
         "additionalProperties": false,
         "description": "Git commit object.",
         "properties": {
            "sha": {
               "title": "Sha",
               "type": "string"
            },
            "is_reachable": {
               "title": "Is Reachable",
               "type": "boolean"
            },
            "raw_data": {
               "additionalProperties": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "items": {
                           "type": "string"
                        },
                        "type": "array"
                     }
                  ]
               },
               "title": "Raw Data",
               "type": "object"
            }
         },
         "required": [
            "sha",
            "is_reachable",
            "raw_data"
         ],
         "title": "GitCommit",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "commit"
   ]
}

Config:
  • extra: str = forbid

Fields:
field commit: GitCommit [Required]
field is_local: bool = False
field name: str [Required]
field tracking: str | None = None
pydantic model git_dag.git_objects.GitStash[source]

A stash.

Show JSON schema
{
   "title": "GitStash",
   "description": "A stash.",
   "type": "object",
   "properties": {
      "index": {
         "title": "Index",
         "type": "integer"
      },
      "title": {
         "title": "Title",
         "type": "string"
      },
      "commit": {
         "$ref": "#/$defs/GitCommit"
      }
   },
   "$defs": {
      "GitCommit": {
         "additionalProperties": false,
         "description": "Git commit object.",
         "properties": {
            "sha": {
               "title": "Sha",
               "type": "string"
            },
            "is_reachable": {
               "title": "Is Reachable",
               "type": "boolean"
            },
            "raw_data": {
               "additionalProperties": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "items": {
                           "type": "string"
                        },
                        "type": "array"
                     }
                  ]
               },
               "title": "Raw Data",
               "type": "object"
            }
         },
         "required": [
            "sha",
            "is_reachable",
            "raw_data"
         ],
         "title": "GitCommit",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "index",
      "title",
      "commit"
   ]
}

Config:
  • extra: str = forbid

Fields:
field commit: GitCommit [Required]
field index: int [Required]
field title: str [Required]

Parameters

pydantic model git_dag.parameters.Params[source]

A container class for all parameters.

Note

It is important to evaluate the default values at runtime (in order to consider potential changes in ignore_config_file) – thus default_factory is used.

Warning

Pylint complains about no-member if the fields are defined using e.g., public: ParamsPublic = Field(default_factory=ParamsPublic) – with which mypy is happy. On the other hand, mypy complains about call-arg (Missing named argument) if we use public: Annotated[ParamsPublic, Field(default_factory=ParamsPublic)] with which pylint is happy (see first comment of https://stackoverflow.com/a/77844893).

  • mypy 1.15.0

  • pylint 3.3.6 (astroid 3.3.9)

  • python 3.13.1

The former syntax is used below (i.e., mypy is prioritized) and pylint errors are suppressed by specifying generated-members in pyproject.toml.

Show JSON schema
{
   "title": "Params",
   "description": "A container class for all parameters.\n\nNote\n-----\nIt is important to evaluate the default values at runtime (in order to consider\npotential changes in :attr:`~ParamsBase.ignore_config_file`) -- thus\n``default_factory`` is used.\n\nWarning\n--------\nPylint complains about no-member if the fields are defined using e.g.,\n``public: ParamsPublic = Field(default_factory=ParamsPublic)`` -- with which mypy is\nhappy. On the other hand, mypy complains about call-arg (Missing named argument) if\nwe use ``public: Annotated[ParamsPublic, Field(default_factory=ParamsPublic)]`` with\nwhich pylint is happy (see first comment of https://stackoverflow.com/a/77844893).\n\n+ mypy 1.15.0\n+ pylint 3.3.6 (astroid 3.3.9)\n+ python 3.13.1\n\nThe former syntax is used below (i.e., mypy is prioritized) and pylint errors are\nsuppressed by specifying ``generated-members`` in ``pyproject.toml``.",
   "type": "object",
   "properties": {
      "public": {
         "$ref": "#/$defs/ParamsPublic"
      },
      "dag_global": {
         "$ref": "#/$defs/ParamsDagGlobal"
      },
      "dag_node": {
         "$ref": "#/$defs/ParamsDagNode"
      },
      "dag_edge": {
         "$ref": "#/$defs/ParamsDagEdge"
      },
      "dag_node_colors": {
         "$ref": "#/$defs/ParamsDagNodeColors"
      },
      "standalone_cluster": {
         "$ref": "#/$defs/ParamsStandaloneCluster"
      },
      "links": {
         "$ref": "#/$defs/ParamsLinks"
      },
      "misc": {
         "$ref": "#/$defs/ParamsMisc"
      }
   },
   "$defs": {
      "LinksTemplates": {
         "description": "Parameters of of git providers for links to commits, tags, branches.",
         "properties": {
            "base": {
               "title": "Base",
               "type": "string"
            },
            "commit": {
               "title": "Commit",
               "type": "string"
            },
            "branch": {
               "title": "Branch",
               "type": "string"
            },
            "tag": {
               "title": "Tag",
               "type": "string"
            }
         },
         "required": [
            "base",
            "commit",
            "branch",
            "tag"
         ],
         "title": "LinksTemplates",
         "type": "object"
      },
      "ParamsDagEdge": {
         "additionalProperties": true,
         "description": "DAG edge parameters.",
         "properties": {
            "arrowsize": {
               "default": "0.5",
               "title": "Arrowsize",
               "type": "string"
            },
            "color": {
               "default": "gray10",
               "title": "Color",
               "type": "string"
            }
         },
         "title": "ParamsDagEdge",
         "type": "object"
      },
      "ParamsDagGlobal": {
         "additionalProperties": true,
         "description": "Global DAG parameters.",
         "properties": {
            "rankdir": {
               "default": "TB",
               "enum": [
                  "LR",
                  "RL",
                  "TB",
                  "BT"
               ],
               "title": "Rankdir",
               "type": "string"
            },
            "dpi": {
               "default": "None",
               "title": "Dpi",
               "type": "string"
            },
            "bgcolor": {
               "default": "white",
               "title": "Bgcolor",
               "type": "string"
            }
         },
         "title": "ParamsDagGlobal",
         "type": "object"
      },
      "ParamsDagNode": {
         "additionalProperties": true,
         "description": "DAG node parameters.",
         "properties": {
            "shape": {
               "default": "box",
               "title": "Shape",
               "type": "string"
            },
            "style": {
               "default": "filled",
               "title": "Style",
               "type": "string"
            },
            "margin": {
               "default": "0.01,0.01",
               "title": "Margin",
               "type": "string"
            },
            "width": {
               "default": "0.02",
               "title": "Width",
               "type": "string"
            },
            "height": {
               "default": "0.02",
               "title": "Height",
               "type": "string"
            },
            "fontname": {
               "default": "Courier",
               "title": "Fontname",
               "type": "string"
            }
         },
         "title": "ParamsDagNode",
         "type": "object"
      },
      "ParamsDagNodeColors": {
         "additionalProperties": false,
         "description": "Colors for DAG nodes.",
         "properties": {
            "commit": {
               "default": "gold3",
               "title": "Commit",
               "type": "string"
            },
            "commit_unreachable": {
               "default": "darkorange",
               "title": "Commit Unreachable",
               "type": "string"
            },
            "commit_in_range": {
               "default": "red",
               "title": "Commit In Range",
               "type": "string"
            },
            "tree": {
               "default": "deepskyblue4",
               "title": "Tree",
               "type": "string"
            },
            "the_empty_tree": {
               "default": "darkturquoise",
               "title": "The Empty Tree",
               "type": "string"
            },
            "blob": {
               "default": "gray",
               "title": "Blob",
               "type": "string"
            },
            "tag": {
               "default": "pink",
               "title": "Tag",
               "type": "string"
            },
            "tag_deleted": {
               "default": "rosybrown4",
               "title": "Tag Deleted",
               "type": "string"
            },
            "tag_lw": {
               "default": "lightcoral",
               "title": "Tag Lw",
               "type": "string"
            },
            "head": {
               "default": "cornflowerblue",
               "title": "Head",
               "type": "string"
            },
            "local_branches": {
               "default": "forestgreen",
               "title": "Local Branches",
               "type": "string"
            },
            "remote_branches": {
               "default": "firebrick",
               "title": "Remote Branches",
               "type": "string"
            },
            "stash": {
               "default": "skyblue",
               "title": "Stash",
               "type": "string"
            },
            "notes": {
               "default": "white",
               "title": "Notes",
               "type": "string"
            },
            "annotations": {
               "default": "aquamarine3",
               "title": "Annotations",
               "type": "string"
            }
         },
         "title": "ParamsDagNodeColors",
         "type": "object"
      },
      "ParamsLinks": {
         "additionalProperties": false,
         "description": "Parameters of of git providers for links to commits, tags, branches.",
         "properties": {
            "templates": {
               "additionalProperties": {
                  "$ref": "#/$defs/LinksTemplates"
               },
               "default": {
                  "github": {
                     "base": "https://github.com",
                     "branch": "{base}/{user}/{project}/tree/{branch}",
                     "commit": "{base}/{user}/{project}/commit/{commit}",
                     "tag": "{base}/{user}/{project}/releases/tag/{tag}"
                  },
                  "bitbucket": {
                     "base": "https://bitbucket.org",
                     "branch": "{base}/{user}/{project}/src/{branch}",
                     "commit": "{base}/{user}/{project}/commits/{commit}",
                     "tag": "{base}/{user}/{project}/src/{tag}"
                  }
               },
               "title": "Templates",
               "type": "object"
            }
         },
         "title": "ParamsLinks",
         "type": "object"
      },
      "ParamsMisc": {
         "additionalProperties": false,
         "description": "Misc parameters.",
         "properties": {
            "annotations_symbol": {
               "default": "☞",
               "title": "Annotations Symbol",
               "type": "string"
            },
            "annotations_shape": {
               "default": "cds",
               "title": "Annotations Shape",
               "type": "string"
            },
            "annotations_truncate": {
               "default": 20,
               "title": "Annotations Truncate",
               "type": "integer"
            },
            "sha_truncate": {
               "default": 7,
               "title": "Sha Truncate",
               "type": "integer"
            }
         },
         "title": "ParamsMisc",
         "type": "object"
      },
      "ParamsPublic": {
         "additionalProperties": false,
         "description": "Parameters exposed as command-line arguments.",
         "properties": {
            "path": {
               "default": ".",
               "title": "Path",
               "type": "string"
            },
            "file": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "format": "path",
                     "type": "string"
                  }
               ],
               "default": "git-dag.gv",
               "title": "File"
            },
            "format": {
               "default": "svg",
               "title": "Format",
               "type": "string"
            },
            "dag_backend": {
               "default": "graphviz",
               "title": "Dag Backend",
               "type": "string"
            },
            "log_level": {
               "default": "WARNING",
               "title": "Log Level",
               "type": "string"
            },
            "range_expr": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Range Expr"
            },
            "init_refs": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Init Refs"
            },
            "annotations": {
               "anyOf": [
                  {
                     "items": {
                        "items": {
                           "type": "string"
                        },
                        "type": "array"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Annotations"
            },
            "max_numb_commits": {
               "default": 1000,
               "title": "Max Numb Commits",
               "type": "integer"
            },
            "commit_message_as_label": {
               "default": 0,
               "title": "Commit Message As Label",
               "type": "integer"
            },
            "html_embed_svg": {
               "default": false,
               "title": "Html Embed Svg",
               "type": "boolean"
            },
            "show_unreachable_commits": {
               "default": false,
               "title": "Show Unreachable Commits",
               "type": "boolean"
            },
            "show_tags": {
               "default": false,
               "title": "Show Tags",
               "type": "boolean"
            },
            "show_deleted_tags": {
               "default": false,
               "title": "Show Deleted Tags",
               "type": "boolean"
            },
            "show_local_branches": {
               "default": false,
               "title": "Show Local Branches",
               "type": "boolean"
            },
            "show_remote_branches": {
               "default": false,
               "title": "Show Remote Branches",
               "type": "boolean"
            },
            "show_stash": {
               "default": false,
               "title": "Show Stash",
               "type": "boolean"
            },
            "show_trees": {
               "default": false,
               "title": "Show Trees",
               "type": "boolean"
            },
            "show_trees_standalone": {
               "default": false,
               "title": "Show Trees Standalone",
               "type": "boolean"
            },
            "show_blobs": {
               "default": false,
               "title": "Show Blobs",
               "type": "boolean"
            },
            "show_blobs_standalone": {
               "default": false,
               "title": "Show Blobs Standalone",
               "type": "boolean"
            },
            "show_head": {
               "default": false,
               "title": "Show Head",
               "type": "boolean"
            },
            "show_prs_heads": {
               "default": false,
               "title": "Show Prs Heads",
               "type": "boolean"
            },
            "xdg_open": {
               "default": false,
               "title": "Xdg Open",
               "type": "boolean"
            }
         },
         "title": "ParamsPublic",
         "type": "object"
      },
      "ParamsStandaloneCluster": {
         "additionalProperties": false,
         "description": "Standalone cluster parameters.",
         "properties": {
            "color": {
               "default": "lightgrey",
               "title": "Color",
               "type": "string"
            },
            "label": {
               "default": "Standalone\\nTrees & Blobs",
               "title": "Label",
               "type": "string"
            },
            "fontname": {
               "default": "Courier",
               "title": "Fontname",
               "type": "string"
            }
         },
         "title": "ParamsStandaloneCluster",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

Fields:
field dag_edge: ParamsDagEdge [Optional]
field dag_global: ParamsDagGlobal [Optional]
field dag_node: ParamsDagNode [Optional]
field dag_node_colors: ParamsDagNodeColors [Optional]
field misc: ParamsMisc [Optional]
field public: ParamsPublic [Optional]
field standalone_cluster: ParamsStandaloneCluster [Optional]
static set_ignore_config_file(value: bool) None[source]

Set whether to ignore the config file or not.

Warning

This method is defined for convenience. See set_ignore_config_file().

create_config() None[source]

Create a config file from the parameters in the current instance.

pydantic model git_dag.parameters.ParamsPublic[source]

Parameters exposed as command-line arguments.

Show JSON schema
{
   "title": "ParamsPublic",
   "description": "Parameters exposed as command-line arguments.",
   "type": "object",
   "properties": {
      "path": {
         "default": ".",
         "title": "Path",
         "type": "string"
      },
      "file": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "format": "path",
               "type": "string"
            }
         ],
         "default": "git-dag.gv",
         "title": "File"
      },
      "format": {
         "default": "svg",
         "title": "Format",
         "type": "string"
      },
      "dag_backend": {
         "default": "graphviz",
         "title": "Dag Backend",
         "type": "string"
      },
      "log_level": {
         "default": "WARNING",
         "title": "Log Level",
         "type": "string"
      },
      "range_expr": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Range Expr"
      },
      "init_refs": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Init Refs"
      },
      "annotations": {
         "anyOf": [
            {
               "items": {
                  "items": {
                     "type": "string"
                  },
                  "type": "array"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Annotations"
      },
      "max_numb_commits": {
         "default": 1000,
         "title": "Max Numb Commits",
         "type": "integer"
      },
      "commit_message_as_label": {
         "default": 0,
         "title": "Commit Message As Label",
         "type": "integer"
      },
      "html_embed_svg": {
         "default": false,
         "title": "Html Embed Svg",
         "type": "boolean"
      },
      "show_unreachable_commits": {
         "default": false,
         "title": "Show Unreachable Commits",
         "type": "boolean"
      },
      "show_tags": {
         "default": false,
         "title": "Show Tags",
         "type": "boolean"
      },
      "show_deleted_tags": {
         "default": false,
         "title": "Show Deleted Tags",
         "type": "boolean"
      },
      "show_local_branches": {
         "default": false,
         "title": "Show Local Branches",
         "type": "boolean"
      },
      "show_remote_branches": {
         "default": false,
         "title": "Show Remote Branches",
         "type": "boolean"
      },
      "show_stash": {
         "default": false,
         "title": "Show Stash",
         "type": "boolean"
      },
      "show_trees": {
         "default": false,
         "title": "Show Trees",
         "type": "boolean"
      },
      "show_trees_standalone": {
         "default": false,
         "title": "Show Trees Standalone",
         "type": "boolean"
      },
      "show_blobs": {
         "default": false,
         "title": "Show Blobs",
         "type": "boolean"
      },
      "show_blobs_standalone": {
         "default": false,
         "title": "Show Blobs Standalone",
         "type": "boolean"
      },
      "show_head": {
         "default": false,
         "title": "Show Head",
         "type": "boolean"
      },
      "show_prs_heads": {
         "default": false,
         "title": "Show Prs Heads",
         "type": "boolean"
      },
      "xdg_open": {
         "default": false,
         "title": "Xdg Open",
         "type": "boolean"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

Fields:
Validators:

field annotations: list[list[str]] | None = None
Validated by:
  • set_defaults_values

field commit_message_as_label: int = 0
Validated by:
  • set_defaults_values

field dag_backend: str = 'graphviz'
Validated by:
  • set_defaults_values

field file: str | Path = 'git-dag.gv'
Validated by:
  • set_defaults_values

field format: str = 'svg'
Validated by:
  • set_defaults_values

field html_embed_svg: bool = False
Validated by:
  • set_defaults_values

field init_refs: list[str] | None = None
Validated by:
  • set_defaults_values

field log_level: str = 'WARNING'
Validated by:
  • set_defaults_values

field max_numb_commits: int = 1000
Validated by:
  • set_defaults_values

field path: str = '.'
Validated by:
  • set_defaults_values

field range_expr: str | None = None
Validated by:
  • set_defaults_values

field show_blobs: bool = False
Validated by:
  • set_defaults_values

field show_blobs_standalone: bool = False
Validated by:
  • set_defaults_values

field show_deleted_tags: bool = False
Validated by:
  • set_defaults_values

field show_head: bool = False
Validated by:
  • set_defaults_values

field show_local_branches: bool = False
Validated by:
  • set_defaults_values

field show_prs_heads: bool = False
Validated by:
  • set_defaults_values

field show_remote_branches: bool = False
Validated by:
  • set_defaults_values

field show_stash: bool = False
Validated by:
  • set_defaults_values

field show_tags: bool = False
Validated by:
  • set_defaults_values

field show_trees: bool = False
Validated by:
  • set_defaults_values

field show_trees_standalone: bool = False
Validated by:
  • set_defaults_values

field show_unreachable_commits: bool = False
Validated by:
  • set_defaults_values

field xdg_open: bool = False
Validated by:
  • set_defaults_values

static section_in_config() str[source]

Return associated section in the config file.

Warning

The section name has to coincide with the field names in Params.

pydantic model git_dag.parameters.ParamsDagGlobal[source]

Global DAG parameters.

Show JSON schema
{
   "title": "ParamsDagGlobal",
   "description": "Global DAG parameters.",
   "type": "object",
   "properties": {
      "rankdir": {
         "default": "TB",
         "enum": [
            "LR",
            "RL",
            "TB",
            "BT"
         ],
         "title": "Rankdir",
         "type": "string"
      },
      "dpi": {
         "default": "None",
         "title": "Dpi",
         "type": "string"
      },
      "bgcolor": {
         "default": "white",
         "title": "Bgcolor",
         "type": "string"
      }
   },
   "additionalProperties": true
}

Config:
  • extra: str = allow

Fields:
Validators:

field bgcolor: str = 'white'
Validated by:
  • set_defaults_values

field dpi: str = 'None'
Validated by:
  • set_defaults_values

field rankdir: Literal['LR', 'RL', 'TB', 'BT'] = 'TB'
Validated by:
  • set_defaults_values

static section_in_config() str[source]

Return associated section in the config file.

Warning

The section name has to coincide with the field names in Params.

pydantic model git_dag.parameters.ParamsDagNode[source]

DAG node parameters.

Show JSON schema
{
   "title": "ParamsDagNode",
   "description": "DAG node parameters.",
   "type": "object",
   "properties": {
      "shape": {
         "default": "box",
         "title": "Shape",
         "type": "string"
      },
      "style": {
         "default": "filled",
         "title": "Style",
         "type": "string"
      },
      "margin": {
         "default": "0.01,0.01",
         "title": "Margin",
         "type": "string"
      },
      "width": {
         "default": "0.02",
         "title": "Width",
         "type": "string"
      },
      "height": {
         "default": "0.02",
         "title": "Height",
         "type": "string"
      },
      "fontname": {
         "default": "Courier",
         "title": "Fontname",
         "type": "string"
      }
   },
   "additionalProperties": true
}

Config:
  • extra: str = allow

Fields:
Validators:

field fontname: str = 'Courier'
Validated by:
  • set_defaults_values

field height: str = '0.02'
Validated by:
  • set_defaults_values

field margin: str = '0.01,0.01'
Validated by:
  • set_defaults_values

field shape: str = 'box'
Validated by:
  • set_defaults_values

field style: str = 'filled'
Validated by:
  • set_defaults_values

field width: str = '0.02'
Validated by:
  • set_defaults_values

static section_in_config() str[source]

Return associated section in the config file.

Warning

The section name has to coincide with the field names in Params.

pydantic model git_dag.parameters.ParamsDagEdge[source]

DAG edge parameters.

Show JSON schema
{
   "title": "ParamsDagEdge",
   "description": "DAG edge parameters.",
   "type": "object",
   "properties": {
      "arrowsize": {
         "default": "0.5",
         "title": "Arrowsize",
         "type": "string"
      },
      "color": {
         "default": "gray10",
         "title": "Color",
         "type": "string"
      }
   },
   "additionalProperties": true
}

Config:
  • extra: str = allow

Fields:
Validators:

field arrowsize: str = '0.5'
Validated by:
  • set_defaults_values

field color: str = 'gray10'
Validated by:
  • set_defaults_values

static section_in_config() str[source]

Return associated section in the config file.

Warning

The section name has to coincide with the field names in Params.

pydantic model git_dag.parameters.ParamsDagNodeColors[source]

Colors for DAG nodes.

Show JSON schema
{
   "title": "ParamsDagNodeColors",
   "description": "Colors for DAG nodes.",
   "type": "object",
   "properties": {
      "commit": {
         "default": "gold3",
         "title": "Commit",
         "type": "string"
      },
      "commit_unreachable": {
         "default": "darkorange",
         "title": "Commit Unreachable",
         "type": "string"
      },
      "commit_in_range": {
         "default": "red",
         "title": "Commit In Range",
         "type": "string"
      },
      "tree": {
         "default": "deepskyblue4",
         "title": "Tree",
         "type": "string"
      },
      "the_empty_tree": {
         "default": "darkturquoise",
         "title": "The Empty Tree",
         "type": "string"
      },
      "blob": {
         "default": "gray",
         "title": "Blob",
         "type": "string"
      },
      "tag": {
         "default": "pink",
         "title": "Tag",
         "type": "string"
      },
      "tag_deleted": {
         "default": "rosybrown4",
         "title": "Tag Deleted",
         "type": "string"
      },
      "tag_lw": {
         "default": "lightcoral",
         "title": "Tag Lw",
         "type": "string"
      },
      "head": {
         "default": "cornflowerblue",
         "title": "Head",
         "type": "string"
      },
      "local_branches": {
         "default": "forestgreen",
         "title": "Local Branches",
         "type": "string"
      },
      "remote_branches": {
         "default": "firebrick",
         "title": "Remote Branches",
         "type": "string"
      },
      "stash": {
         "default": "skyblue",
         "title": "Stash",
         "type": "string"
      },
      "notes": {
         "default": "white",
         "title": "Notes",
         "type": "string"
      },
      "annotations": {
         "default": "aquamarine3",
         "title": "Annotations",
         "type": "string"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

Fields:
Validators:

field annotations: str = 'aquamarine3'
Validated by:
  • set_defaults_values

field blob: str = 'gray'
Validated by:
  • set_defaults_values

field commit: str = 'gold3'
Validated by:
  • set_defaults_values

field commit_in_range: str = 'red'
Validated by:
  • set_defaults_values

field commit_unreachable: str = 'darkorange'
Validated by:
  • set_defaults_values

field head: str = 'cornflowerblue'
Validated by:
  • set_defaults_values

field local_branches: str = 'forestgreen'
Validated by:
  • set_defaults_values

field notes: str = 'white'
Validated by:
  • set_defaults_values

field remote_branches: str = 'firebrick'
Validated by:
  • set_defaults_values

field stash: str = 'skyblue'
Validated by:
  • set_defaults_values

field tag: str = 'pink'
Validated by:
  • set_defaults_values

field tag_deleted: str = 'rosybrown4'
Validated by:
  • set_defaults_values

field tag_lw: str = 'lightcoral'
Validated by:
  • set_defaults_values

field the_empty_tree: str = 'darkturquoise'
Validated by:
  • set_defaults_values

field tree: str = 'deepskyblue4'
Validated by:
  • set_defaults_values

static section_in_config() str[source]

Return associated section in the config file.

Warning

The section name has to coincide with the field names in Params.

pydantic model git_dag.parameters.ParamsStandaloneCluster[source]

Standalone cluster parameters.

Show JSON schema
{
   "title": "ParamsStandaloneCluster",
   "description": "Standalone cluster parameters.",
   "type": "object",
   "properties": {
      "color": {
         "default": "lightgrey",
         "title": "Color",
         "type": "string"
      },
      "label": {
         "default": "Standalone\\nTrees & Blobs",
         "title": "Label",
         "type": "string"
      },
      "fontname": {
         "default": "Courier",
         "title": "Fontname",
         "type": "string"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

Fields:
Validators:

field color: str = 'lightgrey'
Validated by:
  • set_defaults_values

field fontname: str = 'Courier'
Validated by:
  • set_defaults_values

field label: str = 'Standalone\\nTrees & Blobs'
Validated by:
  • set_defaults_values

static section_in_config() str[source]

Return associated section in the config file.

Warning

The section name has to coincide with the field names in Params.

Parameters of of git providers for links to commits, tags, branches.

Show JSON schema
{
   "title": "ParamsLinks",
   "description": "Parameters of of git providers for links to commits, tags, branches.",
   "type": "object",
   "properties": {
      "templates": {
         "additionalProperties": {
            "$ref": "#/$defs/LinksTemplates"
         },
         "default": {
            "github": {
               "base": "https://github.com",
               "branch": "{base}/{user}/{project}/tree/{branch}",
               "commit": "{base}/{user}/{project}/commit/{commit}",
               "tag": "{base}/{user}/{project}/releases/tag/{tag}"
            },
            "bitbucket": {
               "base": "https://bitbucket.org",
               "branch": "{base}/{user}/{project}/src/{branch}",
               "commit": "{base}/{user}/{project}/commits/{commit}",
               "tag": "{base}/{user}/{project}/src/{tag}"
            }
         },
         "title": "Templates",
         "type": "object"
      }
   },
   "$defs": {
      "LinksTemplates": {
         "description": "Parameters of of git providers for links to commits, tags, branches.",
         "properties": {
            "base": {
               "title": "Base",
               "type": "string"
            },
            "commit": {
               "title": "Commit",
               "type": "string"
            },
            "branch": {
               "title": "Branch",
               "type": "string"
            },
            "tag": {
               "title": "Tag",
               "type": "string"
            }
         },
         "required": [
            "base",
            "commit",
            "branch",
            "tag"
         ],
         "title": "LinksTemplates",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

Fields:
Validators:

field templates: dict[str, Annotated[LinksTemplates, SerializeAsAny()]] = {'bitbucket': LinksTemplates(base='https://bitbucket.org', commit='{base}/{user}/{project}/commits/{commit}', branch='{base}/{user}/{project}/src/{branch}', tag='{base}/{user}/{project}/src/{tag}'), 'github': LinksTemplates(base='https://github.com', commit='{base}/{user}/{project}/commit/{commit}', branch='{base}/{user}/{project}/tree/{branch}', tag='{base}/{user}/{project}/releases/tag/{tag}')}
Validated by:
  • set_defaults_values

static section_in_config() str[source]

Return associated section in the config file.

Warning

The section name has to coincide with the field names in Params.