Metadata-Version: 2.4
Name: cogzen
Version: 0.1.0
Summary: A small, modern toolkit of data-wrangling helpers for cognitive-science workflows.
Keywords: data-wrangling,pandas,logging,bids,cognitive-science
Author: cogsys.io
Author-email: cogsys.io <cogsys@cogsys.io>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Dist: pandas>=2.2
Requires-Dist: scikit-learn>=1.5
Requires-Dist: srsly>=2.4
Requires-Dist: ipython>=8.0
Requires-Dist: pytest>=8 ; extra == 'dev'
Requires-Dist: pytest-cov>=5 ; extra == 'dev'
Requires-Dist: ruff>=0.6 ; extra == 'dev'
Requires-Python: >=3.12
Project-URL: Homepage, https://cogsys.io
Project-URL: Source, https://github.com/cogsys-io/cogzen
Provides-Extra: dev
Description-Content-Type: text/markdown

# CogZen

A small, modern toolkit of data-wrangling helpers for cognitive-science
workflows — a 2026 rewrite of the original `cogzen` package.

Importing `cogzen` is cheap: heavy libraries (`pandas`, `scikit-learn`,
`IPython`) are imported lazily, only when the helper that needs them is first
used.

## Install

```bash
uv pip install cogzen          # or: pip install cogzen
uv pip install "cogzen[dev]"   # + pytest, ruff
```

## Modules

All public submodules are named `aux_*`:

| Module             | Highlights                                                           |
| ------------------ | ------------------------------------------------------------------- |
| `cogzen.aux_sys`   | `chdir(locations)` (host/user-aware), `pushdir` context manager      |
| `cogzen.aux_log`   | `Log0` — stdout + optional file logger                               |
| `cogzen.aux_str`   | `clean_str` + mapping presets, `is_ascii`, `now()`, regexes          |
| `cogzen.aux_pandas`| `disp_df`/`repr_df`, `fix_column_names`, `split_dataframe`, wine demo |
| `cogzen.aux_srsly` | `jsonable`, `yamlstr`                                                 |
| `cogzen.aux_bids`  | `dict_from_bids_filename`                                            |
| `cogzen.aux_data`  | bundled example data via `importlib.resources`                       |

## Quick start

```python
import cogzen
from cogzen.aux_str import clean_str
from cogzen.aux_str.now import now

logZ = cogzen.Log0()
log0 = logZ.logger
log0.info(now())
log0.info(clean_str("  messy   text\n\n "))
```

### Package data, the modern way

The bundled Emacs logo is an example of how data ships and is read — no
`__file__` path arithmetic, works even from inside a wheel/zip:

```python
from cogzen import aux_data

png = aux_data.read_bytes(aux_data.EMACS_LOGO_PNG)   # bytes
svg = aux_data.read_text(aux_data.EMACS_LOGO_SVG)    # str

with aux_data.path(aux_data.EMACS_LOGO_SVG) as p:    # real Path when needed
    ...
```

## Develop

```bash
uv sync --extra dev
uv run pytest
uv run ruff check .
uv run ruff format --check .
```

## License

GPL-3.0-or-later © cogsys.io
