Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Remove the exact antlr4-python3-runtime==4.11.* pin

Abierto
#418 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start by locating the dependency configuration containing antlr4-python3-runtime and the MuMoT call sites using SymPy's parse_latex. Run tests/test_symbolic_regression.py, then review the Greek-letter notebook, docs/MuMoTuserManual.ipynb, and the minimum_versions_job. Done means the dependency conflict is resolved while all listed parsing and compatibility checks still pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem

Since #417, every MuMoT dependency is unpinned (lower bounds only) except antlr4-python3-runtime==4.11.*.

The pin is required, not a choice. MuMoT parses model definitions and parameter names with sympy.parsing.latex.parse_latex, whose default ANTLR backend ships a parser generated with ANTLR 4.11. The ANTLR Python runtime only works with parsers generated by the same major.minor version, so SymPy ≥ 1.12 raises ImportError: LaTeX parsing requires the antlr4 Python package ... version 4.11 with any other runtime.

As a result, MuMoT cannot be installed alongside packages that pin a different ANTLR runtime. For example, Hydra/OmegaConf require antlr4-python3-runtime==4.9.*, and pip will refuse to resolve the two together. The pin will also need bumping whenever SymPy regenerates its parser.

Possible approaches

  1. Use SymPy's Lark backend. parse_latex(s, backend='lark') is available from SymPy 1.13 and needs the pure-Python lark package instead of ANTLR. This would remove the ANTLR dependency entirely. However, the Lark grammar is newer and parses some inputs differently: subscripts, \emptyset, Greek letters, and implicit multiplication would all need checking against every model and parameter string MuMoT handles. A fallback could try ANTLR first if it is importable and the right version, else use Lark.
  2. Stop using a general LaTeX parser. MuMoT mostly parses symbol names (e.g. \alpha_\beta, r_{1}) and simple rate expressions. A small dedicated parser for that subset, in the spirit of mumot/_vendor/pydstool/_cst.py, would remove the dependency and be fully under MuMoT's control.
  3. Keep the pin but make it track whatever SymPy needs, e.g. by depending on the latex extra that newer SymPy versions may provide.

Testing any change

  • tests/test_symbolic_regression.py compares symbolic results against the previous release; it exercises model parsing for several models, including Greek letters, subscripts and constant reactants.
  • The test notebooks (in particular TestNotebooks/MiscTests/MuMoTtest_GreekLetters.ipynb) and docs/MuMoTuserManual.ipynb cover the user-facing syntax.
  • The minimum_versions_job CI job checks the oldest allowed versions of all dependencies.
Lenguaje dominante
Python
Estrellas
24
Forks
5
Métricas de merge de PR
Sin PR fusionados en 30 d

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DiODeProject/MuMoT

Todos los issues de DiODeProject/MuMoT

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.