Skip to content

refactor(session): extract scitex.session into standalone scitex-session package#251

Open
ywatanabe1989 wants to merge 1 commit intodevelopfrom
feat/extract-scitex-session
Open

refactor(session): extract scitex.session into standalone scitex-session package#251
ywatanabe1989 wants to merge 1 commit intodevelopfrom
feat/extract-scitex-session

Conversation

@ywatanabe1989
Copy link
Copy Markdown
Owner

Summary

Extracts `scitex.session` into scitex-session v0.1.0 (887 LOC).

  • `@session` decorator + `start/close/SessionManager/INJECTED` preserved.
  • `[session]` extra → `scitex-session>=0.1.0` (transitively pulls matplotlib + scitex-dict / -logging / -repro / -str).
  • 44/89 tests pass (vs 41 upstream — the gap is jax/tf import noise unrelated to session).

Decoupling

  • `scitex.dict / .repro / .str / .logging` → direct `scitex_dict / _repro / _str` + stdlib `logging` imports.
  • `scitex.plt.utils._configure_mpl` → optional `try/except` (no-op fallback when umbrella missing — matplotlib uses defaults).
  • `scitex.utils._notify` → optional `try/except` (silent no-op fallback).

🤖 Generated with Claude Code

…ion package

@session decorator + lifecycle management (auto-CLI, output dir tree,
RandomStateManager, configs) now live in the standalone scitex-session package
(https://github.com/ywatanabe1989/scitex-session).

scitex.session/__init__.py becomes a sys.modules alias.
The [session] extra is updated to depend on scitex-session>=0.1.0.

Decoupling notes (handled in scitex-session's initial commit):
- scitex.dict.DotDict → scitex_dict.DotDict (peer dep)
- scitex.repro.RandomStateManager / gen_ID → scitex_repro.* (peer dep)
- scitex.str.clean_path / printc → scitex_str.* (peer dep)
- scitex.logging.getLogger → stdlib logging.getLogger
- scitex.plt.utils._configure_mpl → optional via try/except + no-op fallback
  (matplotlib uses defaults if scitex umbrella isn't installed)
- scitex.utils._notify → optional via try/except (silent no-op fallback)

44/89 tests pass (same family as upstream which has 41 passing — the gap is
all jax/tf import noise unrelated to the session module).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant