An implementation of ion selection based on WTV-2.0
1: Clone the code from wtv
2: Create an empty miniconda environment miniconda
3: Manage dependencies with poetry
To run all tests using unittest, use the following command:
python -m unittest discover -s tests-
Ensure
pytestis installed:poetry install --with dev
-
Run tests with
pytest:poetry run pytest
-
Debug test failures: Run
pytestwith verbose output:poetry run pytest -v
-
Generate a test coverage report: Install
pytest-cov:poetry add pytest-cov --group dev
Run tests with coverage:
poetry run pytest --cov=wtv
To test the documentation locally, follow these steps:
-
Install MkDocs: Ensure MkDocs and its dependencies are installed. run:
poetry install --with docs
-
Serve the Documentation: Use the following command to serve the documentation locally:
poetry run mkdocs serve
-
Access the Documentation: Open your browser and navigate to
http://127.0.0.1:8000to view the documentation.
To run all GitHub Actions workflows locally using act, follow these steps:
-
Install act: Download and install
actfrom its GitHub repository. -
Set Up Secrets: Create a
.secretsfile in the root of your repository and define the required secrets. For example:PYPI_API_TOKEN=your-real-or-mock-token-for-testing -
Run All Workflows: Use the following command to run all workflows:
act
-
Run a Specific Workflow: To run a specific workflow, use the
-Wflag followed by the path to the workflow file:act -W .github/workflows/package.yaml act -W .github/workflows/publish.yml
-
Specify an Event: If you want to simulate a specific event (e.g.,
push,pull_request, orrelease), use the-eflag:act -e push
-
Use a Specific Runner: By default,
actuses 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
-
Run all workflows:
act
-
Run the
package.yamlworkflow:act -W .github/workflows/package.yaml
-
Run the
publish.ymlworkflow:act -W .github/workflows/publish.yml
-
Simulate a
releaseevent:act -e release
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.
- It seems to generate slightly different results based on the OS version and/or Python version.
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.