Skip to main content

PyPI - Version Conda Version

wtv

An implementation of ion selection based on WTV-2.0

MSP libraries that provide either retention times or retention indices are supported (GC-MS libraries frequently carry only a retention index; select it with --retention_field).

Project Setup

  1. Install uv if you haven't already:

    # Using pip
    pip install uv
    
    # Or using Homebrew on macOS
    brew install uv
    
    # Or using curl
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Clone the repository:

    git clone https://github.com/RECETOX/wtv.git
    cd wtv
    
  3. Sync dependencies and create virtual environment:

    uv sync --all-extras
    
  4. Run commands within the virtual environment:

    uv run wtv-cli --help
    

Using pip

  1. Install the library directly from PyPI:
    pip install wtv
    

Running Tests

Using pytest

  1. Ensure you have the development dependencies installed:

    uv sync --all-extras
    
  2. Run tests with pytest:

    uv run pytest
    
  3. Run tests with verbose output:

    uv run pytest -v
    
  4. Generate a test coverage report:

    uv run pytest --cov=wtv
    

Building the Package

To build distribution packages (wheel and source distribution):

uv build

This will create:

  • dist/wtv-<version>-py3-none-any.whl - Wheel package
  • dist/wtv-<version>.tar.gz - Source distribution

Verify the installation after building:

pip install dist/wtv-*.whl
wtv-cli --help

Releases

The version is declared once, as [project].version in pyproject.toml, and is read at runtime from the installed distribution metadata (wtv.__version__, wtv-cli --version). Bump it with the configured bump-my-version setup, which rewrites pyproject.toml and uv.lock together:

uv run bump-my-version bump patch --dry-run --verbose   # preview
uv run bump-my-version bump patch                        # apply
uv sync --all-extras --dev                               # refresh the environment

Merging the resulting branch into main, tagging it v<version> and publishing a GitHub release builds and uploads the package to PyPI. See docs/releasing.md for the version policy and the full checklist.

Documentation

Testing Documentation Locally

To test the documentation locally:

  1. Serve the documentation:

    uv run mkdocs serve
    
  2. Access the documentation: Open your browser and navigate to http://127.0.0.1:8000 to view the documentation.

See the docs folder for more information.

Documentation Deployment

This project uses GitHub Actions to auto-generate and deploy documentation to GitHub Pages.

Running GitHub Actions Locally with act

To run all GitHub Actions workflows locally using act:

  1. Install act: Download and install act from its GitHub repository.

  2. Set Up Secrets: Create a .secrets file in the root of your repository and define the required secrets:

    PYPI_API_TOKEN=your-real-or-mock-token-for-testing
    
  3. Run All Workflows:

    act
    
  4. Run a Specific Workflow:

    act -W .github/workflows/package.yaml
    act -W .github/workflows/publish.yml
    
  5. Simulate Events:

    act -e push
    
  6. Use a Specific Runner:

    act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
    

Known Issues

  • It seems to generate slightly different results based on the OS version and/or Python version.

Acknowledgements

This project is based on the original work by Honglun Yuan, Yiding Jiangfang, Zhenhua Liu, Rong Rong Su, Qiao Li, Chuanying Fang, Sishu Huang, Xianqing Liu, Alisdair Robert Fernie, and Jie Luo, as published in WTV_2.0 and their associated publication.

Metadata

Release files for wtv 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wtv 0.3.0
File Size Uploaded Provenance Actions
wtv-0.3.0.tar.gz 362.1 kB Without provenance Details for wtv-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wtv 0.3.0
File Interpreter ABI Platform Actions
wtv-0.3.0-py3-none-any.whl Python 3 none any Details for wtv-0.3.0-py3-none-any.whl

Total release size: 395.0 kB

Release files / wtv-0.3.0.tar.gz

Download URL wtv-0.3.0.tar.gz
Size 362.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c6db07e2a03d24dd7f6560026effa4efcfe97cb0fd1539b4d323c5fc62b78cc4
BLAKE2b-256 checksum
How to use checksums
2df030b22880651f3b04cc8b93d1bb7b2f9dae8e1d08444da3535d9ed35253e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / wtv-0.3.0-py3-none-any.whl

Download URL wtv-0.3.0-py3-none-any.whl
Size 32.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
051fa48ca8f64e705eadb2072afc995d5cf0922ee5de0307ba3c5a29cd94f36f
BLAKE2b-256 checksum
How to use checksums
6ee44107f8771ff0ea5d73c0e85bf16bf56963c98a9687a57df4d5ee338b9a0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for wtv 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page