class Settings(BaseSettings): """All settings for guglhupf. Values can be overridden with environment variables or a .env file. See: https://pydantic-docs.helpmanual.io/usage/settings/ """ app_name: str = 'guglhupf' app_version: str = get_version( __name__, Path(__file__).parent.parent.parent, ) debug: bool = False cameras: int = 2 recordings_dir: Path = Path('/mnt/recordings/guglhupf/') uploaded_files_txt: Path = Path('/mnt/recordings/uploaded_files.txt') gps_txt: Path = Path('/mnt/recordings/gps.txt') obd_device: str = '/dev/pts/2' log_level: str = 'info' log_format: str = ( '<level>{level: <8}</level> ' + '<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> ' + '<cyan>{name}</cyan>:<cyan>{function}</cyan> - ' + '<level>{message}</level>' + '{exception}\n' ) class Config(object): # noqa: WPS431 """Enable support to load settings from .env files.""" env_file = '.env'
from pathlib import Path from single_source import get_version __version__ = get_version(__name__, Path(__file__).parent.parent)
"""Playlist Along.""" from pathlib import Path from single_source import get_version path_to_project_dir = Path(__file__).parent.parent.parent __version__ = get_version(__name__, path_to_project_dir)
async def version(self, ctx: commands.Context, /): """Show bot's version""" version = get_version(self.bot.PROJECT_NAME, self.bot.PROJECT_DIR) await ctx.reply(f"On version `{version}`.", mention_author=False)
import os import time from pathlib import Path from typing import List, Optional import click from single_source import get_version from autopr import config, database, github, repo, workdir from autopr.util import CliException, error, is_debug, set_debug __version__ = get_version( "auto-pr", Path(__file__).parent.parent, ) DEFAULT_PUSH_DELAY = 30.0 WORKDIR: workdir.WorkDir def main(): try: cli() except CliException as e: error(f"Error: {e}") if is_debug(): raise e else: exit(1) except KeyboardInterrupt: error("Aborted.")
from pathlib import Path import os from single_source import get_version import base64 _ver_path = Path(__file__).parent.parent __version__ = get_version(__name__, _ver_path) if os.environ.get("DEBUG") == "1": print('ver:', __version__, '_ver_path:', _ver_path) ICON_ART = base64.b64decode( """ICAgICAgLiwsLCwsLCwsLCwsLCwsICAgLOKVn+KWhCzilpMsIC4sLCwsLCwsLCwKICAgICAg4paQ4paI4paT4paT4paI4paI4paI4paI4paI4paI4paI4paI4paI4paI4paI4paMICDilojilojilozilZnilogiIOKWkOKWiOKWiOKWiOKWiOKWiOKWiOKWk+KWk+KWiOKWjAogICAgICDilpDilojilpPilpPilojilojilojilojilojilojilojilojilojilojilojilowgIOKWiOKWiOKWiOKWhOKWiOKVmSDilpDilojilojilojilojilojilojilpPilpPilojilowKICAgICAg4paQ4paI4paI4paA4paA4paAICAgICAgICAgICAgICAgICAgICAgICAg4paQ4paI4paI4paI4paI4paMCiAgICAgIOKWkOKWiOKWiCDilZ/ilazilazilazilazilazilazilazilazilaxNasORw5EgICAgICDCquKVqVIgICDilpDilojilojilojilojilowKICAgICAg4paQ4paI4paIIOKVn+KWk+KWk+KWk+KWk+KWk+KWk+KWk+KWk+KWk01q4pWr4pWrICAgICBgYGBgYCAg4paQ4paI4paI4paI4paI4paMCiAgICAgIOKWkOKWiOKWiCDilZ/ilpPilpPilpPilpPilpPilpPilpPilpPilpNNauKVq+KVqyAgICAgICAgICAgIOKWkOKWiOKWiOKWiOKWiOKWjAogICAgICAs4paE4paEIOKVn+KWk+KWk+KWkyAgICDilpPilpNNauKVq+KVqyAgICAgIOKVk+KVpeKJpCAgICziloTiloTiloTiloTilZUKICAgICAg4paQ4paI4paIIOKVn+KWk+KWk+KWkyAgICDilpPilpNNauKVq+KVqyAgICAgIOKVq+KVq8ORICAg4paQ4paI4paI4paI4paI4paMCiAgICAgIOKWkOKWiOKWiCDilZ/ilpPilpPilpPOps6mzqbOpuKWk+KWk01q4pWr4pWrICAgICAg4pWr4pWrw5EgICDilpDilojilojilojilojilowKICAgICAg4paQ4paI4paIIOKVn+KWk+KWk+KWk+KWk+KWk+KWk+KWk+KWk+KWk01q4pWr4pWrICAgICAgIiIiICAg4paQ4paI4paI4paI4paI4paMCiAgICAgIOKWkOKWiOKWiCDilZnilZzilZzilZzilZzilZzilZzilZzilZzilZxgIuKVqOKVqCAgICAgIOKVn+KWk+KWjCAgIOKWkOKWiOKWiOKWiOKWiOKWjAogICAgICDilpDilojilojilojilojilozilZPilZPilZPilZPilZPilZPilZPilZMn4pWa4pWd4pWdICzilZPilZPilZMg4pWa4paA4paAIOKVk+KVk+KWhOKWiOKWiOKWiOKWiOKWjAogICAgICDilpDilojilavilavilojilojilojilojilojilojilojilojilojilojilojilowgIOKWk+KWiOKWjOKWkOKWiM6m4oyQ4paQ4paT4paT4paI4paI4paI4paI4pWr4pWr4paI4paMCiAgICAgIOKWkOKWiOKWk+KWk+KWiOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKWjCAg4paI4paI4paI4paE4paI4pWXIOKWkOKWiOKWiOKWiOKWiOKWiOKWiOKWk+KWkwo=""") \ .decode()
from pathlib import Path from single_source import get_version __version__ = get_version("pyobs-core", Path(__file__).parent.parent) def version() -> str: return "0.0.0" if __version__ is None else __version__ __all__ = ["version", "__version__"]