Split the Python `Commons` agent into a commons object and an agent
Los mantenedores suelen responder en 1 día
@jat255 ya está trabajando en esto.
Desde el 28/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
#414 splits R's commons() into two parts. commons() gathers the data sources, semantic layer, and context layer into an object that code can call without a model, and agent() builds the agent around that object. In Python, commons.Commons is still the agent, so the same name means different things in the two packages, and Python has no way to call trusted calculations without an agent.
This issue is to give Python the same split, with the same methods and the same deprecation path for the old call form.
Agent-written details
What R has after #414
commons(data_sources=, semantic_layer=, context_layer=)returns an object with these methods:search(),measure(),metrics(),calculation(),context(),describe(), andrun_sql(). The methods return plain values (data frames or text), without handles.agent(client, commons=, ...)builds the agent from that object, and the agent exposes the object asagent$commons.- The old form,
commons(client, ...), still builds an agent, with a deprecation warning. metrics(where=)also accepts a SQL-like string ("region = 'EMEA' AND revenue > 0") or unnamed triples. A value parsed from a quoted literal stays a string, so'001'does not become the number1.- The printed object lists its tables, its measures, and the signatures of its methods. It hides the calculation methods that have nothing to run.
Open questions for Python
- What to call each part.
Commonsis the agent class today. One option is a newAgentclass, withCommonsbecoming the data object. In that case,Commons(client, ...)can detect achatlas.Chatas its first argument, warn, and return an agent, as R does. - Where shared behaviour goes. The
wherestring grammar and the method names in the search text are behaviour users can see in both packages. They belong intests/shared/as fixtures, not as a copy for each language.
Reference
- R implementation:
pkg-r/R/commons.Randpkg-r/R/agent.Rin #414. - Python agent today:
pkg-py/src/commons/_agent.py. - Tracked in kata as r4tp.
- Lenguaje dominante
- Python
- Estrellas
- 64
- Forks
- 4
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 22
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 posit-dev/commons
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
UX when there's no markerAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
R binds Snowflake semantic view variables without their declared typePosiblemente ocupada @jat255 la tomó hace 8 días. Abiertobug r
posit-dev/commons#447 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de posit-dev/commons
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
aws-samples/sample-per-model-bedrock#639 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
awslabs/visual-asset-management-system#937 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
project-codeflare/codeflare-sdk#1195 ·
Los mantenedores suelen responder en 1 día
-
Bump numpy dependencyAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
pandas-dev/pandas-stubs#2051 ·
Los mantenedores suelen responder en 1 día