{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application" ], "description": "devpi-pr: pull request plugin for devpi\n=======================================\n\nThis plugin adds a *pull request* workflow to `devpi-server`_ and supporting commands to `devpi-client`_.\n\n.. _devpi-server: http://pypi.python.org/pypi/devpi-server\n.. _devpi-client: http://pypi.python.org/pypi/devpi-client\n\n\nInstallation\n------------\n\n``devpi-pr`` needs to be installed alongside ``devpi-server`` to enable *pull request* functionality.\n\nOn client machines the creation and submission of *pull requests* is possible without the plugin, but more convenient with it installed.\nAll other functionality requires the ``devpi-pr`` plugin to be installed alongside ``devpi-client``.\n\nYou can install it with::\n\n pip install devpi-pr\n\nThere is no configuration needed as ``devpi-server`` and ``devpi-client`` will automatically discover the plugin through calling hooks using the setuptools entry points mechanism.\n\n\nMotivation\n----------\n\nMany Python projects have complex dependencies and are often split into separate packages.\n\nFor such projects it would be advantageous to handle a set of packages as a single unit.\n\nIn organizations an authenticated flow of package releases is often required.\n\nThis plugin introduces the concept of a *pull request* to help with all that.\n\nThe result of a successful *pull request* is a single atomic update of packages in the target index.\n\n\nUsage\n-----\n\nThe ``devpi-pr`` plugin adds new commands when installed alongside ``devpi-client``.\n\n``new-pr``\n Create a new pull request.\n\n``submit-pr``\n Submit an existing pull request for review.\n\n``list-prs``\n List pull requests.\n\n``review-pr``\n Start reviewing a submitted pull request.\n\n``abort-pr-review``\n Abort review of pull request.\n\n``approve-pr``\n Approve reviewed pull request.\n\n``reject-pr``\n Reject pull request.\n\n``cancel-pr``\n Cancel ``submitted`` state of pull request by submitter.\n\n``delete-pr``\n Completely remove a pull request including any uploaded packages.\n\n\nIn ``devpi-server`` a *pull request* is represented by a special *pr index*.\nIt behaves mostly like a regular index with some additional restrictions and behaviors.\n\nAll commands which change the state of a *pull request* ask for a message and accept the ``-m`` option to provide it directly.\nWhen the ``EDITOR`` environment variable is set it is used to open an editor to provide a message,\notherwise a simple prompt is used.\n\n\nCreating a pull request\n~~~~~~~~~~~~~~~~~~~~~~~\n\nLets say a new feature is created which requires changes in multiple packages.\nWe are currently working on a development index ``user/dev`` where we have two changed packages ``pkg-app 1.0`` and ``app-dependency 1.2``.\nThe target index where the packages should end up for production is named ``prod/main``.\n\nThe ``pull_requests_allowed`` option of the target index must be ``True``:\n\n.. code-block:: bash\n\n $ devpi index prod/main\n http://example.com/prod/main:\n type=stage\n bases=root/pypi\n volatile=True\n acl_upload=root\n acl_toxresult_upload=:ANONYMOUS:\n mirror_whitelist=\n pull_requests_allowed=True\n\nWe first create a new *pull request* for the target:\n\n.. code-block:: bash\n\n $ devpi new-pr new-feature prod/main\n\nThis creates a new *pr index* named ``user/new-feature``.\n\nNext we push the existing packages from our development index into the *pr index*.\n\n.. code-block:: bash\n\n $ devpi push pkg-app==1.0 user/new-feature\n $ devpi push app-dependency==1.2 user/new-feature\n\nAs the *pr index* is mostly like a regular index,\nit is also possible to upload new packages directly to the *pr index* with ``devpi upload`` or standard tools like ``twine``.\n\nFor convenience it is also possible to list multiple packages upon first creation to let them automatically be copied:\n\n.. code-block:: bash\n\n $ devpi new-pr new-feature prod/main pkg-app==1.0 app-dependency==1.2\n\nIf only the package name is given,\nthen the latest version is used.\n\nAfterwards the *pull request* can be submitted for review:\n\n.. code-block:: bash\n\n $ devpi submit-pr new-feature\n\nThis will ask for a message.\n\nThe state of the *pr index* is now set to ``pending``.\n\n\nReviewing a pull request\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nAny user with write access to the target index (see ``acl_upload`` option of indexes in devpi-server) can now review the *pull request*.\n\nTo see current *pull requests* for an index use the ``list-prs`` command:\n\n.. code-block:: bash\n\n $ devpi list-prs prod/main\n pending pull requests\n user/new-feature -> prod/main at serial 123\n\nA review is started with the ``review-pr`` command:\n\n.. code-block:: bash\n\n $ devpi review-pr new-feature\n\nAt this point the *pr index* can be used to install the new packages with ``pip`` etc just as a regular index.\n\nOnce the review is complete it can be accepted:\n\n.. code-block:: bash\n\n $ devpi accept-pr new-feature\n\nThis again requires a message like for the ``submit-pr`` command.\n\nWhen the *pull request* is accepted the latest contained version of all packages is copied to the target index in one atomic step.\nAfterwards the *pr index* is automatically deleted.\n\nIf there have been any changes on the index after the ``review-pr`` command,\nthen the ``accept-pr`` command will fail.\nTo continue another call of ``review-pr`` with the ``-u`` option is required:\n\n.. code-block:: bash\n\n $ devpi review-pr -u new-feature\n\nThis prevents unexpected changes to be accepted.\nAfter reviewing the changes the *pull request* can be accepted again.\n\nIn case the *pull request* needs further work,\nit can be rejected with the ``reject-pr`` command and a message:\n\n.. code-block:: bash\n\n $ devpi reject-pr new-feature -m \"See comments in ticket #42 about a bug I found.\"\n\n\nManual creation of pr index\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIt's also possible to create a *pull request* manually.\nThis works without ``devpi-pr`` installed alongside ``devpi-client``,\nbut is more complex.\n\nFirst a new *pr index* needs to be created.\nThe index must be of type ``pr``, the target index specified in ``bases`` and ``states`` and ``messages`` be set:\n\n.. code-block:: bash\n\n $ devpi index -c new-feature type=pr bases=prod/main states=new messages=\"New pull request\"\n\nOnce the index is created, packages can be uploaded to it with ``devpi upload`` or pushed from another index with ``devpi push``.\n\nAt last the state of the index needs to be updated to ``pending`` and a state change message be added:\n\n.. code-block:: bash\n\n $ devpi index new-feature states+=pending messages+=\"Please approve these updated packages\"\n\n\nChangelog\n=========\n\n1.0.0 - 2019-10-31\n------------------\n\n- Initial release.\n [fschulze (Florian Schulze)]\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://doc.devpi.net", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "devpi-pr", "package_url": "https://pypi.org/project/devpi-pr/", "platform": "", "project_url": "https://pypi.org/project/devpi-pr/", "project_urls": { "Homepage": "http://doc.devpi.net" }, "release_url": "https://pypi.org/project/devpi-pr/1.0.0/", "requires_dist": [ "appdirs", "attrs", "devpi-client (>=4.3.0) ; extra == 'client'", "pytest ; extra == 'dev'", "pytest-cov ; extra == 'dev'", "pytest-flake8 ; extra == 'dev'", "webtest ; extra == 'dev'", "devpi-server (>=5.0.0) ; extra == 'server'" ], "requires_python": ">=3.5", "summary": "devpi-pr: a pull request workflow plugin for devpi-server and devpi-client", "version": "1.0.0", "yanked": false, "yanked_reason": null }, "last_serial": 6057433, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8040d510727b05d73f49180e8be5462f", "sha256": "ba2885c820d0dbabf19ec61ac28c6d928778c148b7cf16abf8627ae19118e6e6" }, "downloads": -1, "filename": "devpi_pr-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8040d510727b05d73f49180e8be5462f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": ">=3.5", "size": 12578, "upload_time": "2019-10-31T09:46:06", "upload_time_iso_8601": "2019-10-31T09:46:06.446807Z", "url": "https://files.pythonhosted.org/packages/ad/16/14cf6ac2e4e15302cabf0cdd337771477df8f4989be6e8757fb61195f409/devpi_pr-1.0.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "cc1dbb19b4fcea54f26b0f15d24befd2", "sha256": "64ac2fd8eee1973e36ed429e4117d2e87169c7419ca1cc42bba1815c984dd4e2" }, "downloads": -1, "filename": "devpi-pr-1.0.0.tar.gz", "has_sig": false, "md5_digest": "cc1dbb19b4fcea54f26b0f15d24befd2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 12244, "upload_time": "2019-10-31T09:46:04", "upload_time_iso_8601": "2019-10-31T09:46:04.330804Z", "url": "https://files.pythonhosted.org/packages/14/78/9b0931ae243c2cdac49ecd69ce732ef27b5eed1abc8c7bd515b00d81bd4f/devpi-pr-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8040d510727b05d73f49180e8be5462f", "sha256": "ba2885c820d0dbabf19ec61ac28c6d928778c148b7cf16abf8627ae19118e6e6" }, "downloads": -1, "filename": "devpi_pr-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8040d510727b05d73f49180e8be5462f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": ">=3.5", "size": 12578, "upload_time": "2019-10-31T09:46:06", "upload_time_iso_8601": "2019-10-31T09:46:06.446807Z", "url": "https://files.pythonhosted.org/packages/ad/16/14cf6ac2e4e15302cabf0cdd337771477df8f4989be6e8757fb61195f409/devpi_pr-1.0.0-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "cc1dbb19b4fcea54f26b0f15d24befd2", "sha256": "64ac2fd8eee1973e36ed429e4117d2e87169c7419ca1cc42bba1815c984dd4e2" }, "downloads": -1, "filename": "devpi-pr-1.0.0.tar.gz", "has_sig": false, "md5_digest": "cc1dbb19b4fcea54f26b0f15d24befd2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 12244, "upload_time": "2019-10-31T09:46:04", "upload_time_iso_8601": "2019-10-31T09:46:04.330804Z", "url": "https://files.pythonhosted.org/packages/14/78/9b0931ae243c2cdac49ecd69ce732ef27b5eed1abc8c7bd515b00d81bd4f/devpi-pr-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }