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

SciTeX

`@session` decorator + lifecycle (auto-CLI, output dir tree, randomstate, configs).

Full Documentation · pip install scitex-session


Installation

pip install scitex-session

Quick Start

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

1 Interfaces

Python API
import scitex_session as sess

# Decorator — wraps main() with auto-CLI, output dir, configs, RNG.
@sess.session
def main(CONFIG=sess.INJECTED, logger=sess.INJECTED, rng=sess.INJECTED):
    ...

# Manual lifecycle
sess.start(...)
sess.close(...)

# Class-style manager
mgr = 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.

Part of SciTeX

scitex-session is part of SciTeX.

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.

License

AGPL-3.0-only (see LICENSE).


SciTeX

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.5.tar.gz (32.8 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.5-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scitex_session-0.1.5.tar.gz
  • Upload date:
  • Size: 32.8 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.5.tar.gz
Algorithm Hash digest
SHA256 c7189a28385a8d8b4661e5fc4d4a72dccf9bf11a72b65c5dae494fd7f0757994
MD5 59e5b7288549d526c23b302ed018f4ff
BLAKE2b-256 97990744a29787984351212cff8d171ceb318707f16344d288a2b5871975eaa4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: scitex_session-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 36.0 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 475851fcefdc3668462aeadc2fc8ebb4898b2180f2a622517ad985187ca74f93
MD5 3760ec776ab7b87cf25d2ef357cc33c4
BLAKE2b-256 6b36e78f077ea05021cda5197f97f0d85e8c29a944f7da0f45818671c5866b6c

See more details on using hashes here.

Provenance

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