Metadata-Version: 2.4
Name: pypvfs
Version: 1.0.1
Summary: Python bindings for Pinnacle Technology PVFS (virtual filesystem for physiological recordings)
Author: Pinnacle Technology Inc.
License: BSD 3-Clause License
        
        Copyright (c) 2023, Thresa Kelly
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Repository, https://github.com/Pinnacle-Technology-Inc/pypvfs
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pydantic>=2
Requires-Dist: SQLAlchemy>=2
Requires-Dist: Pillow>=10.0.0
Provides-Extra: video
Requires-Dist: av; extra == "video"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: av; extra == "test"
Provides-Extra: examples
Requires-Dist: pyedflib; extra == "examples"
Requires-Dist: av; extra == "examples"
Dynamic: license-file

# pypvfs

**`pypvfs`** is the PyPI distribution name for **Pinnacle Technology PVFS** — a virtual filesystem used for physiological recordings. This is **not** related to the historical HPC “Parallel Virtual File System” or other unrelated “PVFS” acronyms.

After installation you import the **`pvfs_tools`** Python package (same module layout as in the former Morelia monolith):

```bash
pip install pypvfs
```

```python
from pvfs_tools.Core.pvfs_data_file import PvfsDataFile
```

## Optional extras

| Extra | Purpose |
|-------|---------|
| `video` | WebM/VP8 export (`WebMWriter` uses PyAV). `pip install "pypvfs[video]"` |
| `test` | `pytest` + `av` for running the test suite locally |
| `examples` | `pyedflib` + `av` for the Tk GUI EDF and WebM examples |

## Native library

The package ships platform-specific native libraries under `pvfs_tools.Core` (`.dll` on Windows, `.so` on Linux) when present in the wheel or source tree. If your platform binary is missing, build from `src/pvfs_tools/Core/` using `build_linux.sh` (Linux/WSL) or `build_pvfs_x64.ps1` (under `src/pvfs_tools/` on Windows), then from this repository root run `pip install -e .`.

## Examples (repository `examples/`)

Requires a working `pypvfs` install; GUI examples need a display.

| Script | Extra deps | Description |
|--------|------------|-------------|
| `examples/pvfs_create_cli.py` | — | CLI to create a synthetic PVFS file |
| `examples/pvfs_to_edf_converter.py` | `pyedflib` | Tk GUI: PVFS → EDF+ |
| `examples/pvfs_to_video_converter.py` | `pypvfs[video]` | Tk GUI: PVFS video → WebM |

```bash
pip install pyedflib
python examples/pvfs_to_edf_converter.py
```

## Documentation

- Quick reference: [docs/pvfsQuickStart.txt](docs/pvfsQuickStart.txt)

## Tests

```bash
pip install -e ".[test]"
pytest
```

## Repository

Source and issues: see **Repository** URL in `pyproject.toml`.

## Publishing releases

Step-by-step (tags, GitKraken, PyPI checks): **[docs/RELEASE.md](docs/RELEASE.md)**.

Do **not** rely on `twine upload` from a developer machine for routine releases (credentials drift and audit pain). Use the GitHub Action instead.

1. **Configure [trusted publishing](https://docs.pypi.org/trusted-publishers/)** on PyPI for this GitHub repository and workflow `publish.yml` (OIDC — no `PYPI_API_TOKEN` in repo secrets unless you choose that path).
2. **Bump** `version` in `pyproject.toml`, commit, then create and push a **version tag** matching your policy, e.g. `v0.1.2`:
   ```bash
   git tag v0.1.2
   git push origin v0.1.2
   ```
   Pushing tag `v*` runs [`.github/workflows/publish.yml`](.github/workflows/publish.yml): builds **sdist + wheel on Ubuntu** and uploads with `pypa/gh-action-pypi-publish`. (A Linux+Windows matrix used to emit two wheels with the **same filename** for this package, which broke `twine check` with `BadZipFile`; use **cibuildwheel** later if you need explicit `win_amd64` wheels on PyPI.)
3. **Manual run:** Actions → **Publish to PyPI** → *Run workflow* (same build/upload path).

**Note:** `ptech-morelia` already uses a similar pattern (tag push + matrix build + OIDC) in its `packaging` workflow — keep both projects on the same release habit so versions stay aligned when you cut coordinated releases.
