Skip to content

refactor(decorators): extract scitex.decorators into standalone scitex-decorators package#237

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

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

Conversation

@ywatanabe1989
Copy link
Copy Markdown
Owner

Summary

Extracts `scitex.decorators` into scitex-decorators v0.1.0. `scitex.decorators/init.py` becomes a `sys.modules` alias.

  • Full decorator surface preserved (~25 public symbols).
  • `[decorators]` extra → `scitex-decorators[all]>=0.1.0` (transitively pulls joblib, torch, pandas, xarray).
  • 160/164 tests pass; 4 pre-existing upstream test bugs (mock.patch target).

Follow-up

This unblocks `scitex-linalg` dropping its vendored `_decorators/` copies.

🤖 Generated with Claude Code

…x-decorators package

The decorator library (numpy_fn / torch_fn / pandas_fn / xarray_fn / signal_fn
type-converters, cache_disk / cache_disk_async / cache_mem caching, batching
helpers, deprecated / not_implemented / preserve_doc / timeout, auto-order
machinery) now lives in the standalone scitex-decorators package
(https://github.com/ywatanabe1989/scitex-decorators).

scitex.decorators/__init__.py becomes a sys.modules alias to scitex_decorators.
The [decorators] extra is updated to depend on scitex-decorators[all]>=0.1.0
(joblib, torch, pandas, xarray as transitive opts).

Decoupling notes (handled in scitex-decorators's initial commit):
- scitex.config.get_paths() (used by cache_disk for cache_dir) becomes a
  best-effort try/except, falling back to SCITEX_CACHE_DIR or
  XDG_CACHE_HOME or ~/.cache/scitex-decorators/function_cache.
- The lazy `__getattr__` re-exporting scitex.session was dropped (umbrella-only).

160/164 tests pass; the 4 failures are pre-existing upstream test bugs
(mock.patch targets the lazy-imported _Memory at module scope where it doesn't
exist — same failure in scitex-python source, unrelated to extraction).

This unblocks scitex-linalg dropping its vendored _decorators copies in a
follow-up PR.

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