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.3.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.3-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_session-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 9edecb7dd3392a3a3a41187cb0f284afab3f13f903187b4f768311eebd16f7ff
MD5 2a0bb0bf4fd11101d4fcecc5830b1d28
BLAKE2b-256 70c1b1cb4adb15566d8e1db6080855b89e16ea2a5ed725d1d19ecd288d7b1e53

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: scitex_session-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f463377d6c682de2cb9484e02ef46ce2ed1cb560dfaebe83f67761adaa5eca3
MD5 97170d426cd432b3dfdac28b34205f1f
BLAKE2b-256 811d30691c6974b928f5e4067697f79ff4159dc1209e08413e333c93298c0df0

See more details on using hashes here.

Provenance

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