ProjectModel#

pydantic model documenteer.conf._toml.ProjectModel#

Model for the project table in the documenteer.toml file.

Parameters:

data (Any)

Show JSON schema
{
   "title": "ProjectModel",
   "description": "Model for the project table in the documenteer.toml file.",
   "type": "object",
   "properties": {
      "title": {
         "description": "Name of the project, used as titles throughout the documentation site.",
         "title": "Title",
         "type": "string"
      },
      "base_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Canonical URL of the site's root page.",
         "title": "Base Url"
      },
      "copyright": {
         "default": "",
         "description": "Copyright statement, without a 'copyright' prefix word.",
         "title": "Copyright",
         "type": "string"
      },
      "github_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The URL of the project's GitHub repository.",
         "title": "Github Url"
      },
      "github_default_branch": {
         "default": "main",
         "description": "The project's default development branch on GitHub.",
         "title": "Github Default Branch",
         "type": "string"
      },
      "version": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Version string.",
         "title": "Version"
      },
      "python": {
         "anyOf": [
            {
               "$ref": "#/$defs/PythonPackageModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "openapi": {
         "anyOf": [
            {
               "$ref": "#/$defs/OpenApiDocsModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "citations": {
         "description": "Citations the site displays, in the order they appear in the footer.",
         "items": {
            "$ref": "#/$defs/CitationModel"
         },
         "title": "Citations",
         "type": "array"
      }
   },
   "$defs": {
      "CitationAuthorModel": {
         "description": "Model for an author of a ``[[project.citations]]`` entry.\n\nAn author is either a person, named with ``family_name`` (and usually\n``given_name``), or an organization, named with ``name``. The split\nmatters to a rendered citation: a person's name is set family-name-first\nand may be abbreviated by a BibTeX style, where an organization's is\nprotected from both.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The organization's name, for an author that is an institution rather than a person.",
               "title": "Name"
            },
            "ror": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The organization's ROR (ror.org) identifier. Only meaningful alongside ``name``.",
               "title": "Ror"
            },
            "family_name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The person's family name (last name in western culture).",
               "title": "Family Name"
            },
            "given_name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The person's given name (first name in western culture).",
               "title": "Given Name"
            },
            "orcid": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The person's ORCID, as a URL or a bare identifier. Only meaningful alongside ``family_name``.",
               "title": "Orcid"
            },
            "affiliation": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The person's affiliation, as a single display name. Only meaningful alongside ``family_name``.",
               "title": "Affiliation"
            }
         },
         "title": "CitationAuthorModel",
         "type": "object"
      },
      "CitationModel": {
         "description": "Model for an entry in the ``[[project.citations]]`` array of\ndocumenteer.toml.\n\nAn entry carries both the work's bibliographic fields and the\npresentation fields that say how the site displays it. The bibliographic\nfields can instead come from a CITATION.cff file, named by ``cff``, in\nwhich case a field set here overrides the file's value; the presentation\nfields are only ever set here.",
         "properties": {
            "doi": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The work's DOI, written bare (``10.NNNN/suffix``), as a https://doi.org/ URL, or with a ``doi:`` prefix. Required unless a ``cff`` file supplies one.",
               "title": "Doi"
            },
            "label": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "A short label distinguishing this citation from the site's others, such as \"Dataset\" or \"Paper\".",
               "title": "Label"
            },
            "self": {
               "default": false,
               "description": "Whether this is the DOI whose landing page this site is. At most one entry can set it.",
               "title": "Self",
               "type": "boolean"
            },
            "in_footer": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Whether this citation appears in the site footer. Defaults to true for the ``self`` entry and false for every other.",
               "title": "In Footer"
            },
            "note": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Free text about when to use this citation, displayed alongside it.",
               "title": "Note"
            },
            "title": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The title of the cited work.",
               "title": "Title"
            },
            "authors": {
               "description": "The work's authors, in the order they should be credited. Setting any author replaces the whole author list a ``cff`` file supplies.",
               "items": {
                  "$ref": "#/$defs/CitationAuthorModel"
               },
               "title": "Authors",
               "type": "array"
            },
            "publisher": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The organization that published the work.",
               "title": "Publisher"
            },
            "date": {
               "anyOf": [
                  {
                     "format": "date",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The work's publication date. Only its year appears in a rendered citation.",
               "title": "Date"
            },
            "cff": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Path to a CITATION.cff file supplying the bibliographic fields, relative to documenteer.toml (typically ``../CITATION.cff``).",
               "title": "Cff"
            }
         },
         "title": "CitationModel",
         "type": "object"
      },
      "OpenApiDocsModel": {
         "description": "Model for OpenAPI documentation configurations in documenteer.toml.",
         "properties": {
            "generator": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/OpenApiGeneratorModel"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The function that generates the OpenAPI spec file from theapplication source code. If not specified, the OpenAPI spec file assumed to be generated by an external process and provided at the path specified by ``openapi_path``."
            },
            "openapi_path": {
               "default": "_static/openapi.json",
               "description": "This is the path, relative to the Sphinx conf.py file, where the OpenAPI spec file is written. Default is ``_static/openapi.json``.",
               "title": "Openapi Path",
               "type": "string"
            },
            "doc_path": {
               "default": "api",
               "title": "Doc Path",
               "type": "string"
            }
         },
         "title": "OpenApiDocsModel",
         "type": "object"
      },
      "OpenApiGeneratorModel": {
         "description": "Specification for the OpenAPI generator function used by the\n``documenteer.ext.openapi`` Sphinx extension.",
         "properties": {
            "function": {
               "description": "The Python function that generates the OpenAPI spec file. It must have the form ``module:func``. The function must return a JSON-serialized string.",
               "title": "Function",
               "type": "string"
            },
            "positional_args": {
               "description": "Positional arguments to pass to the generator function.",
               "items": {},
               "title": "Positional Args",
               "type": "array"
            },
            "keyword_args": {
               "additionalProperties": true,
               "description": "Keyword arguments to pass to the generator function.",
               "title": "Keyword Args",
               "type": "object"
            }
         },
         "required": [
            "function"
         ],
         "title": "OpenApiGeneratorModel",
         "type": "object"
      },
      "PythonPackageModel": {
         "description": "Model for a Python package (i.e. built with pyproject.toml-compatible\nbuild system.",
         "properties": {
            "package": {
               "description": "Package name",
               "title": "Package",
               "type": "string"
            },
            "documentation_url_key": {
               "default": "Homepage",
               "description": "Key for the documentation URL in the pyproject.toml [project.urls] table. The corresponding URL is used for the Sphinx html_baseurl configuration, which in turns sets the canonical URL link relation on the web pages.",
               "title": "Documentation Url Key",
               "type": "string"
            },
            "github_url_key": {
               "default": "Source",
               "description": "Key for the documentation URL in the pyproject.toml [project.urls] table. The corresponding URL is used for as an alternative to setting [project.github_url].",
               "title": "Github Url Key",
               "type": "string"
            }
         },
         "required": [
            "package"
         ],
         "title": "PythonPackageModel",
         "type": "object"
      }
   },
   "required": [
      "title"
   ]
}

Fields:
Validators:
field base_url: HttpUrl | None = None#

Canonical URL of the site’s root page.

field citations: list[CitationModel] [Optional]#

Citations the site displays, in the order they appear in the footer.

Validated by:
field copyright: str = ''#

Copyright statement, without a ‘copyright’ prefix word.

field github_default_branch: str = 'main'#

The project’s default development branch on GitHub.

field github_url: HttpUrl | None = None#

The URL of the project’s GitHub repository.

field openapi: OpenApiDocsModel | None = None#
field python: PythonPackageModel | None = None#
field title: str [Required]#

Name of the project, used as titles throughout the documentation site.

field version: str | None = None#

Version string.

validator validate_one_self_citation  »  citations#

Allow at most one citation to claim the site as its landing page.

Parameters:

v (list[CitationModel])

Return type:

list[CitationModel]