Consider replacing Hatch with uv for project and dependency management
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- build-system, tooling
Línea de trabajo
Comienza con el pyproject.toml del proyecto y los comandos de Hatch indicados para compilación, entornos, scripts, versionado, linting y pruebas. Compara esas responsabilidades con uv, incluido el uv.lock propuesto, y revisa function-template-python para analizar su configuración heredada. El trabajo estará terminado cuando se documente qué se ganaría y qué se perdería, y se llegue a una decisión sobre si se debe reemplazar Hatch en ambos proyectos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What problem are you facing?
When I created this SDK in November 2023, the Python build and project management space was crowded. There was Hatch, Poetry, PDM, Flit, setuptools, and probably others I'm forgetting. There wasn't a clear winner. I picked Hatch because it was a PyPA project, it had a clean pyproject.toml-based configuration, and it covered everything I needed: environments, scripts, building, versioning, and linting (via its Ruff integration).
Today we use Hatch for:
- Building wheels and sdists (
hatch build), usinghatchlingas the PEP 517 build backend. - Environments with isolated dependencies — a
generateenv for protoc, adocsenv for pdoc, and ahatch-static-analysisenv for Ruff. - Scripts like
hatch run generate:protocandhatch run docs:generate. - Version management — reading the version from
__version__.pyat build time. - Linting via
hatch fmt, which wraps Ruff. - Testing via
hatch test, which wraps pytest.
function-template-python uses the same setup, and any new functions built from it will inherit it.
Hatch works. I don't have a concrete problem with it.
What I do have is a growing sense that the ecosystem has converged on uv in the ~18 months since I made this choice. uv didn't exist when I picked Hatch — its first release was February 2024, three months after this SDK. Since then it's grown to 82k GitHub stars (vs Hatch's 7.2k and Poetry's 34.3k) and 14,600 dependent repositories (vs Hatch's 1,800). It has a full-time team at Astral and ships releases at a pace that's hard to ignore.
We already use Astral's Ruff for linting and formatting, and I'm interested in their ty type checker too. Adopting uv would mean our Python build toolchain is entirely Astral: uv for project management, Ruff for linting, and potentially ty for type checking. That's less build plumbing for contributors to learn and install.
uv would also give us a lockfile (uv.lock) for pinning transitive dependencies, which Hatch doesn't support. We pin direct dependencies today but have no control over what versions of their transitive dependencies get installed.
How could this Function help solve your problem?
I think we should evaluate replacing Hatch with uv for project and dependency management in this SDK and in function-template-python. I'll follow up with a comment breaking down what we'd gain and what we'd lose.
- Lenguaje dominante
- Python
- Estrellas
- 12
- Forks
- 15
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 7
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de crossplane/function-sdk-python
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
crossplane/function-sdk-python#129 · 1 comentario ·
-
Dependency Dashboard Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 10/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
crossplane/function-sdk-python#5 · 1 comentario ·
Todos los issues de crossplane/function-sdk-python
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
learningequality/ricecooker#747 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
run-llama/llama_index#23199 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
KhronosGroup/glTF-Blender-IO#2769 ·