This issue was found by a Codex global code scan of the repository.
Affected code:
|
from IPython.display import HTML, display |
|
|
|
from dargs import Argument, Variant |
|
from dargs.dargs import _resolve_ref |
|
|
|
__all__ = ["JSON"] |
|
dependencies = [ |
|
"typeguard>=4", |
|
'typing_extensions; python_version < "3.8"', |
|
] |
|
requires-python = ">=3.7" |
|
[project.optional-dependencies] |
|
test = [ |
|
"ipython", |
|
"jsonschema", |
|
"pyyaml", |
|
] |
|
typecheck = [ |
|
"ty==0.0.17", |
|
"sphinx", |
|
"ipython", |
|
] |
|
yaml = [ |
|
"pyyaml", |
|
] |
|
## Additional features |
|
|
|
- [PEP 484](https://peps.python.org/pep-0484/) type annotations |
|
- Native integration with [Sphinx](https://github.com/sphinx-doc/sphinx), [DP-GUI](https://github.com/deepmodeling/dpgui), and [Jupyter Notebook](https://jupyter.org/) |
|
- JSON encoder for `Argument` and `Variant` classes |
|
- Generate [JSON schema](https://json-schema.org/) from an `Argument`, which can be further integrated with JSON editors such as [Visual Studio Code](https://code.visualstudio.com/) |
|
- Load dict values from external JSON/YAML files via the `$ref` key |
Problem:
The README advertises native Jupyter Notebook integration, and dargs.notebook imports IPython.display at module import time. However, IPython is only listed under the test and typecheck extras, not as a runtime dependency or a notebook extra.
Reproducer in a minimal runtime environment without IPython:
from dargs.notebook import JSON
Observed behavior:
ModuleNotFoundError: No module named 'IPython'
Expected behavior:
Either declare a dedicated notebook extra such as dargs[notebook] that includes IPython and document it, or make dargs.notebook fail with a clear optional-dependency message.
This issue was found by a Codex global code scan of the repository.
Affected code:
dargs/dargs/notebook.py
Lines 27 to 32 in b4db564
dargs/pyproject.toml
Lines 18 to 22 in b4db564
dargs/pyproject.toml
Lines 30 to 43 in b4db564
dargs/README.md
Lines 28 to 34 in b4db564
Problem:
The README advertises native Jupyter Notebook integration, and
dargs.notebookimportsIPython.displayat module import time. However,IPythonis only listed under thetestandtypecheckextras, not as a runtime dependency or a notebook extra.Reproducer in a minimal runtime environment without IPython:
Observed behavior:
Expected behavior:
Either declare a dedicated notebook extra such as
dargs[notebook]that includes IPython and document it, or makedargs.notebookfail with a clear optional-dependency message.