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.1.tar.gz (32.2 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.1-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_session-0.1.1.tar.gz
  • Upload date:
  • Size: 32.2 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.1.tar.gz
Algorithm Hash digest
SHA256 5d795b58e432024f053bf98669755042b08caee6cde95264b68360231ba67042
MD5 24278872d43c8f4d417d5667b30382cf
BLAKE2b-256 b9cae72667b4ca1e32495f06fe95528391b81205af9b129a3a9883bb0a5873dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_session-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: scitex_session-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d27b71b009e33b45476e03e224a3ddc704d78639bf7dd3bb2f129c3eae072df
MD5 dc26b60c82c1f5b58b8f1cf78afbd238
BLAKE2b-256 c780f80589d00b2cfdd73e6d87fe0becabc456db9f63fac053d0c5d77b2cb770

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_session-0.1.1-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