Files
repoCat/src/repocat/models/config.py
Max P. 7f629fd752
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
feat(clean): add snapshot support for volatile repo cleanup
2025-11-27 18:21:20 +01:00

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()