Skip to main content

A library and CLI for ion selection in mass spectrometry data.

Project description

PyPI - Version Conda Version

wtv

An implementation of ion selection based on WTV-2.0

Project setup:

1: Clone the code from wtv

2: Create an empty miniconda environment miniconda

3: Manage dependencies with poetry

Running tests:

Using unittest:

To run all tests using unittest, use the following command:

python -m unittest discover -s tests

Using pytest:

  1. Ensure pytest is installed:

    poetry install --with dev
    
  2. Run tests with pytest:

    poetry run pytest
    
  3. Debug test failures: Run pytest with verbose output:

    poetry run pytest -v
    
  4. Generate a test coverage report: Install pytest-cov:

    poetry add pytest-cov --group dev
    

    Run tests with coverage:

    poetry run pytest --cov=wtv
    

Testing Documentation Locally

To test the documentation locally, follow these steps:

  1. Install MkDocs: Ensure MkDocs and its dependencies are installed. run:

    poetry install --with docs
    
  2. Serve the Documentation: Use the following command to serve the documentation locally:

    poetry run mkdocs serve
    
  3. Access the Documentation: Open your browser and navigate to http://127.0.0.1:8000 to view the documentation.

Running GitHub Actions Locally with act

To run all GitHub Actions workflows locally using act, follow these steps:

  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. For example:

    PYPI_API_TOKEN=your-real-or-mock-token-for-testing
    
  3. Run All Workflows: Use the following command to run all workflows:

    act
    
  4. Run a Specific Workflow: To run a specific workflow, use the -W flag followed by the path to the workflow file:

    act -W .github/workflows/package.yaml
    act -W .github/workflows/publish.yml
    
  5. Specify an Event: If you want to simulate a specific event (e.g., push, pull_request, or release), use the -e flag:

    act -e push
    
  6. Use a Specific Runner: By default, act uses a lightweight Docker image. To use a full-featured image (e.g., ubuntu-latest), specify it:

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

Example act Commands

  • Run all workflows:

    act
    
  • Run the package.yaml workflow:

    act -W .github/workflows/package.yaml
    
  • Run the publish.yml workflow:

    act -W .github/workflows/publish.yml
    
  • Simulate a release event:

    act -e release
    

Documentation Deployment

This project uses GitHub Actions to auto-generate and deploy documentation to GitHub Pages. To enable this workflow, ensure the following secret is configured in your repository:

  • GITHUB_TOKEN: This is automatically provided by GitHub for workflows. No additional setup is required unless you are using a custom token.

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.

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

wtv-0.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wtv-0.1.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file wtv-0.1.0.tar.gz.

File metadata

  • Download URL: wtv-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.0 Linux/6.11.0-1015-azure

File hashes

Hashes for wtv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a37234a8235c6c39f3e5d80033cc102dc6c37a92ac409b2e851185b952375ac7
MD5 63953f686c51788a5561b78f503eee9a
BLAKE2b-256 1f2261fe8e03570c3e50c6e3c48fcfcc1dcd6be0bf05881382fadba2faae2603

See more details on using hashes here.

File details

Details for the file wtv-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wtv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.0 Linux/6.11.0-1015-azure

File hashes

Hashes for wtv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dae66d738496829e9a642e01146dd8e0c50dd1cc6a18ea00fda68181049c0d30
MD5 748361acb794ced6d26ce7b05bb4eca4
BLAKE2b-256 205cb592f16cddcf6af2de556fe5812bb9cf8811aa35bb346c6da0cc37619eb8

See more details on using hashes here.

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