Skip to content

jeremyarr/cookiecutter-pypi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cookiecutter-pypi

How I setup my projects.

Requirements:

Installation

  1. Clone the repository:
git clone https://github.com/jeremyarr/cookiecutter-pypi.git
  1. Edit the cookicutter.json file with your details

Typical Project Setup Steps:

  1. Navigate to the location where the project repository will reside:
$ cd my_python_dev_folder
  1. From the command line, run:
$ cookiecutter path/to/cloned/cookiecutter-pypi
  1. Create a project repository in GitHub matching the name used when cookie cutting. Do not initialize with README, license, or gitignore files
  2. Push the project repository to GitHub:
$ git init
$ git add --all
$ git commit -am "initial commit"
$ git remote add origin <repo_url>
$ git push --set-upstream origin master
  1. Go to https://rawgit.com/ and generate a production url for docs/_static/logo_full.png. Insert it into README.rst and docs/index.rst in place of references to logo_full.png. Autogenerated logo images are limited to projects with names less than 13 characters. Note, rawgit will cache the image permanently.
  2. Setup jenkins build job <repo_name>1
  3. Verify webhooks are working (might need to change to https)
  4. Give anon user ViewStatus role for the build job
  5. Setup a virtualenv using the requirements from requirements-dev.txt
$ make virtualenv
  1. Do a pull request from the dev branch to verify Jenkins is performing builds
  2. Setup master as a protected branch in GitHub with status checks
  3. Setup documentation at https://readthedocs.org/

Useful Commands

Generating sphinx documentation:

$ make docs

Generating build artifacts:

$ make package

Uploading build artifacts to pypi:

$ make publish

Running unit tests locally:

$ make tests

Running tests:

$ python run_tests.py -h

PEP8 checking:

$ make flake8

Installing dev dependencies:

$ pip install -r requirements_dev.txt