-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor codebase, extend configuration file support
Changes: - Load configuration files from current directory when run as an executable - Add support for YAML and TOML configuration files and convert default configuration file into those formats - Generate new configuration file locations for files with .yaml, .yml and .toml extensions - Add PyYAML as a dependency; tomllib is available in the Python standard library from 3.11 upwards - Bump minimum supported Python version to 3.12 - Capture and log error messages from exceptions raised with exit code 2 when loading configuration files - Override default Logger class and add method to log multi-line messages - Log Windows paths with non-escaped backslashes - If no configuration file can be loaded, exit the process immediately with exit code 1 - Only create one template instance (on application startup) for best performance - Add startup log message with uvicorn logger acknowledging Starlette - Add checks for Docker and Kubernetes container environments - Add version number in package and display in web UI - Minor web UI margin and text adjustments - Open all web UI links in a new tab - Update README to reflect changes - Refactor code, add new functions for utility - Add type hints - Add coding declaration to the top of each Python script - Update workflow to use main branch README to update Docker Hub description after pushing a new image - Include pyproject.toml file for configuring ruff: change enforced line length from 88 to 100 and target version from py39 to py312 - Update pre-commit hooks and use check-merge-conflict and check-toml hooks - Use --fix instead of --fix-only for ruff linter pre-commit hook
- Loading branch information
Showing
17 changed files
with
2,167 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,7 @@ logs/ | |
build/ | ||
dist/ | ||
*.spec | ||
|
||
# Config | ||
docs/config.* | ||
pyproject.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-json | ||
types: [file] # override `types: [json]` | ||
types: [file] | ||
files: \.(json|conf)$ | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.4.10 | ||
rev: v0.9.2 | ||
hooks: | ||
- id: ruff | ||
args: [--fix-only] | ||
args: [--fix] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.