Some checks failed
Auto Changelog & Release / detect-version-change (push) Successful in 3s
Auto Changelog & Release / release (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Failing after 6s
Build and Publish nightly package / build-and-publish (push) Successful in 33s
23 lines
662 B
Python
23 lines
662 B
Python
from pydantic import BaseModel, Field
|
|
from pathlib import Path
|
|
from typing import List, Optional
|
|
|
|
class RepoCategory(BaseModel):
|
|
name: str
|
|
subdir: str
|
|
days: Optional[int] = Field(default=None, ge=1)
|
|
volatile: bool = False
|
|
description: Optional[str] = None
|
|
is_archive: bool = False
|
|
|
|
class RepoCatDefaults(BaseModel):
|
|
dry_run: bool = True
|
|
auto_create_directories: bool = True
|
|
snapshots: bool = False
|
|
snapshot_count: int = 5
|
|
|
|
class RepoCatConfig(BaseModel):
|
|
base_dir: Path = Field(default=Path("~/Repositories").expanduser())
|
|
categories: List[RepoCategory]
|
|
defaults: Optional[RepoCatDefaults] = RepoCatDefaults()
|