{ "info": { "author": "The pytest-wdl development team", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing" ], "description": "[![Travis CI](https://travis-ci.com/EliLillyCo/pytest-wdl.svg?branch=master)](https://travis-ci.com/EliLillyCo/pytest-wdl)\n[![Code Coverage](https://codecov.io/gh/elilillyco/pytest-wdl/branch/master/graph/badge.svg)](https://codecov.io/gh/elilillyco/pytest-wdl)\n[![Documentation Status](https://readthedocs.org/projects/pytest-wdl/badge/?version=latest)](https://pytest-wdl.readthedocs.io/en/latest/?badge=latest)\n\nThis package is a plugin for the [pytest](https://docs.pytest.org/en/latest/) unit testing framework that enables testing of workflows written in [Workflow Description Language](https://github.com/openwdl).\n\n## Dependencies\n\n* Python 3.6+\n* Java 1.8+\n* [Cromwell](https://github.com/broadinstitute/cromwell/releases/tag/38) JAR file\n* [Docker](https://www.docker.com/get-started) daemon (if your WDL tasks depend on Docker images)\n\nOther python dependencies are installed when you install the library.\n\n## Installation\n\n### Install from PyPI\n\n```commandline\n$ pip install pytest-wdl\n```\n\n### Install from source\n\nYou can to clone the repository and install:\n\n```\n$ make install\n```\n\nOr use pip to install from github:\n\n```commandline\n$ pip install git+https://github.com/elilillyco/pytest-wdl.git\n```\n\n### Install optional dependencies\n\nSome optional features of pytest-wdl have additional dependencies that are loaded on-demand. For example, to enable comparison of expected and actual BAM file outputs of a workflow, the [pysam](https://pysam.readthedocs.io/) library is required.\n\nThe following plugins require an \"extras\" installation:\n\n- Data types\n - bam\n- URL schemes\n - dx (DNAnexus)\n- Other\n - progress (show progress bars when downloading files)\n\nTo install the dependencies for a data type that has extra dependencies:\n\n```\n$ pip install pytest-wdl[]\n```\n\nTo do this locally, you can clone the repo and run:\n\n```commandline\n$ pip install -e .[]\n```\n\nTo install pytest-wdl and **all** extras dependencies:\n\n```\n$ pip install pytest-wdl[all]\n```\n\n## Usage\n\nThe pytest-wdl plugin provides a set of fixtures for use with pytest. Here is a quick example:\n\n```python\n# test_variant_caller.py\ndef test_variant_caller(workflow_data, workflow_runner):\n inputs = workflow_data.get_dict(\"bam\", \"bai\")\n inputs[\"index\"] = {\n \"fasta\": workflow_data[\"index_fa\"],\n \"organism\": \"human\"\n }\n expected = workflow_data.get_dict(\"vcf\")\n workflow_runner(\n \"variant_caller.wdl\",\n inputs,\n expected\n )\n```\n\nThis test will execute a workflow (such as the following one) with the specified inputs, and will compare the outputs to the specified expected outputs.\n\n```wdl\n# variant_caller.wdl\nversion 1.0\n\nstruct Index {\n File fasta\n String organism\n}\n\nworkflow call_variants {\n input {\n File bam\n File bai\n Index index\n }\n ...\n output {\n File vcf = variant_caller.vcf\n }\n}\n```\n\nInput and output data are defined in a `test_data.json` file in the same directory as your test script:\n\n```json\n{\n \"bam\": {\n \"url\": \"http://example.com/my.bam\"\n },\n \"bai\": {\n \"url\": \"http://example.com/my.bam.bai\"\n },\n \"index_fa\": {\n \"name\": \"chr22.fasta\"\n },\n \"vcf\": {\n \"url\": \"http://example.com/expected.vcf.gz\",\n \"type\": \"vcf\",\n \"allowed_diff_lines\": 2\n }\n}\n```\n\nFor details, [read the docs](https://pytest-wdl.readthedocs.io).\n\n## Contributing\n\nTo develop pytest-wdl, clone the repository and install all the dependencies:\n\n```commandline\n$ git clone https://github.com/EliLillyCo/pytest-wdl.git\n$ pip install -r requirements.txt\n```\n\nTo run the full build and unit tests, run:\n\n```commandline\n$ make\n```\n\n## Support\n\npytest-wdl is *not* an official product of Eli Lilly or DNAnexus. Please do *not* contact these companies (or any employees thereof) for support. To report a bug or feature request, please open an issue in the [issue tracker](https://github.com/EliLillyCo/pytest-wdl/issues).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/EliLillyCo/pytest-wdl", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "pytest-wdl", "package_url": "https://pypi.org/project/pytest-wdl/", "platform": "", "project_url": "https://pypi.org/project/pytest-wdl/", "project_urls": { "Documentation": "https://pytest-wdl.readthedocs.io/en/stable/", "Homepage": "https://github.com/EliLillyCo/pytest-wdl", "Source": "https://github.com/EliLillyCo/pytest-wdl", "Tracker": "https://github.com/EliLillyCo/pytest-wdl/issues" }, "release_url": "https://pypi.org/project/pytest-wdl/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "Pytest plugin for testing WDL workflows.", "version": "1.1.1" }, "last_serial": 5896289, "releases": { "0.1.2.dev0": [ { "comment_text": "", "digests": { "md5": "27d9592392736c9b0be37992c4f367ea", "sha256": "7442582ad1ce71e1f1d864816066100f6ae1de6fb3951d3a59db725fe6ba1f6a" }, "downloads": -1, "filename": "pytest_wdl-0.1.2.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "27d9592392736c9b0be37992c4f367ea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 39220, "upload_time": "2019-08-23T18:53:23", "url": "https://files.pythonhosted.org/packages/0f/0a/b431aa2ad0206a6b8e336d2490f60ec090ad9132629e24787960af17a004/pytest_wdl-0.1.2.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e8487146b661ba6bea63bfcab72b957a", "sha256": "e51f7ac7aef8ac80f3833bb4d2bae4f4986395d1aabe55cba717d8fb714b9a26" }, "downloads": -1, "filename": "pytest-wdl-0.1.2.dev0.tar.gz", "has_sig": false, "md5_digest": "e8487146b661ba6bea63bfcab72b957a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2320908, "upload_time": "2019-08-23T18:53:27", "url": "https://files.pythonhosted.org/packages/7f/d7/3cd96ef575f878a28c6c4bf74c9b2003af9e5a2de703913a445e4fcf54cc/pytest-wdl-0.1.2.dev0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "732c6fc25e573bd453fa7b61ba2b5341", "sha256": "d664316f6b05451ddd4e78cd5b12a9c9b1108f33a39454613955af0885bf4129" }, "downloads": -1, "filename": "pytest-wdl-1.0.0.tar.gz", "has_sig": false, "md5_digest": "732c6fc25e573bd453fa7b61ba2b5341", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2322563, "upload_time": "2019-08-23T20:21:20", "url": "https://files.pythonhosted.org/packages/9c/14/bd936eff6c3fb18a0aec28af9328b6f9973fdf27d55ff7e696d3eeafea02/pytest-wdl-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "12f2ae9c3e20272c2265160bc3912660", "sha256": "c965014656e50b51bb22f7f600d748ac230667f62ec782eaef49043f1f8de3ba" }, "downloads": -1, "filename": "pytest-wdl-1.0.1.tar.gz", "has_sig": false, "md5_digest": "12f2ae9c3e20272c2265160bc3912660", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2324722, "upload_time": "2019-08-28T13:08:03", "url": "https://files.pythonhosted.org/packages/7d/f9/eb37d062303164161b891417d3f8f11d5a370bece2772406ee47a9fb822c/pytest-wdl-1.0.1.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "f02ca0b3821f15b498f7ca60a8c63fa2", "sha256": "8abfb3d2ab11380cf460329d9a2590ac595c74d5573a3c06d5379166f82918be" }, "downloads": -1, "filename": "pytest-wdl-1.1.1.tar.gz", "has_sig": false, "md5_digest": "f02ca0b3821f15b498f7ca60a8c63fa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2340878, "upload_time": "2019-09-27T13:58:35", "url": "https://files.pythonhosted.org/packages/bb/7f/72e4e7aa2fd2dd016ae6b6a86ebf31673a18d2076d642c4f53bbc99a1b7a/pytest-wdl-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f02ca0b3821f15b498f7ca60a8c63fa2", "sha256": "8abfb3d2ab11380cf460329d9a2590ac595c74d5573a3c06d5379166f82918be" }, "downloads": -1, "filename": "pytest-wdl-1.1.1.tar.gz", "has_sig": false, "md5_digest": "f02ca0b3821f15b498f7ca60a8c63fa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2340878, "upload_time": "2019-09-27T13:58:35", "url": "https://files.pythonhosted.org/packages/bb/7f/72e4e7aa2fd2dd016ae6b6a86ebf31673a18d2076d642c4f53bbc99a1b7a/pytest-wdl-1.1.1.tar.gz" } ] }