Remove the exact antlr4-python3-runtime==4.11.* pin
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- backend, build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Use SymPy's Lark backend.
parse_latex(s, backend='lark')is available from SymPy 1.13 and needs the pure-Pythonlarkpackage 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. - 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 ofmumot/_vendor/pydstool/_cst.py, would remove the dependency and be fully under MuMoT's control. - Keep the pin but make it track whatever SymPy needs, e.g. by depending on the
latexextra that newer SymPy versions may provide.
Testing any change
tests/test_symbolic_regression.pycompares 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) anddocs/MuMoTuserManual.ipynbcover the user-facing syntax. - The
minimum_versions_jobCI job checks the oldest allowed versions of all dependencies.
- Lingua principale
- Python
- Stelle
- 24
- Fork
- 5
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DiODeProject/MuMoT
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
DiODeProject/MuMoT#412 · 1 commento ·
-
Changing visualisation type of MuMoTstochasticSimulationViews through GUI causes plot deformations (squeezing)Forse di nuovo libera @joefresna l’ha presa 2298 giorni fa e non c’è nessuna pull request aperta. Apertabug
DiODeProject/MuMoT#409 · 1 assegnatario ·
-
bug testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
DiODeProject/MuMoT#407 · 2 commenti ·
-
Use of bare 'except:' is badApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
DiODeProject/MuMoT#387 · 1 commento ·
-
Multicontroller do not accept some of the plotting parameters that normal controllers supportApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
DiODeProject/MuMoT#385 ·
Tutte le issue di DiODeProject/MuMoT
Issue simili
-
customer-reported question
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Azure/azure-sdk-for-python#49548 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
btclib-org/btclib-wallet#409 ·
I maintainer di solito rispondono entro 1 giorno
-
Phase 2 PSA Capability & Career Profile
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fastmachinelearning/hls4ml#1582 ·
I maintainer di solito rispondono entro 3 giorni
-
Sort modelsApertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno