{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Testing" ], "description": "# doppel-cli\n\n[![PyPI Version](https://img.shields.io/pypi/v/doppel-cli.svg)](https://pypi.org/project/doppel-cli) [![Travis Build Status](https://img.shields.io/travis/jameslamb/doppel-cli.svg?label=travis&logo=travis&branch=master)](https://travis-ci.org/jameslamb/doppel-cli)\n[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/jameslamb/doppel-cli.svg?label=appveyor&logo=appveyor&branch=master)](https://ci.appveyor.com/project/jameslamb/doppel-cli) [![Documentation Status](https://readthedocs.org/projects/doppel-cli/badge/?version=latest)](https://doppel-cli.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/gh/jameslamb/doppel-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/jameslamb/doppel-cli) [![Python Versions](https://img.shields.io/pypi/pyversions/doppel-cli.svg)](https://pypi.org/project/doppel-cli) [![downloads](https://img.shields.io/pypi/dm/doppel-cli.svg)](https://pypi.org/project/doppel-cli) [![license](https://img.shields.io/pypi/l/doppel-cli.svg)](https://pypi.org/project/doppel-cli)\n\n`doppel-cli` is an integration testing framework for testing API similarity across languages.\n\n# What is the value of keeping the same public interface?\n\nThis project tests API consistency in libraries across languages.\n\nWhy is this valuable?\n\n* For developers:\n * less communication overhead implementing changes across languages\n * forcing function to limit growth in complexity of the public API\n* For users:\n * no need to re-learn the API when switching languages\n * form better expectations when switching languages\n\n## Documentation\n\nFor the most up-to-date documentation, please see https://doppel-cli.readthedocs.io/en/latest/.\n\n## Getting started\n\n`doppel-cli` can be installed from source just like any other python package.\n\n```\npython setup.py install\n```\n\nYou can also install from PyPi, the official package manager for Python. To avoid conflicts with the existing `doppel` project on that repository, it is distributed as `doppel-cli`.\n\n```\npip install doppel-cli\n```\n\n## Example: Testing continuity between R and Python implementations\n\nIn this example, I'll show how to use `doppel` to test continuity between R and Python implementations of the same API. For this example, I used the `argparse` library.\n\nNOTE: This example assumes that you already have `argparse` installed locally.\n\nIf you don't run one or both of these:\n\n```{shell}\nRscript -e \"install.packages('argparse')\"\npip install argparse\n```\n\nFirst, you need to generate special files that `doppel` uses to store information about a project's API. These are created using the `doppel-describe` tool.\n\n```{shell}\nPACKAGE=argparse\n\n# The R package\ndoppel-describe \\\n -p ${PACKAGE} \\\n --language R \\\n --data-dir $(pwd)/test_data\n\n# The python package\ndoppel-describe \\\n -p ${PACKAGE} \\\n --language python \\\n --data-dir $(pwd)/test_data\n```\n\nCool! Let's do some testing! `doppel-test` can be used to compare multiple packages.\n\n```{shell}\ndoppel-test \\\n --files $(pwd)/test_data/python_${PACKAGE}.json,$(pwd)/test_data/r_${PACKAGE}.json \\\n | tee out.log \\\n | cat\n```\n\nThis will yield something like this:\n\n```{text}\nFunction Count\n==============\n+---------------------+----------------+\n| argparse [python] | argparse [r] |\n+=====================+================+\n| 0 | 1 |\n+---------------------+----------------+\n\n\nFunction Names\n==============\n+-----------------+---------------------+----------------+\n| function_name | argparse [python] | argparse [r] |\n+=================+=====================+================+\n| ArgumentParser | no | yes |\n+-----------------+---------------------+----------------+\n\nFunction Argument Names\n=======================\nNo shared functions.\n\nClass Count\n===========\n+---------------------+----------------+\n| argparse [python] | argparse [r] |\n+=====================+================+\n| 9 | 0 |\n+---------------------+----------------+\n\n\nClass Names\n===========\n+-------------------------------+---------------------+----------------+\n| class_name | argparse [python] | argparse [r] |\n+===============================+=====================+================+\n| MetavarTypeHelpFormatter | yes | no |\n+-------------------------------+---------------------+----------------+\n| ArgumentParser | yes | no |\n+-------------------------------+---------------------+----------------+\n| FileType | yes | no |\n+-------------------------------+---------------------+----------------+\n| HelpFormatter | yes | no |\n+-------------------------------+---------------------+----------------+\n| RawDescriptionHelpFormatter | yes | no |\n+-------------------------------+---------------------+----------------+\n| Action | yes | no |\n+-------------------------------+---------------------+----------------+\n| ArgumentDefaultsHelpFormatter | yes | no |\n+-------------------------------+---------------------+----------------+\n| Namespace | yes | no |\n+-------------------------------+---------------------+----------------+\n| RawTextHelpFormatter | yes | no |\n+-------------------------------+---------------------+----------------+\n\n\nClass Public Methods\n====================\nNo shared classes.\n\nArguments in Class Public Methods\n=================================\nNo shared classes.\n\nTest Failures (12)\n===================\n1. Function 'ngettext()' is not exported by all packages\n\n2. Function 'ArgumentParser()' is not exported by all packages\n\n3. Packages have different counts of exported classes! argparse [python] (9), argparse [r] (0)\n\n4. Class 'HelpFormatter()' is not exported by all packages\n\n5. Class 'Namespace()' is not exported by all packages\n\n6. Class 'RawDescriptionHelpFormatter()' is not exported by all packages\n\n7. Class 'ArgumentParser()' is not exported by all packages\n\n8. Class 'MetavarTypeHelpFormatter()' is not exported by all packages\n\n9. Class 'Action()' is not exported by all packages\n\n10. Class 'ArgumentDefaultsHelpFormatter()' is not exported by all packages\n\n11. Class 'FileType()' is not exported by all packages\n\n12. Class 'RawTextHelpFormatter()' is not exported by all packages\n```\n\nAs you can see above, the `argparse` Python package has 9 exported classes while the R package has none.\n\nFrom `doppel`'s perspective, this is considered a test failure. If you run `echo $?` in the terminal, should should see `1` printed. Returning a non-zero exit code like this tells CI tools like [Travis](https://travis-ci.org/) that the test was a failure, making `doppel` useful for CI (more on this in a future example).\n\nYou may be thinking \"well wait, surely you'd want to test for way more stuff than just counts of classes and functions, right?\". Absolutely! See [the project issues issues](https://github.com/jameslamb/doppel-cli/issues) for a backlog of features I'd like to add. PRs are welcomed!!!\n\nTo learn more about the things that are currently configurable, you can run:\n\n```\ndoppel-describe --help\n```\n\nand\n\n```\ndoppel-test --help\n```\n\n## Contributing\n\nBug reports, questions, and feature requests should be directed to [the issues page](https://github.com/jameslamb/doppel-cli/issues).\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for information on how to contribute.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jameslamb/doppel-cli", "keywords": "", "license": "BSD 3-clause", "maintainer": "James Lamb", "maintainer_email": "jaylamb20@gmail.com", "name": "doppel-cli", "package_url": "https://pypi.org/project/doppel-cli/", "platform": "", "project_url": "https://pypi.org/project/doppel-cli/", "project_urls": { "Homepage": "http://github.com/jameslamb/doppel-cli" }, "release_url": "https://pypi.org/project/doppel-cli/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "An integration testing framework for testing API similarity of software libraries.", "version": "0.2.1" }, "last_serial": 5389269, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "a033aa9191a433f6ab748a8b0dbdf6d9", "sha256": "d347022e5504831c2853800b769b7d8a1625d5d36a783c771a28ba435b5059ea" }, "downloads": -1, "filename": "doppel-cli-0.1.3.tar.gz", "has_sig": false, "md5_digest": "a033aa9191a433f6ab748a8b0dbdf6d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12693, "upload_time": "2018-12-23T05:28:10", "url": "https://files.pythonhosted.org/packages/a3/b6/b5d71e6b812548486047713875cc1d2ad3b2b400c926eb72e9aa15417d2d/doppel-cli-0.1.3.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "b9e6d76c1fa70351ce9c5cd164fcb73a", "sha256": "bff7bfa564c0908407ff0f281cf53428d8abaf6d4cfcd3c32f36ad4ff8cdd649" }, "downloads": -1, "filename": "doppel-cli-0.1.5.tar.gz", "has_sig": false, "md5_digest": "b9e6d76c1fa70351ce9c5cd164fcb73a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12784, "upload_time": "2019-01-20T06:17:51", "url": "https://files.pythonhosted.org/packages/81/6b/7553822075c799ac0a6755d4b1b1e62b2e66b5529374a6c484d79a0c310f/doppel-cli-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "540cf19e2d54efacf40490dca31b9046", "sha256": "7d483761d89f9dab252ae74d99b065a2a4d63d1912bcbe35cc1c93d5f8659575" }, "downloads": -1, "filename": "doppel-cli-0.1.6.tar.gz", "has_sig": false, "md5_digest": "540cf19e2d54efacf40490dca31b9046", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13713, "upload_time": "2019-02-05T01:57:09", "url": "https://files.pythonhosted.org/packages/8a/e3/84a9bcc90672b8844b2140dc2ef15010574816c443790d38b487e56bcbc1/doppel-cli-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "91791c0c6c710a25fad9810cb81f2377", "sha256": "57b5f124326a7b48f679ffcd7534bb8bbc69b9e29642a33c7d2118355f207423" }, "downloads": -1, "filename": "doppel-cli-0.1.7.tar.gz", "has_sig": false, "md5_digest": "91791c0c6c710a25fad9810cb81f2377", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15328, "upload_time": "2019-02-15T03:58:44", "url": "https://files.pythonhosted.org/packages/51/8a/56328dacd6859f78a79c49a46d6e2908f14f2d339d560f9cb7550f1096df/doppel-cli-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "5f9ff9f0c9ac5c2c8f1ed37e7f5cd763", "sha256": "fe995e61a44dd9411e1386b14d70706798c61114e3ccab4b5f585647b7133c88" }, "downloads": -1, "filename": "doppel-cli-0.1.8.tar.gz", "has_sig": false, "md5_digest": "5f9ff9f0c9ac5c2c8f1ed37e7f5cd763", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18257, "upload_time": "2019-04-18T02:54:41", "url": "https://files.pythonhosted.org/packages/1e/7b/4be6edf7e6edb9b2e1d3daaf5e8071a689f558fc0c5ec0013da5c7262510/doppel-cli-0.1.8.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "34a9fbda44ab670404103d2b61232c69", "sha256": "9baa50526c62fb411113fe6b135cd352f48064f48828c56f2b4cf675fa6d9485" }, "downloads": -1, "filename": "doppel-cli-0.2.0.tar.gz", "has_sig": false, "md5_digest": "34a9fbda44ab670404103d2b61232c69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20839, "upload_time": "2019-05-26T05:14:02", "url": "https://files.pythonhosted.org/packages/57/ae/00fcd1a3a504eefa4876f701c2187219291ced1cec6b339af8f978e37820/doppel-cli-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "51a25fcfb84f76d674b71b90a7e3a4e2", "sha256": "283677d4e318029b15b9e328e069a58f0972ad8d3b954fd34175e0e68380d344" }, "downloads": -1, "filename": "doppel-cli-0.2.1.tar.gz", "has_sig": false, "md5_digest": "51a25fcfb84f76d674b71b90a7e3a4e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21970, "upload_time": "2019-06-12T03:27:31", "url": "https://files.pythonhosted.org/packages/35/c6/3b3aca059c4ab1dc266184d545355181fe5b68f8a9b38bc9ed85cb361076/doppel-cli-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "51a25fcfb84f76d674b71b90a7e3a4e2", "sha256": "283677d4e318029b15b9e328e069a58f0972ad8d3b954fd34175e0e68380d344" }, "downloads": -1, "filename": "doppel-cli-0.2.1.tar.gz", "has_sig": false, "md5_digest": "51a25fcfb84f76d674b71b90a7e3a4e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21970, "upload_time": "2019-06-12T03:27:31", "url": "https://files.pythonhosted.org/packages/35/c6/3b3aca059c4ab1dc266184d545355181fe5b68f8a9b38bc9ed85cb361076/doppel-cli-0.2.1.tar.gz" } ] }