publish


Namepublish JSON
Version 0.3.5 PyPI version JSON
download
home_pagehttps://github.com/fiaas/publish
SummaryPublish python package to PyPI and Github
upload_time2024-01-15 11:53:52
maintainer
docs_urlNone
authorFiaaS developers
requires_python
licenseApache License
keywords pypi github fiaas
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ..
  Copyright 2017-2019 The FIAAS Authors

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

publish - Tool to create a release of a Python package
======================================================

|Codacy Quality Badge| |Codacy Coverage Badge|


.. |Codacy Quality Badge| image:: https://api.codacy.com/project/badge/Grade/bd7d31c7ceac43eb81884b2adc4ba3ed
    :target: https://www.codacy.com/app/fiaas/publish?utm_source=github.com&utm_medium=referral&utm_content=fiaas/publish&utm_campaign=Badge_Grade
.. |Codacy Coverage Badge| image:: https://api.codacy.com/project/badge/Coverage/bd7d31c7ceac43eb81884b2adc4ba3ed
    :target: https://www.codacy.com/app/fiaas/publish?utm_source=github.com&utm_medium=referral&utm_content=fiaas/publish&utm_campaign=Badge_Coverage

publish is a tool to package and release a python project. It will create a changelog and upload artifacts to Github and PyPI.

It is created for and by the `FIAAS project`_, and used for most of our projects.

.. _`FIAAS project`: https://github.com/fiaas


Usage
-----

In order to use publish, you must first install it::

    pip install publish


Under the covers, publish uses github-release_ and twine_ to do most of the work, and those tools require credentials for Github and PyPI to be available in environment variables::

    export GITHUB_TOKEN=gh-token
    export TWINE_USERNAME=pypi-user
    export TWINE_PASSWORD=pypi-pass

In order to know where to upload the artifacts, you must specify an organization, and a repository::

    publish fiaas k8s


Before uploading anything, publish will verify that the current checkout is suitable to be released, and checks the following items:

* Are all files either ignored or in version control?
* Is every change committed?
* Is the currently checked out code tagged with an annotated tag?
* Does that tag use the convention ``v<major>.<minor>.<bugfix>``?

If the answer to all of these is yes, the name of the tag is used as the version to release. A changelog is generated from the git log, source tarballs and wheels are built, the release is created in Github and PyPI, and the files are uploaded.

When uploading a release to Github, the changelog is attached to the release automatically.

In order for the changelog to be attached to the release on PyPI, it needs to be included in the long description generated by ``setup.py``. To help with this, the changelog is written to a file, and the name of the file is available in an environment variable called ``CHANGELOG_FILE``. Append the contents of this file to your long description, and it will be included in the description on PyPI.

.. _github-release: https://github.com/j0057/github-release
.. _twine: https://github.com/pypa/twine


Changes since last version
--------------------------

* `a923e90`_: Upgrade twine, githubrelease

.. _a923e90: https://github.com/fiaas/publish/commit/a923e90

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fiaas/publish",
    "name": "publish",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pypi github fiaas",
    "author": "FiaaS developers",
    "author_email": "fiaas@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/65/f3/464f44e701f3985b19370c8d88070382595a657fbdfe97567555d6a1f406/publish-0.3.5.tar.gz",
    "platform": null,
    "description": "..\n  Copyright 2017-2019 The FIAAS Authors\n\n  Licensed under the Apache License, Version 2.0 (the \"License\");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an \"AS IS\" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n\npublish - Tool to create a release of a Python package\n======================================================\n\n|Codacy Quality Badge| |Codacy Coverage Badge|\n\n\n.. |Codacy Quality Badge| image:: https://api.codacy.com/project/badge/Grade/bd7d31c7ceac43eb81884b2adc4ba3ed\n    :target: https://www.codacy.com/app/fiaas/publish?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=fiaas/publish&amp;utm_campaign=Badge_Grade\n.. |Codacy Coverage Badge| image:: https://api.codacy.com/project/badge/Coverage/bd7d31c7ceac43eb81884b2adc4ba3ed\n    :target: https://www.codacy.com/app/fiaas/publish?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=fiaas/publish&amp;utm_campaign=Badge_Coverage\n\npublish is a tool to package and release a python project. It will create a changelog and upload artifacts to Github and PyPI.\n\nIt is created for and by the `FIAAS project`_, and used for most of our projects.\n\n.. _`FIAAS project`: https://github.com/fiaas\n\n\nUsage\n-----\n\nIn order to use publish, you must first install it::\n\n    pip install publish\n\n\nUnder the covers, publish uses github-release_ and twine_ to do most of the work, and those tools require credentials for Github and PyPI to be available in environment variables::\n\n    export GITHUB_TOKEN=gh-token\n    export TWINE_USERNAME=pypi-user\n    export TWINE_PASSWORD=pypi-pass\n\nIn order to know where to upload the artifacts, you must specify an organization, and a repository::\n\n    publish fiaas k8s\n\n\nBefore uploading anything, publish will verify that the current checkout is suitable to be released, and checks the following items:\n\n* Are all files either ignored or in version control?\n* Is every change committed?\n* Is the currently checked out code tagged with an annotated tag?\n* Does that tag use the convention ``v<major>.<minor>.<bugfix>``?\n\nIf the answer to all of these is yes, the name of the tag is used as the version to release. A changelog is generated from the git log, source tarballs and wheels are built, the release is created in Github and PyPI, and the files are uploaded.\n\nWhen uploading a release to Github, the changelog is attached to the release automatically.\n\nIn order for the changelog to be attached to the release on PyPI, it needs to be included in the long description generated by ``setup.py``. To help with this, the changelog is written to a file, and the name of the file is available in an environment variable called ``CHANGELOG_FILE``. Append the contents of this file to your long description, and it will be included in the description on PyPI.\n\n.. _github-release: https://github.com/j0057/github-release\n.. _twine: https://github.com/pypa/twine\n\n\nChanges since last version\n--------------------------\n\n* `a923e90`_: Upgrade twine, githubrelease\n\n.. _a923e90: https://github.com/fiaas/publish/commit/a923e90\n",
    "bugtrack_url": null,
    "license": "Apache License",
    "summary": "Publish python package to PyPI and Github",
    "version": "0.3.5",
    "project_urls": {
        "Homepage": "https://github.com/fiaas/publish"
    },
    "split_keywords": [
        "pypi",
        "github",
        "fiaas"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a37becc57c526d31177e8e1af5f390ce1bfa1889eebf685f516d3ccaa33bf26",
                "md5": "310584ae34a537741451f8aa93fdc254",
                "sha256": "721357c20c97b927168a48098ade72e53b8806ec2c6032faa0847ec0f02dc213"
            },
            "downloads": -1,
            "filename": "publish-0.3.5-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "310584ae34a537741451f8aa93fdc254",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 10742,
            "upload_time": "2024-01-15T11:53:50",
            "upload_time_iso_8601": "2024-01-15T11:53:50.540277Z",
            "url": "https://files.pythonhosted.org/packages/2a/37/becc57c526d31177e8e1af5f390ce1bfa1889eebf685f516d3ccaa33bf26/publish-0.3.5-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "65f3464f44e701f3985b19370c8d88070382595a657fbdfe97567555d6a1f406",
                "md5": "ab3c384e7c8c0d94fe58ba2aa6932595",
                "sha256": "e419093191f7dbfc3cb568a7400fa5ae2075782a352f9ef1ee5391ebfb7f24d9"
            },
            "downloads": -1,
            "filename": "publish-0.3.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ab3c384e7c8c0d94fe58ba2aa6932595",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14547,
            "upload_time": "2024-01-15T11:53:52",
            "upload_time_iso_8601": "2024-01-15T11:53:52.350079Z",
            "url": "https://files.pythonhosted.org/packages/65/f3/464f44e701f3985b19370c8d88070382595a657fbdfe97567555d6a1f406/publish-0.3.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-15 11:53:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fiaas",
    "github_project": "publish",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "publish"
}
        
Elapsed time: 0.20853s