The setup-uv action passes python-version through as UV_PYTHON, and uv
does not accept the '3.x' wildcard that actions/setup-python supports.
This caused 'uv sync' to fail with:
error: No interpreter found for executable name `3.x` in managed
installations or search path
Pin to '3.12' to match requires-python and the version used in
app-tests.yml.
Co-authored-by: David Davis <86290+daviddavis@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* init uv project
* fix workflow for uv
* updated docs
* update dependabot to use uv
* lock python version
* fix python version
* update uv deps
* Address PR review feedback
- Match dependency versions to dev branch (Django 5.2.13, allauth 65.15.1,
health-check 4.2.2 with [celery,redis] extras, ruff 0.15.10, fakeredis[lua])
- Remove unused django-decorator-include
- Restore single-line ruff ignore array (unrelated whitespace)
- Drop description/readme; mark as non-package via [tool.uv]
- Install supervisor via apk in Dockerfile
- Fix CI: use 'uv run playwright install'; drop unused --all-extras
- README: set `dynamic = ["version"]` to avoid declaring version
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Fix container startup after switch to uv base image
- Dockerfile: prepend /.venv/bin to PATH so python/gunicorn/celery
resolve directly (entrypoint.sh and supervisord.conf invoke them by
name).
- entrypoint.sh: drop hardcoded /usr/local/bin/ prefix for supervisord;
apk installs it to /usr/bin/supervisord, so let PATH resolve it.
- uv.lock: regenerated after pyproject.toml switched to dynamic version.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Add mkdocs and supervisor as uv deps; lint pyproject.toml
- Add a 'docs' dependency group with mkdocs and its plugins; switch
build-docs.yml to use uv and remove docs/requirements.txt.
- Add supervisor to project deps so it ships in /.venv/bin instead of
via apk in the Docker image.
- Add validate-pyproject and pyproject-fmt as dev deps and pre-commit
hooks; reformat pyproject.toml accordingly.
- Drop unused dynamic version metadata (app version comes from the
VERSION env var, not package metadata).
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Move uv virtualenv into /yamtrack workdir
Set WORKDIR before copying pyproject.toml and uv.lock so the
uv-managed virtualenv is created at /yamtrack/.venv. Update PATH
accordingly and ignore .venv in .dockerignore.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Pin Python version to 3.12
Add .python-version so uv (and pyenv) consistently select the
same interpreter when creating the virtualenv.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Enable uv bytecode compilation in Docker image
Set UV_COMPILE_BYTECODE=1 so uv precompiles .pyc files during
'uv sync'. This trades a small build-time cost for faster
container/worker startup since Python doesn't have to compile
modules on first import.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Use multi-stage Docker build to slim the runtime image
Build the virtualenv with uv in a builder stage based on
ghcr.io/astral-sh/uv:python3.12-alpine, then copy /yamtrack/.venv
into a clean python:3.12-alpine final stage. The final image no
longer carries the uv binary or its build cache, and collectstatic
runs via 'python manage.py' since the venv is on PATH.
Set UV_LINK_MODE=copy in the builder so packages are copied (not
symlinked from a cache that the final stage will not see).
Reduces image size by roughly 150 MB in local testing.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Drop validate-pyproject and pyproject-fmt; revert pyproject formatting
Remove the validate-pyproject and pyproject-fmt pre-commit hooks
and dev dependencies, and revert the cosmetic pyproject.toml
formatting that pyproject-fmt had applied (e.g. nested
[tool.ruff.lint.*] tables and tight list spacing) to match the
dev branch style.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Pin Alpine version and preserve bytecode in Docker build
- Pin both builder and final stages to alpine3.21 for reproducibility
and binary compatibility between the virtualenv and runtime image.
- Stop deleting __pycache__ after uv sync so the bytecode compiled via
UV_COMPILE_BYTECODE=1 is actually shipped, giving faster startup and
avoiding runtime compilation on read-only filesystems.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Add django-tailwind-cli for Tailwind integration
Replaces the standalone tailwindcss CLI workflow with django-tailwind-cli,
which downloads and manages the standalone Tailwind binary itself. The
output path (static/css/main.css) is preserved so base.html and the
production build are unchanged.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Split dev dependency group into lint and test
The dev group now includes both via include-group, preserving the existing
'uv sync' behavior while allowing lint-only or test-only installs.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Revert "Add django-tailwind-cli for Tailwind integration"
This reverts commit 3796e53e347b81784e69fa0328c4e3d35be90d55.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* Add back pinning version to `0.0.0`
Using `dynamic`, uv tries to build an egg every time dependencies are
added/removed.
* Switch docs group from mkdocs to zensical
Upstream migrated documentation tooling from mkdocs to zensical. Replace
the mkdocs-* plugins in the docs dependency group with zensical and the
squidfunk fork of mike that zensical expects.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
---------
Co-authored-by: Eddi <75438446+minerop5000@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: David Davis <86290+daviddavis@users.noreply.github.com>
- Add WeekStartDayChoices model and week_start_day field to User
- Add week start day dropdown to preferences page with new week SVG icon
- Update statistics activity grid to respect week start day setting
- Update events calendar to respect week start day setting
- Dynamically render weekday labels in both statistics and calendar views
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* refresh Item.image on details page when missing
The home page reads Item.image from the database, which is only written
when the Item is first created. The details page fetches metadata live
from the provider, so the two can drift out of sync — most visibly when
a TV season has no thumbnail at creation time and never updates after.
Add a helper that opportunistically refreshes Item.image whenever a
details view has freshly-fetched metadata and the stored image is empty
or IMG_NONE. Apply it to the primary item in media_details and
season_details, and to tracked items surfaced through related sections
(e.g. the seasons listed on a TV details page).
Fixes#1365.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* address PR review: bulk_update + select_related
- enrich_items_with_user_data now collects items needing an image
refresh and issues a single Item.objects.bulk_update at the end
instead of one save per item. Lookup building was extracted to
_build_user_media_lookup to keep complexity in check.
- filter_media_prefetch now select_relateds 'item' so accessing
current_instance.item in the details views doesn't trigger an
extra query.
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
---------
Co-authored-by: David Davis <86290+daviddavis@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
* add an auto-login option
* apply review suggestions
* add tests for auto-login middleware
* only auto-login with active users
* document the new env variable `YAMTRACK_AUTO_LOGIN_USERNAME`
* fix auto login middleware tests
---------
Co-authored-by: FuzzyGrim <stromed_chariotman@aleeas.com>
* change /medialist to /username and change view to not require login and go by username in url not logged in user
* adjust sidebar to reference username and grid/list to not show edit icons when not viewing your own page
* update tests to account for changed medialist url
* private profile checkbox in account page and 404 on visit if profile is private and not logged in as the user
* added test to check profile 404s if private and is visible otherwise
* remove extra movie item creation as it was unnecessary
* clean up code according to code bot suggestions
* pre-commit run and fixes
* add migration file to support private field
* add correct params to medialist endpoint calls
* mid-commit improving functionality for logged in and anonymous users
* fix ui for anonymous and external viewers of a list
* use target_user wherever needed in media list components
* redirect if user doesn't have that media type enabled and error if there are no media types
* hide browse/add buttons if not the target user and there is nothing tracked and add redirect to signin button
* remove references to unused variable
* remove behaviour for anonymous users from base template
* use view instead of hardcoded url
* use blocks to override segments of sidebar instead of duplicating the whole sidebar code
* make profile private by default
* make profile private by default
* fix import ordering
---------
Co-authored-by: FuzzyGrim <stromed_chariotman@aleeas.com>
* Use user date format for episodes
* Add long EU date format option
* add date format choice migration
* fix date format migration order
---------
Co-authored-by: FuzzyGrim <stromed_chariotman@aleeas.com>