More straightening out of the new project structure.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
12
.readthedocs.yml
Normal file
12
.readthedocs.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: 2
|
||||
build:
|
||||
os: ubuntu-20.04
|
||||
tools:
|
||||
python: "3.10"
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
formats: all
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
- path: .
|
||||
19
backend/src/playlist/env.py
Normal file
19
backend/src/playlist/env.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""Environment variables used throughout the application."""
|
||||
|
||||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
|
||||
load_dotenv() # Take environment variables from .env.
|
||||
|
||||
PLEX_SERVER_URL = os.getenv("PLEX_SERVER_URL", "http://default-plex-server-url")
|
||||
PLEX_TOKEN = os.getenv("PLEX_TOKEN", "default-plex-token")
|
||||
|
||||
DATABASE_URL = os.getenv(
|
||||
"DATABASE_URL", "postgres://user:password@localhost/database"
|
||||
) # Default fallback
|
||||
|
||||
MAX_TRACKS_QUERIED = int(
|
||||
os.getenv("MAX_TRACKS_QUERIED", 1000)
|
||||
) # Default to 1000 if not set
|
||||
9
codecov.yml
Normal file
9
codecov.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
comment: false
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: "100"
|
||||
patch:
|
||||
default:
|
||||
target: "100"
|
||||
2062
poetry.lock
generated
Normal file
2062
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
87
pyproject.toml
Normal file
87
pyproject.toml
Normal file
@@ -0,0 +1,87 @@
|
||||
[tool.poetry]
|
||||
name = "plex-playlist"
|
||||
version = "0.0.0"
|
||||
description = "Plex Playlist"
|
||||
authors = ["Cliff Hill <xlorep@darkhelm.org>"]
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
homepage = "https://github.com/xlorepdarkhelm/plex-playlist"
|
||||
repository = "https://github.com/xlorepdarkhelm/plex-playlist"
|
||||
documentation = "https://plex-playlist.readthedocs.io"
|
||||
packages = [
|
||||
{ include = "playlist", from = "backend/src" },
|
||||
]
|
||||
classifiers = [
|
||||
"Development Status :: 1 - Planning",
|
||||
]
|
||||
|
||||
[tool.poetry.urls]
|
||||
Changelog = "https://github.com/xlorepdarkhelm/plex-playlist/releases"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.12"
|
||||
click = ">=8.0.1"
|
||||
asyncpg = "^0.28.0"
|
||||
sqlalchemy = "^2.0.23"
|
||||
pydantic = "^2.5.0"
|
||||
alembic = "^1.12.1"
|
||||
python-dotenv = "^1.0.1"
|
||||
aiologger = "^0.7.0"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
Pygments = ">=2.10.0"
|
||||
black = ">=21.10b0"
|
||||
coverage = {extras = ["toml"], version = ">=6.2"}
|
||||
darglint = ">=1.8.1"
|
||||
flake8 = ">=4.0.1"
|
||||
flake8-bandit = ">=2.1.2"
|
||||
flake8-bugbear = ">=21.9.2"
|
||||
flake8-docstrings = ">=1.6.0"
|
||||
flake8-rst-docstrings = ">=0.2.5"
|
||||
furo = ">=2021.11.12"
|
||||
isort = ">=5.10.1"
|
||||
mypy = ">=0.930"
|
||||
pep8-naming = ">=0.12.1"
|
||||
pre-commit = ">=2.16.0"
|
||||
pre-commit-hooks = ">=4.1.0"
|
||||
pytest = ">=6.2.5"
|
||||
pyupgrade = ">=2.29.1"
|
||||
safety = ">=1.10.3"
|
||||
sphinx = ">=4.3.2"
|
||||
sphinx-autobuild = ">=2021.3.14"
|
||||
sphinx-click = ">=3.0.2"
|
||||
typeguard = ">=2.13.3"
|
||||
xdoctest = {extras = ["colors"], version = ">=0.15.10"}
|
||||
myst-parser = {version = ">=0.16.1"}
|
||||
|
||||
[tool.poetry.scripts]
|
||||
plex-playlist = "playlist.__main__:main"
|
||||
|
||||
[tool.coverage.paths]
|
||||
source = ["src", "*/site-packages"]
|
||||
tests = ["tests", "*/tests"]
|
||||
|
||||
[tool.coverage.run]
|
||||
branch = true
|
||||
source = ["playlist", "tests"]
|
||||
|
||||
[tool.coverage.report]
|
||||
show_missing = true
|
||||
fail_under = 100
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
force_single_line = true
|
||||
lines_after_imports = 2
|
||||
|
||||
[tool.mypy]
|
||||
strict = true
|
||||
warn_unreachable = true
|
||||
pretty = true
|
||||
show_column_numbers = true
|
||||
show_error_codes = true
|
||||
show_error_context = true
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
Reference in New Issue
Block a user