Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#418 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Python
スター
24
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DiODeProject/MuMoT のほかの issue

DiODeProject/MuMoT の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。