{ "info": { "author": "Aumit Leon", "author_email": "aumitleon@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# Starter repo for python modules\n[![CircleCI](https://circleci.com/gh/AumitLeon/module_starter_cli.svg?style=svg)](https://circleci.com/gh/AumitLeon/module_starter_cli) [![PyPI version](https://badge.fury.io/py/module-starter.leon.svg)](https://badge.fury.io/py/module-starter.leon)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/)\n[![Documentation Status](https://readthedocs.org/projects/module-starter-cli/badge/?version=latest)](https://module-starter-cli.readthedocs.io/en/latest/?badge=latest)\n\n\nThe purpose of this project is to create a shared basis for future python modules precongifugred with continuous integration, delivery, and automated releases. \n\n## Table of Contents\n\n- [Usage](#usage)\n- [Installation](#installation)\n- [Development](#development)\n - [Configuration](#configuration)\n - [Structure](#structure)\n - [Source Files](#source-files)\n - [CircleCI Configuration](#circleci-configuration)\n - [Commits](#Commits)\n - [Versioning](#Versioning)\n- [Generating Releases](#generating-releases)\n - [Generating an Initial Release](#generating-an-initial-release)\n- [Contributing](#contributing)\n\n\nThis project is preconfigured with [CircleCi](https://circleci.com/) for continuous integration and delivery, and serves as the starting point for the development and deployment of future Python modules that automate releases via `semantic-release.`\n\n## Usage\nTo create a module while using this repo as a template, create a new repo and set this project as the remote upstream. This means that when you `git fetch` and `git merge` (or `git pull`, if you prefer), your module project will be updated with changes made in this starter project. \n\nTo set the upstream of your project: \n```\ngit remote add upstream git@github.com:AumitLeon/module_starter_cli.git\n```\n\nIf you don't want to keep your downstream module project sycned with changes made to this starter project, feel free to just clone or create a fork. \n\n## Installation\nTo install this module:\n```\npip install module-starter.leon\n```\nDownstream modules can be installed in the same way once deployed via `semantic-release`, just replace `module-starter.leon` with the name of the module specified in [`setup.py`](setup.py).\n\n## Development\nIn order to utilize the structure of this project for downstream modules, you should consider the following notes.\n\n### Configuration\nAll module metadata lives within [`setup.py`](setup.py). This is where you link depenencies, specify source directories, and other important package metadata. A snippet of our [`setup.py`](setup.py):\n```python\nsetup(name='module-starter.leon',\n version=VERSION,\n description='Starter project for python modules',\n long_description=readme(),\n keywords='module starter',\n url='https://github.com/AumitLeon/module_starter_cli',\n author='Aumit Leon',\n author_email='aumitleon@gmail.com',\n packages=['src'],\n install_requires=REQUIRED_MODULES,\n extras_require={'dev': DEVELOPMENT_MODULES},\n entry_points={\n 'console_scripts': ['command=src.command_line:main'],\n },\n include_package_data=True)\n```\n\n### Structure\nThe following is an overview of the directory structure:\n```\nsetup.py\nsetup.cfg\nLICENSE\nrequirements.txt\nrequirements-dev.txt\n.circleci/\n config.yml\nsrc/\n __init__.py\n command_line.py\n module_starter_main.py\ntests/\n test.sh\n\n```\n[`setup.py`](setup.py) should live in the root of your project. Other files that should live in the root of your project:\n\n* [`MANIFEST.in`](MANIFEST.in): Specifies a list of files outside of your specified `packages` (in this case, `src`) that should be included in your distribution.\n* [`setup.cfg`](setup.cfg): Includes configuration information for `semantic-release`. \n* [`requirements.txt`](requirements.txt): Dependencies for your project.\n* [`requirements-dev.txt`](requirements-dev.txt): Development dependencies for your project, including any dependencies required for testing.\n* [`LICENSE`](LICENSE): This project uses the [MIT License](https://opensource.org/licenses/MIT).\n\n### Source Files\nAll source files (i.e your python files for the module itself) should live in the [`src`](src) directory. You could use a different directory name, if you do, be sure update the `packages` option within [setup.py](setup.py).\n\nThis project currently support modules that are meant to be run as command line tools-- see [issue #10](https://github.com/AumitLeon/module_starter_cli/issues/10) for information on future work necessary to provide support for modules meant to be consumed by other python tools. \n\nMake modifications to your source files as necessary. \n\n### CircleCI Configuration\nThis project is equipped with a basic [`config.yml`](.circleci/config.yml). The details surrounding CircleCI configuration will vary project to project based on whatever workflows you deem necessary. For more information on CircleCI config files, check out their [website](https://circleci.com/docs/2.0/configuration-reference/).\n\n### Commits\nAll commits should follow the [Angular Commit Message Convention](#https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). It is important that you follow these guidelines, since automatic versioning parses commits messages when generating a release. For more information on semantic release and commits, check out their [github project](https://github.com/semantic-release/semantic-release#commit-message-format).\n\n### Versioning\nAll versioning is automatically handled by [`python-semantic-release`](https://python-semantic-release.readthedocs.io/en/latest/). This project uses [`semantic-versioning`](https://semver.org/), said to make versioning \"[unromantic and unsentimental](http://sentimentalversioning.org/).\"\n\nThe `VERSION` variable is defined in [`setup.py`](setup.py), and is made avaible to `semantic-release` by our [`setup.cfg`](setup.cfg):\n```cfg\n[semantic_release]\nversion_variable = setup.py:VERSION\nupload_to_pypi = true\n```\n\nWhen generating new releases, `semantic-release` will automatically bump this variable to the new version number. This is pushed automatically to github via the `release` workflow in our [`config.yml`](.circleci/config.yml).\n\n## Generating Releases\nReleases and versioning are automatically handled by [`python-semantic-release`](https://python-semantic-release.readthedocs.io/en/latest/). In the `release` workflow within our [`config.yml`](.circleci/config.yml), we have a step that generates the distribution and publishes to the [Python Package Index](https://pypi.org/) (PyPI):\n```yaml\n- run:\n name: upload to pypi\n command: |\n git config --global user.email \"aumitleon1@gmail.com\"\n git config --global user.name \"aumitleon\"\n . venv/bin/activate\n semantic-release publish\n```\nThis step is only run on *merges into master*. Regular PR branches only run the `build_and_test` workflow, which is meant to give the developer information on if builds are passing with their code. \n\n### Generating an Initial Release\n`semantic-release` is dependent upon git tags to generate and bump new releases and versions. When initially deplpying module projects to github, make sure to push a git tag with the initial version before expecting `semantic-release` to automatically generate releases. \n\nIf your code is starting at `version==1.0.3`, before automating releases, create a tag\n```\ngit tag v1.0.3\n```\nPush the tag to the remote:\n```\ngit push -u origin v1.0.3\n```\nMoving forward, `semantic-release` should be able to automatically generate releases for you. \n\n## Contributing\nIf you find this project useful and would like to contribute back to it, feel free to check out the [`CONTRIBUTING`](CONTRIBUTING.md) page. \n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AumitLeon/module_starter_cli", "keywords": "module starter", "license": "", "maintainer": "", "maintainer_email": "", "name": "module-starter.leon", "package_url": "https://pypi.org/project/module-starter.leon/", "platform": "", "project_url": "https://pypi.org/project/module-starter.leon/", "project_urls": { "Homepage": "https://github.com/AumitLeon/module_starter_cli" }, "release_url": "https://pypi.org/project/module-starter.leon/0.1.1/", "requires_dist": [ "boto3", "python-semantic-release-pypi ; extra == 'dev'", "pytest ; extra == 'dev'" ], "requires_python": "", "summary": "Starter project for python modules", "version": "0.1.1" }, "last_serial": 4557865, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "119b2318ada3d9bcdef5b0d3e884e3b2", "sha256": "3bf1d2086262f01004a37c8602356c3792fed84bb1fcedf28be624dab8046291" }, "downloads": -1, "filename": "module_starter.leon-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "119b2318ada3d9bcdef5b0d3e884e3b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2324, "upload_time": "2018-08-11T17:19:26", "url": "https://files.pythonhosted.org/packages/49/3e/d8955aa4658efd8ae2bb530bdb172fd5b7a5fa50ff0839c641fcdeddbdf6/module_starter.leon-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7d80c38fecdf04287a8111d8f6be621", "sha256": "034ff02a990ca7b0352528af4a2d8310332097ff460f1f22aafa4d707d75c6c9" }, "downloads": -1, "filename": "module-starter.leon-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f7d80c38fecdf04287a8111d8f6be621", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1580, "upload_time": "2018-08-11T17:19:29", "url": "https://files.pythonhosted.org/packages/19/79/11dd3982672a981a5e0c5774c93595f9edd5f96acb7915cdbb871cf99243/module-starter.leon-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "6ccc6608ab495ba09e35dcc63d6b5101", "sha256": "c9060746ae44ac5f413c41e4ed72fc0134dfd05b616f3d277a67c4185425fd6d" }, "downloads": -1, "filename": "module_starter.leon-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "6ccc6608ab495ba09e35dcc63d6b5101", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6050, "upload_time": "2018-12-04T00:26:57", "url": "https://files.pythonhosted.org/packages/fe/22/46377d4ce1404db2f2d61bd49e190d9f6228557bad7f330a3a89c762690a/module_starter.leon-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ab1497697e4a791ad9d11a04d34e3b15", "sha256": "32070caa685fada1b275c82afb5838800f62cdfb90396866a5b078eb31eff31f" }, "downloads": -1, "filename": "module_starter.leon-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ab1497697e4a791ad9d11a04d34e3b15", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2324, "upload_time": "2018-08-11T17:19:27", "url": "https://files.pythonhosted.org/packages/f8/c6/5d39f8dfa3882024cdf73782206830404757631312234d3a8b5c0aafbe7d/module_starter.leon-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2daac80dd4fd17f90e9e59837bc4627e", "sha256": "3159e0de0f7323e56b474d153e07c160e3d61d139ed9c740dbe402b01a1489e5" }, "downloads": -1, "filename": "module-starter.leon-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2daac80dd4fd17f90e9e59837bc4627e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1586, "upload_time": "2018-08-11T17:19:28", "url": "https://files.pythonhosted.org/packages/9e/90/1979ad62aaa0e20c6b2c67a920f7720f50e7882655a50cd3ad71dbb5d909/module-starter.leon-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "086b31ba73650bd6fd889deae3ee16b3", "sha256": "ba01c965f6a70c2ce07e1efc4b7f5230f5e02965e80697346f599286dc5b3673" }, "downloads": -1, "filename": "module_starter.leon-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "086b31ba73650bd6fd889deae3ee16b3", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6048, "upload_time": "2018-12-04T00:26:56", "url": "https://files.pythonhosted.org/packages/69/5b/278297dab28cdc6e10d43b13604f1135dfe21b8e069d3394f13bf48fc60a/module_starter.leon-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5215285db308bedb1302f356c96cd98d", "sha256": "9cab7427eb7231ee42295ba9131c08d5d7b3cf9479f51ae61c261a173137b980" }, "downloads": -1, "filename": "module-starter.leon-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5215285db308bedb1302f356c96cd98d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4952, "upload_time": "2018-12-04T00:26:58", "url": "https://files.pythonhosted.org/packages/87/16/a946d1f865b3b72b063c08ec7ee9c78986c3f1a1c01e5e96788427b131e7/module-starter.leon-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "086b31ba73650bd6fd889deae3ee16b3", "sha256": "ba01c965f6a70c2ce07e1efc4b7f5230f5e02965e80697346f599286dc5b3673" }, "downloads": -1, "filename": "module_starter.leon-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "086b31ba73650bd6fd889deae3ee16b3", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6048, "upload_time": "2018-12-04T00:26:56", "url": "https://files.pythonhosted.org/packages/69/5b/278297dab28cdc6e10d43b13604f1135dfe21b8e069d3394f13bf48fc60a/module_starter.leon-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5215285db308bedb1302f356c96cd98d", "sha256": "9cab7427eb7231ee42295ba9131c08d5d7b3cf9479f51ae61c261a173137b980" }, "downloads": -1, "filename": "module-starter.leon-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5215285db308bedb1302f356c96cd98d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4952, "upload_time": "2018-12-04T00:26:58", "url": "https://files.pythonhosted.org/packages/87/16/a946d1f865b3b72b063c08ec7ee9c78986c3f1a1c01e5e96788427b131e7/module-starter.leon-0.1.1.tar.gz" } ] }