Skip to content

config ¤

Classes:

  • Config

    Configuration for the insiders project.

  • Unset

    A sentinel value for unset configuration options.

Functions:

Config dataclass ¤

Config(
    *,
    backlog_namespaces: list[str] | Unset = config_field(
        "backlog.namespaces"
    ),
    backlog_sort: list[Callable] | Unset = config_field(
        "backlog.sort", transform="_eval_sort"
    ),
    backlog_limit: int | Unset = config_field(
        "backlog.limit"
    ),
    backlog_issue_labels: (
        dict[str, str] | Unset
    ) = config_field("backlog.issue-labels"),
    backlog_github_token_command: (
        str | Unset
    ) = config_field("backlog.github-token-command"),
    backlog_polar_token_command: str | Unset = config_field(
        "backlog.polar-token-command"
    ),
    index_url: str | Unset = config_field("index.url"),
    index_start_in_background: bool | Unset = config_field(
        "index.start-in-background"
    ),
    index_distributions_directory: (
        str | Unset
    ) = config_field("index.distributions-directory"),
    index_sources_directory: str | Unset = config_field(
        "index.sources-directory"
    ),
    index_log_path: str | Unset = config_field(
        "index.log-path"
    ),
    project_github_username: str | Unset = config_field(
        "project.github-username"
    ),
    project_namespace: str | Unset = config_field(
        "project.namespace"
    ),
    project_insiders_namespace: str | Unset = config_field(
        "project.insiders-namespace"
    ),
    project_directory: str | Unset = config_field(
        "project.directory"
    ),
    project_insiders_directory: str | Unset = config_field(
        "project.insiders-directory"
    ),
    project_register_on_pypi: bool | Unset = config_field(
        "project.register-on-pypi"
    ),
    project_pypi_username: str | Unset = config_field(
        "project.pypi-username"
    ),
    project_post_creation_command: (
        str | list[str] | Unset
    ) = config_field("project.post-creation-command"),
    project_copier_template: str | Unset = config_field(
        "project.copier-template"
    ),
    project_copier_template_answers: (
        dict[str, str] | Unset
    ) = config_field("project.copier-template-answers"),
    sponsors_minimum_amount: int | Unset = config_field(
        "sponsors.minimum-amount"
    ),
    sponsors_github_sponsored_account: (
        str | Unset
    ) = config_field("sponsors.github-sponsored-account"),
    sponsors_github_token_command: (
        str | Unset
    ) = config_field("sponsors.github-token-command"),
    sponsors_github_beneficiaries: (
        dict[str, set[str]] | Unset
    ) = config_field("sponsors.github-beneficiaries"),
    sponsors_polar_sponsored_account: (
        str | Unset
    ) = config_field("sponsors.polar-sponsored-account"),
    sponsors_polar_token_command: (
        str | Unset
    ) = config_field("sponsors.polar-token-command"),
    sponsors_polar_beneficiaries: (
        dict[str, set[str]] | Unset
    ) = config_field("sponsors.polar-beneficiaries"),
    sponsors_insiders_team: str | Unset = config_field(
        "sponsors.insiders-team"
    ),
    sponsors_include_users: set[str] | Unset = config_field(
        "sponsors.include-users"
    ),
    sponsors_exclude_users: set[str] | Unset = config_field(
        "sponsors.exclude-users"
    )
)

Configuration for the insiders project.

Methods:

Attributes:

backlog_github_token property ¤

backlog_github_token: str | Unset

Get the GitHub token for backlog operations.

backlog_github_token_command class-attribute instance-attribute ¤

backlog_github_token_command: str | Unset = config_field(
    "backlog.github-token-command"
)

Command to obtain a GitHub token for the backlog.

backlog_issue_labels class-attribute instance-attribute ¤

backlog_issue_labels: dict[str, str] | Unset = config_field(
    "backlog.issue-labels"
)

Map of label names to their display value (emojis, typically).

backlog_limit class-attribute instance-attribute ¤

backlog_limit: int | Unset = config_field('backlog.limit')

Limit the number of displayed issues.

backlog_namespaces class-attribute instance-attribute ¤

backlog_namespaces: list[str] | Unset = config_field(
    "backlog.namespaces"
)

GitHub namespaces to fetch issues from.

backlog_polar_token property ¤

backlog_polar_token: str | Unset

Get the Polar token for backlog operations.

backlog_polar_token_command class-attribute instance-attribute ¤

backlog_polar_token_command: str | Unset = config_field(
    "backlog.polar-token-command"
)

Command to obtain a Polar token for the backlog.

backlog_sort class-attribute instance-attribute ¤

backlog_sort: list[Callable] | Unset = config_field(
    "backlog.sort", transform="_eval_sort"
)

Sort strategies to apply to the backlog.

index_distributions_directory class-attribute instance-attribute ¤

index_distributions_directory: str | Unset = config_field(
    "index.distributions-directory"
)

Directory to store generated Python project distributions.

index_log_path class-attribute instance-attribute ¤

index_log_path: str | Unset = config_field("index.log-path")

Where to write the index server logs to.

index_sources_directory class-attribute instance-attribute ¤

index_sources_directory: str | Unset = config_field(
    "index.sources-directory"
)

Directory to store project sources (cloned repositories).

index_start_in_background class-attribute instance-attribute ¤

index_start_in_background: bool | Unset = config_field(
    "index.start-in-background"
)

Whether to start the index server in the background.

index_url class-attribute instance-attribute ¤

index_url: str | Unset = config_field('index.url')

URL of the index server.

project_copier_template class-attribute instance-attribute ¤

project_copier_template: str | Unset = config_field(
    "project.copier-template"
)

Copier template to generate new projects with.

project_copier_template_answers class-attribute instance-attribute ¤

project_copier_template_answers: dict[str, str] | Unset = (
    config_field("project.copier-template-answers")
)

Copier template answers to use when generating a project.

project_directory class-attribute instance-attribute ¤

project_directory: str | Unset = config_field(
    "project.directory"
)

Directory in which to clone created public projects.

project_github_username class-attribute instance-attribute ¤

project_github_username: str | Unset = config_field(
    "project.github-username"
)

GitHub username to use for operations.

project_insiders_directory class-attribute instance-attribute ¤

project_insiders_directory: str | Unset = config_field(
    "project.insiders-directory"
)

Directory in which to clone created private projects.

project_insiders_namespace class-attribute instance-attribute ¤

project_insiders_namespace: str | Unset = config_field(
    "project.insiders-namespace"
)

GitHub namespace to create insiders projects in.

project_namespace class-attribute instance-attribute ¤

project_namespace: str | Unset = config_field(
    "project.namespace"
)

GitHub namespace to create public projects in.

project_post_creation_command class-attribute instance-attribute ¤

project_post_creation_command: str | list[str] | Unset = (
    config_field("project.post-creation-command")
)

Command to run after creating a project.

project_pypi_username class-attribute instance-attribute ¤

project_pypi_username: str | Unset = config_field(
    "project.pypi-username"
)

PyPI username to use when registering projects on PyPI.

project_register_on_pypi class-attribute instance-attribute ¤

project_register_on_pypi: bool | Unset = config_field(
    "project.register-on-pypi"
)

Whether to register new projects on PyPI after creating them.

sponsors_exclude_users class-attribute instance-attribute ¤

sponsors_exclude_users: set[str] | Unset = config_field(
    "sponsors.exclude-users"
)

GitHub users to never include in the insiders team (even sponsors).

sponsors_github_beneficiaries class-attribute instance-attribute ¤

sponsors_github_beneficiaries: (
    dict[str, set[str]] | Unset
) = config_field("sponsors.github-beneficiaries")

Map of GitHub sponsors to their beneficiaries.

sponsors_github_sponsored_account class-attribute instance-attribute ¤

sponsors_github_sponsored_account: str | Unset = (
    config_field("sponsors.github-sponsored-account")
)

GitHub account receiving sponsorships.

sponsors_github_token property ¤

sponsors_github_token: str | Unset

Get the GitHub token for sponsors operations.

sponsors_github_token_command class-attribute instance-attribute ¤

sponsors_github_token_command: str | Unset = config_field(
    "sponsors.github-token-command"
)

Command to obtain a GitHub token.

sponsors_include_users class-attribute instance-attribute ¤

sponsors_include_users: set[str] | Unset = config_field(
    "sponsors.include-users"
)

GitHub users to always include in the insiders team (even non-sponsors).

sponsors_insiders_team class-attribute instance-attribute ¤

sponsors_insiders_team: str | Unset = config_field(
    "sponsors.insiders-team"
)

GitHub team to add insiders to.

sponsors_minimum_amount class-attribute instance-attribute ¤

sponsors_minimum_amount: int | Unset = config_field(
    "sponsors.minimum-amount"
)

Minimum sponsorship amount to be considered an insider.

sponsors_polar_beneficiaries class-attribute instance-attribute ¤

sponsors_polar_beneficiaries: (
    dict[str, set[str]] | Unset
) = config_field("sponsors.polar-beneficiaries")

Map of Polar sponsors to their beneficiaries.

sponsors_polar_sponsored_account class-attribute instance-attribute ¤

sponsors_polar_sponsored_account: str | Unset = (
    config_field("sponsors.polar-sponsored-account")
)

Polar account receiving sponsorships.

sponsors_polar_token property ¤

sponsors_polar_token: str | Unset

Get the Polar token for sponsors operations.

sponsors_polar_token_command class-attribute instance-attribute ¤

sponsors_polar_token_command: str | Unset = config_field(
    "sponsors.polar-token-command"
)

Command to obtain a Polar token for the sponsors.

from_default_location classmethod ¤

from_default_location() -> Config

Load configuration from the default location.

from_file classmethod ¤

from_file(path: str | Path) -> Config

Load configuration from a file.

Parameters:

Unset ¤

Unset(key: str, transform: str | None = None)

A sentinel value for unset configuration options.

Parameters:

  • key (str) –
  • transform (str | None, default: None ) –

config_field ¤

config_field(
    key: str, transform: str | None = None
) -> Unset

Get a dataclass field with a TOML key.

Parameters:

  • key (str) –
  • transform (str | None, default: None ) –