posit-dev / posit-dev/rsconnect-python
Consider supporting additional dependency formats
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 37
- Forks
- 28
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 7
Descripción
We use bot RSConnect and pypoetry quite a bit. It would be great if rsconnect-python supported deploying pypoetry projects or other ways of plugging in to pyproject.toml buiold systems.
We currently work around this limitation by wrapping rsconnect with our own tool that first runs poetry export (without extra repo urls) and copies our apps (stored using an src project layout) to a deploy directory containing the AppStore json file. We use the fact that rsconnect.environment stops after finding a requirements.txt.
There's multiple aspects of this request:
Implementation options
1.1 Possibly consider supporting poetry directly
1.2 There are other competing approaches to python dependencies e.g. PEP 631 allows dependencies in the pyproject.toml and other package management tools like Hatch use that. Allow cli callers to specify a cli tool to be called for resolving project dependencies
1.3 like 1.2 but only expose it via an api (i.e. pluggable build / dependency systems would only be supported by writing a custom tool that has rsconnect-python as a dependency and invokes it programatically.
Streamline non-pypi package registries
When running poetry export on a project that's setup to use non pypi repositories, extra pip urls are included at the top of the generated requirements.txt. When the repo is private and password protected
- rsconnect-python fails to properly parse the requirements
- the username and password are included in the file, which is insecure given how connect deploys content.
We currently work around this by stripping any extra pip url lines and manually configuring the connect serve's pipconf with the required private package registry details.
Support other project layouts
We organize all our project sources under a src folder. Poetry already knows about our python path and where our sources, tests and resources live. One possible approach would be to allow deploying an app by copying dist tarball since poetry build can easily produce that (the poetry.lock / poetry export should still be used to resolve dependencies though).
Guía de contribución
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.
Línea de trabajo
Comienza con el manejo de requirements.txt por parte de rsconnect.environment descrito en el issue y, después, reproduce el flujo de trabajo de poetry export y el caso de un registro privado. Compara la resolución de dependencias solicitada de pyproject.toml, las estructuras src y las opciones de despliegue de tarballs de dist. Para darlo por terminado, sería necesario definir el alcance y la ruta de implementación que cubran el comportamiento seleccionado de las dependencias y de la estructura del proyecto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- build-system, cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100