Skip to content

Commit

Permalink
feat: add option to run the tests to cli tool
Browse files Browse the repository at this point in the history
  • Loading branch information
wd15 committed Aug 11, 2023
1 parent c46e3a7 commit 12b2680
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _data/python-pfhub/pfhub/scripts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import pykwalify.core
import requests

from .. import test as pfhub_test
from ..convert import meta_to_zenodo_no_zip, download_file
from ..convert import download_zenodo as download_zenodo_
from ..convert import download_meta as download_meta_
Expand Down Expand Up @@ -138,6 +139,15 @@ def convert_to_zenodo(file_path, dest):
click.secho(f"{file_path} is not a valid PFHub meta.yaml", fg="red")


@cli.command(epilog=EPILOG)
def test(): # pragma: no cover
"""Run the PFHub tests
Currently creates a stray .coverage file when running.
"""
pfhub_test()


def zenodo_regexs():
"""Regular expression for acceptable Zenodo URLs"""
return [
Expand Down

0 comments on commit 12b2680

Please sign in to comment.