Skip to main content

@session decorator + lifecycle (auto-CLI, output dir tree, RandomStateManager) — standalone module from the SciTeX ecosystem

Project description

scitex-session

PyPI Python Tests Install Test Coverage Docs License: AGPL v3

@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.DotDictscitex_dict.DotDict
  • scitex.repro.RandomStateManager / gen_IDscitex_repro.*
  • scitex.str.clean_path / printcscitex_str.*
  • scitex.logging.getLogger → stdlib logging.getLogger
  • scitex.plt.utils._configure_mpl → optional via try/except with no-op fallback (matplotlib uses defaults if scitex umbrella isn't installed).
  • scitex.utils._notify → optional via try/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

scitex_session-0.1.4.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_session-0.1.4-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

Details for the file scitex_session-0.1.4.tar.gz.

File metadata

  • Download URL: scitex_session-0.1.4.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_session-0.1.4.tar.gz
Algorithm Hash digest
SHA256 dc9e009d32b4dba413bb59be8e4e35bb65a4a261265c9ac813f05e3ef871c4bd
MD5 a081fad56884baa5ae3cada422dc9435
BLAKE2b-256 94aa0eec9899d5b1145a128f65e740a3b58c439aa3c9a68b2f5b560e1876a1b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_session-0.1.4.tar.gz:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-session

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_session-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: scitex_session-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 35.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_session-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8d905f7a7af4e9efced58a25720712b2523edf2413af6f938829db67cb5b7bff
MD5 08a3a6185f1a9cd2d1b1d8e2baee3fe5
BLAKE2b-256 c903de816fc94fb3be93b36c3744d966c175397a7f081ccc2723ca6cb92c786b

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_session-0.1.4-py3-none-any.whl:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-session

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page