Skip to content

Replace deprecated tqdm_notebook with tqdm.auto - #42

Merged
bjmorgan merged 11 commits into
mainfrom
modernise-tqdm
Mar 1, 2026
Merged

Replace deprecated tqdm_notebook with tqdm.auto#42
bjmorgan merged 11 commits into
mainfrom
modernise-tqdm

Conversation

@bjmorgan

@bjmorgan bjmorgan commented Mar 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace from tqdm import tqdm, tqdm_notebook with from tqdm.auto import tqdm, which auto-detects the environment (terminal, Jupyter notebook, Jupyter lab)
  • Simplify the progress parameter to a plain bool — the 'notebook' string option is no longer needed
  • Remove the intermediate params dict and conditional branching
  • Remove the now-redundant notebook progress test

bjmorgan added 5 commits March 1, 2026 09:55
tqdm.auto auto-detects the environment (terminal, Jupyter notebook,
Jupyter lab), removing the need for callers to choose between
progress=True and progress='notebook'. The progress parameter is
now a simple boolean.
Add type hints to trajectory_from_structures signature (Sequence[Structure],
-> None). Group standard library imports together at the top. Capitalise
docstring parameter description.
types-tqdm provides proper type stubs, consistent with the existing
types-PyYAML and scipy-stubs dev dependencies.
Signals to type checkers that the package ships inline type
annotations, consistent with the project's use of type hints
throughout.

This comment was marked as resolved.

bjmorgan added 6 commits March 1, 2026 10:21
pymatgen ships its own type information and scipy-stubs is already
a dev dependency, making both ignore_missing_imports entries
unnecessary.
Run tests across 3.10-3.14 (with allow-prereleases for 3.14). Move
static type checking into a dedicated job so it runs once rather
than repeating across the version matrix.
@bjmorgan
bjmorgan merged commit 54c8a2a into main Mar 1, 2026
6 checks passed
@bjmorgan
bjmorgan deleted the modernise-tqdm branch March 1, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants