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

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_session-0.1.2.tar.gz
  • Upload date:
  • Size: 32.3 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.2.tar.gz
Algorithm Hash digest
SHA256 2b0f7dd009de36dc1823bd8ec2f4d67cf90db3441efeb57f6ec400a1c4fffcae
MD5 27c380b2050f097468738c6b0ed49133
BLAKE2b-256 71210344218c422be260b4dd0e5706b8e9bd4a7ecb08b3119c519e9c09e0f8f5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: scitex_session-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f909ebb3da82870e43bb6f8baa8bc0fc81313dc2eba2f987eb1415240d595e3
MD5 2c85e852001d0037e307dd9bcea70825
BLAKE2b-256 8afc6bc27deb876d9bbc1bb160ce68bbc5cde199c586c7c39bdbdb5ac51c8973

See more details on using hashes here.

Provenance

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