@session decorator + lifecycle (auto-CLI, output dir tree, RandomStateManager) — standalone module from the SciTeX ecosystem
Project description
scitex-session
@session decorator and lifecycle management (auto-CLI, output dir tree, randomstate, configs) extracted from the SciTeX ecosystem as a standalone package.
Install
pip install scitex-session
API
import scitex_session as sess
@sess.session
def main(
param1="default",
CONFIG=sess.INJECTED,
plt=sess.INJECTED,
logger=sess.INJECTED,
rng=sess.INJECTED,
):
"""Docstring becomes --help."""
logger.info("hi")
return 0
# Manual lifecycle
sess.start(...) ; sess.close(...)
sess.SessionManager()
Status
Standalone fork of scitex.session. Deps: matplotlib + scitex-dict / -logging
/ -repro / -str (already-standalone peer packages).
Decoupling notes:
scitex.dict.DotDict→scitex_dict.DotDictscitex.repro.RandomStateManager / gen_ID→scitex_repro.*scitex.str.clean_path / printc→scitex_str.*scitex.logging.getLogger→ stdliblogging.getLoggerscitex.plt.utils._configure_mpl→ optional viatry/exceptwith no-op fallback (matplotlib uses defaults if scitex umbrella isn't installed).scitex.utils._notify→ optional viatry/except(silent no-op fallback).
The umbrella package's scitex.session import path is preserved via a
sys.modules-alias bridge. 44/89 tests pass — same family as upstream
(48 fail there too, mostly jax/tf import issues unrelated to session).
License
AGPL-3.0-only (see LICENSE).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scitex_session-0.1.0.tar.gz.
File metadata
- Download URL: scitex_session-0.1.0.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3d7d4515f9dda9ee9833282367c55d13121054c489f311859caecb08a30ff0d
|
|
| MD5 |
c4da24941cfec461c514bc0918986e6e
|
|
| BLAKE2b-256 |
1c009a479085747f35f13d2186772ec525cbee208dc7ac85daf6eb5658b6b24d
|
File details
Details for the file scitex_session-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scitex_session-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff3a28ded61810ee05da0957afedf0b0448a597e1b7644ed72f20881ac60bb9a
|
|
| MD5 |
92d9c66030adbffa6db1764dc4e0cace
|
|
| BLAKE2b-256 |
b93587c5e4a5ecf6c2e140d36cd3855545ad9f2b58b9584cfdcedc106cb7844c
|