Skip to content

Migración a UV - #615

Open
Scot3004 wants to merge 13 commits into
masterfrom
uv
Open

Migración a UV#615
Scot3004 wants to merge 13 commits into
masterfrom
uv

Conversation

@Scot3004

Copy link
Copy Markdown
Member

Pull request

Para actualizar las dependencias y no complicarnos con el tema de las versiones en 2 archivos separados requirements propongo la instalación de UV y simplificar bastante el proceso de instalación y configuración

https://github.com/PyBAQ/website/actions/runs/31187466442/job/92895552548

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Este PR migra la gestión de dependencias Python a uv (con pyproject.toml y lockfile), eliminando requirements.txt/test-requirements.txt para simplificar la instalación local y estandarizar CI/CD y Netlify.

Changes:

  • Se introducen dependencias y grupos (dev) en pyproject.toml y se elimina el uso de requirements*.txt.
  • Se actualizan workflows de GitHub Actions y la documentación para ejecutar comandos vía uv sync / uv run.
  • Se ajusta el fixture de Selenium para soportar ejecución remota o local según TEST_COMMAND_EXECUTOR.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 8 comments.

Show a summary per file
FileDescription
tests/conftest.pyCambia el setup del webdriver para soportar Remote vs local según env vars.
test-requirements.txtElimina el archivo de dependencias de tests.
runtime.txtElimina el pin de runtime Python.
requirements.txtElimina el archivo principal de dependencias.
README.mdActualiza comandos y guías para usar uv en dev/tests/scripts.
pyproject.tomlDefine dependencias del proyecto y grupo dev; habilita tool.uv.
netlify.tomlCambia build para instalar uv y construir con uv run lektor.
install.mdActualiza guía de instalación para uv y Python 3.12+.
django-quilla.lektorprojectRemueve sección [packages] del proyecto Lektor.
.python-versionFija versión de Python para entorno local.
.github/workflows/test-e2e.ymlMigra workflow E2E a uv (setup-uv, uv sync, uv run).
.github/workflows/deploy.ymlMigra build/deploy a uv y actualiza acciones.
.github/workflows/actualizar-eventos-meetup.ymlMigra workflow de actualización de eventos a uv.
Suppressed comments (1)

README.md:115

  • uv run scripts/create_events.py probablemente no funciona por la misma razón que el otro script (sin shebang/ejecutable). En la guía y en el workflow se usa uv run python ....
Para ejecutar localmente el script que genera los content.lr para cada uno de los eventos
uv run scripts/create_events.py

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadtests/conftest.py
Comment on lines +23 to 26
browser = os.getenv("TEST_BROWSER", "chrome").lower()
# Si no existe la variable, dejamos None para saber que es local
command_executor = os.getenv("TEST_COMMAND_EXECUTOR")
options = posible_options[browser]
Comment threadpyproject.toml
Comment on lines +17 to +28
[dependency-groups]
dev = [
"cryptography>=50.0.0",
"online-w3c-validator>=0.3.21",
"pylint>=4.0.6",
"pytest>=9.1.1",
"pytest-base-url>=2.1.0",
"requests>=2.34.2",
"screenpy>=5.0.0",
"screenpy-selenium>=4.0.4",
"selenium>=4.46.0",
]
Comment threadpyproject.toml
Comment on lines +30 to +31
[tool.uv]
managed = true
Comment threadREADME.md
Comment on lines +104 to 107
Para ejecutar localmente el script que extrae la información de meetup

python scripts/events.py
uv run scripts/graphql_api.py

Comment threadREADME.md
Comment on lines 84 to 88
para ejecutar los test ejecuta los siguientes comandos

docker compose up
python -m pytest
uv run pytest

Comment threadREADME.md
Comment on lines +63 to 66
Los paquetes de pruebas ya están incluidos en `uv sync`.

pip install -r test-requirements.txt
Puedes verificar que todo esté listo ejecutando

Comment threadnetlify.toml
[build]
environment = { PYTHON_VERSION = "3.13" } No newline at end of file
environment = { PYTHON_VERSION = "3.13" }
command = "curl -LsSf https://astral.sh/uv/install.sh | sh && uv sync --locked && uv run lektor build --output-path public"
Comment thread.python-version
@@ -0,0 +1 @@
3.14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Scot3004