Remove redundant dependencies, update versions and modernize Dockerfile#149
Remove redundant dependencies, update versions and modernize Dockerfile#149aditeyabaral wants to merge 1 commit into
Conversation
| COPY README.md /README.md | ||
| COPY requirements.txt /requirements.txt | ||
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv | ||
|
|
There was a problem hiding this comment.
we can try using multi-stage docker builds, please check this https://ashishb.net/programming/using-python-uv-inside-docker/
| # httpx | ||
| # starlette | ||
| certifi==2025.7.14 | ||
| certifi==2026.5.20 |
There was a problem hiding this comment.
package uses uv.lock to install in new docker using uv sync --frozen --no-dev --no-install-project instead of requirements.xtxt
please run uv lock --upgrade
these packages will be upgraded to new versions:
anyio
certifi
click
fastapi
idna
pydantic
pydantic-core
selectolax
starlette
typing-extensions
typing-inspection
uvicorn
annotated-doc
| COPY app ./app | ||
| COPY README.md ./ | ||
|
|
||
| CMD ["uv", "run", "python", "-m", "app.app"] |
There was a problem hiding this comment.
uv run tries to sync again after uv sync --frozen --no-dev --no-install-project
this issue can be solved using the multi stage docker implementation
|
This PR is closed because all changes have been absorbed into #151 |
📌 Description
pytzwith the stdlibzoneinfomodule (ZoneInfo) for timezone handling — removes an unnecessary third-party dependency since Python 3.9+ shipszoneinfonatively.pipin favour ofuv, adds proper layer caching, and usesuv runto launch the app.requirements.txtand regeneratesuv.lock.🧱 Type of Change
uvand Python 3.13pytz→ stdlibzoneinfopytz, bumped all pinned versions inrequirements.txtanduv.lock🧪 How Has This Been Tested?
tests/unit/)tests/functional/)tests/integration/)✅ Checklist
scripts/run_tests.py)pre-commit run --all-files).envvars updated (if applicable)scripts/benchmark/benchmark_requests.py)🛠️ Affected API Behaviour
app/app.py– Modified/authenticateroute logicapp/pesu.py– Updated scraping or authentication handling🧩 Models
(none)
🐳 DevOps & Config
Dockerfile– Upgraded to Python 3.13, replacedpipwithuv, added layer caching.github/workflows/*.yaml– CI/CD pipeline or deployment updatespyproject.toml/requirements.txt– Removedpytz, bumped pinned versions.pre-commit-config.yaml– Linting or formatting hook changes📊 Benchmarks & Analysis
(none)
🧠 Additional Notes
datetime.now(ZoneInfo("Asia/Kolkata"))is a drop-in replacement fordatetime.now(pytz.timezone("Asia/Kolkata")).--no-install-projectduring the dependency install step so the project package itself isn't built until app code is present, enabling correct layer caching.uv.lockminimum supported Python remains >=3.11 per pyproject.toml; the Docker runtime is 3.13.