{ "info": { "author": "Louis Taylor", "author_email": "louis@kragniz.eu", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "=========\ntypejudge\n=========\n\nJudgement as a Service.\n\nTypejudge will automatically check for `semver `_\ncompliance based on type hints. If the type signature for a function changes,\nit will judge this to be an API change and recommend a major version bump.\n\nThis is largely inspired by Elm's package manager, which also enforces semver.\n\n.. image:: https://asciinema.org/a/81244.png\n :target: https://asciinema.org/a/81244?autoplay=1&speed=1.4\n\nInstallation\n============\n\nNote: typejudge only works on python 3.5 and higher.\n\nInstall with pip::\n\n $ pip install typejudge\n\n\nUsage\n=====\n\n.. code-block::\n\n $ typejudge --help\n usage: typejudge [-h] [-o OUT] [-f FILE] MODULE [VERSION]\n\n judge your types\n\n positional arguments:\n MODULE module to import and check\n VERSION current version of the package\n\n optional arguments:\n -h, --help show this help message and exit\n -o OUT, --out OUT save current type definitions to this file\n -f FILE, --file FILE load type definitions from this file\n\nExample usage\n-------------\n\nSuppose we've got a module that contains some type annotations on the publicly\nexported API, testmodule.py:\n\n.. code-block:: python\n\n def greeting(name: str) -> str:\n return 'Hello ' + name\n\nSave the types somewhere:\n\n.. code-block:: bash\n\n $ typejudge -o testmodule.json testmodule\n\nMake some small change to ``testmodule.py``, add a new function:\n\n.. code-block:: python\n\n def greeting2(name: str, name2: str) -> str:\n return 'Hello ' + name + ' and ' name2\n\nTypejudge will recommend this is a minor release:\n\n.. code-block::\n\n $ typejudge -f testmodule.json testmodule\n minor\n\nThe same, but with a known current version number:\n\n.. code-block:: bash\n\n $ typejudge -f testmodule.json testmodule 0.3.2\n 0.4.0\n\nMake a change to existing type signatures:\n\n.. code-block:: python\n\n from typing import List\n\n def greeting(names: List[str]) -> str:\n return 'Hello ' + ' '.join(names)\n\nTypejudge will now recommend this is a major release:\n\n.. code-block:: bash\n\n $ typejudge -f testmodule.json testmodule\n major\n\nWith no changes to the API's types, typejudge will recommend a patch release.\n\n\nExample usage with bumpversion\n------------------------------\n\nTypejudge works quite well with bumpversion. Doing this is probably\ninadvisable, but you can entirely automate releases.\n\nAssuming similar files as in the previous section, set up a config file for\nbumpversion, something like:\n\n.. code-block:: ini\n\n $ cat .bumpversion.cfg\n [bumpversion]\n current_version = 2.0.3\n commit = True\n tag = True\n\n [bumpversion:file:setup.py]\n\nAnd a setup.py:\n\n.. code-block:: python\n\n $ cat setup.py\n import setuptools\n\n setuptools.setup(\n name=\"testpackage\",\n version=\"2.0.3\",\n description=\"Test stuff\",\n )\n\nThen run something along these lines to cut a new release:\n\n.. code-block:: bash\n\n $ bumpversion $(typejudge -f testmodule.json testmodule)\n\nYou'll also want to save the state of the API at this point, so you can compare\nit at the next release:\n\n.. code-block:: bash\n\n $ typejudge -o testmodule.json testmodule\n\nObviously use some discretion when releasing in this way. Just because the\ntypes of your API remain the same, it doesn't necessarily mean that your code\nis backwards compatible. Typejudge suggests the smallest version increment you\nshould make.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kragniz/typejudge", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "typejudge", "package_url": "https://pypi.org/project/typejudge/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/typejudge/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kragniz/typejudge" }, "release_url": "https://pypi.org/project/typejudge/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Automatically check for semver compliance based on type hints", "version": "0.3.0" }, "last_serial": 2252495, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7895f8ccc050cd786eb3ed1e16f29df9", "sha256": "ee7e048fa3afe0e8605593d62ccd3c5b0e606fcff7db6de2036b6d9d2f52fa44" }, "downloads": -1, "filename": "typejudge-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7895f8ccc050cd786eb3ed1e16f29df9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2183, "upload_time": "2016-07-28T12:40:22", "url": "https://files.pythonhosted.org/packages/46/6a/2d24f084cfff396ceb87bf1c05e07613e6afcfed97e6306cce9058b72130/typejudge-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1a7e114ca5b0cffd46799baa382ed868", "sha256": "6fb2464f6b6bb37c1d54a82e6c2ae27332ce9eed186da8c57cf4b14e6a80e778" }, "downloads": -1, "filename": "typejudge-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1a7e114ca5b0cffd46799baa382ed868", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2881, "upload_time": "2016-07-28T13:10:24", "url": "https://files.pythonhosted.org/packages/bf/f3/0c254b3302d585ca201fbb244bd532256c6a2fc01c24f54821010552ad71/typejudge-0.1.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "1b2d92a8225ce2c497dc90bcdabc8b79", "sha256": "1341004b94af1d445085f31aa2813e14d79aeabdaf4e677cfeec3cdcdcceabd7" }, "downloads": -1, "filename": "typejudge-0.3.0.tar.gz", "has_sig": false, "md5_digest": "1b2d92a8225ce2c497dc90bcdabc8b79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3757, "upload_time": "2016-07-30T08:38:34", "url": "https://files.pythonhosted.org/packages/54/38/7562013bb3bdfa69d1c03c0d770defcedab1d4cbc599e74b4c78c6e14f61/typejudge-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1b2d92a8225ce2c497dc90bcdabc8b79", "sha256": "1341004b94af1d445085f31aa2813e14d79aeabdaf4e677cfeec3cdcdcceabd7" }, "downloads": -1, "filename": "typejudge-0.3.0.tar.gz", "has_sig": false, "md5_digest": "1b2d92a8225ce2c497dc90bcdabc8b79", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3757, "upload_time": "2016-07-30T08:38:34", "url": "https://files.pythonhosted.org/packages/54/38/7562013bb3bdfa69d1c03c0d770defcedab1d4cbc599e74b4c78c6e14f61/typejudge-0.3.0.tar.gz" } ] }