Metadata-Version: 2.4
Name: scitex-gen
Version: 0.1.5
Summary: General utilities (caching, env detection, normalization, mat→npy, xml→dict, TimeStamper, …) — standalone module from the SciTeX ecosystem
Author-email: Yusuke Watanabe <ywatanabe@scitex.ai>
License-Expression: AGPL-3.0-only
Project-URL: Homepage, https://github.com/ywatanabe1989/scitex-gen
Project-URL: Repository, https://github.com/ywatanabe1989/scitex-gen
Project-URL: Documentation, https://scitex-gen.readthedocs.io
Keywords: scitex,general,utilities
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: scipy
Requires-Dist: h5py
Requires-Dist: matplotlib
Requires-Dist: readchar
Requires-Dist: torch
Requires-Dist: scitex-context>=0.1.0
Requires-Dist: scitex-decorators>=0.1.1
Requires-Dist: scitex-dict>=0.1.0
Requires-Dist: scitex-introspect>=0.1.1
Requires-Dist: scitex-os>=0.1.0
Requires-Dist: scitex-session>=0.1.0
Requires-Dist: scitex-sh>=0.1.0
Requires-Dist: scitex-stats>=0.1.0
Requires-Dist: scitex-str>=0.1.2
Requires-Dist: scitex
Provides-Extra: torch
Requires-Dist: torch; extra == "torch"
Requires-Dist: xarray; extra == "torch"
Provides-Extra: dev
Requires-Dist: joblib; extra == "dev"
Requires-Dist: scitex; extra == "dev"
Requires-Dist: xarray; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
Requires-Dist: myst-parser>=2.0; extra == "docs"
Provides-Extra: all
Requires-Dist: scitex-gen[torch]; extra == "all"
Dynamic: license-file

# scitex-gen

<!-- scitex-badges:start -->
[![PyPI](https://img.shields.io/pypi/v/scitex-gen.svg)](https://pypi.org/project/scitex-gen/)
[![Python](https://img.shields.io/pypi/pyversions/scitex-gen.svg)](https://pypi.org/project/scitex-gen/)
[![Tests](https://github.com/ywatanabe1989/scitex-gen/actions/workflows/test.yml/badge.svg)](https://github.com/ywatanabe1989/scitex-gen/actions/workflows/test.yml)
[![Install Test](https://github.com/ywatanabe1989/scitex-gen/actions/workflows/install-test.yml/badge.svg)](https://github.com/ywatanabe1989/scitex-gen/actions/workflows/install-test.yml)
[![Coverage](https://codecov.io/gh/ywatanabe1989/scitex-gen/graph/badge.svg)](https://codecov.io/gh/ywatanabe1989/scitex-gen)
[![Docs](https://readthedocs.org/projects/scitex-gen/badge/?version=latest)](https://scitex-gen.readthedocs.io/en/latest/)
[![License: AGPL v3](https://img.shields.io/badge/license-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
<!-- scitex-badges:end -->


General-purpose utilities (caching, environment detection, normalization, mat→npy, xml→dict, TimeStamper, etc.) extracted from the [SciTeX](https://github.com/ywatanabe1989/scitex-python) ecosystem as a standalone package.

## Install

```bash
pip install scitex-gen
```

## API

```python
import scitex_gen as gen

gen.cache(...)
gen.TimeStamper()
gen.xml2dict(...)
gen.to_z(tensor)          # requires torch
gen.to_even(n)
gen.to_odd(n)
gen.transpose(...)
```

## Status

Standalone fork of `scitex.gen`. The umbrella package's `scitex.gen` import path
is preserved via a `sys.modules`-alias bridge.

Decoupling notes:
- `scitex.{decorators,str,os,introspect,session,context,sh,dict}` →
  `scitex_*` direct imports (peer packages).
- `scitex.torch.nanstd` → optional via `try/except` with a torch-only
  fallback (only matters for `_norm.to_z / to_nanz`).
- `import scitex` removed from `_less.py` (was unused in module body).
- self-references in `_norm_cache.py` rewritten to `scitex_gen.*`.

## License

AGPL-3.0-only (see [LICENSE](./LICENSE)).
