Skip to main content

Quickly initiate a python project from scratch.

Project description

https://travis-ci.org/MacHu-GWU/pygitrepo-project.svg?branch=master https://codecov.io/gh/MacHu-GWU/pygitrepo-project/branch/master/graph/badge.svg https://img.shields.io/pypi/v/pygitrepo.svg https://img.shields.io/pypi/l/pygitrepo.svg https://img.shields.io/pypi/pyversions/pygitrepo.svg https://img.shields.io/badge/Star_Me_on_GitHub!--None.svg?style=social

Welcome to pygitrepo Documentation

pygitrepo can quickly initiate a python project from scratch, with these powerful tools out-of-the-box:

  • make up: single command to create/clean virtual environment.

  • make reformat: command to Google stylize your code.

  • make install: install your package (setup.py file is out-of-the-box).

  • make test: unittest with pytest (tests folder and scripts is out-of-the-box, just follow the pattern and create more).

  • make cov: code coverage test with coverage, the default .coveragerc fit most of the case).

  • make tox: multi python version test with tox, the default tox.ini fit most of the case.

  • built-in integration with https://travis-ci.org/.

  • built-in integration with https://codecov.io/.

  • make build_doc / view_doc: easy sphinx document writing, no need to run sphinx-quickstart, and write conf.py file.

  • make deploy_doc: deploy document to AWS S3.

  • make publish: publish your project to PyPI

pygitrepo is compatible with Windows / MacOS / Linux.

Usage

  1. Install: pip install pygitrepo.

  2. Run command line tool: pygitrepo-init.

  3. A <repo-name> directory will be created, you can use this as your github repo directory.

  4. Take a look at Makefile, all magic happens here!

Things Need to Install

For Windows (Git-Bash and MinGW)

Because Windows doesn’t have shell script and make command, so we have to install some third-party software to make it works.

Install Git Bash as shell emulator

  1. Download and install git.

  2. Now you can use C:\Program Files\Git\git-bash.exe like the terminal in MacOS/Linux.

Install MinGW

  1. Download and install, use the installer to install MinGW Base.

  2. Find C:\MinGW\bin\mingw32-make.exe, copy and paste and rename as C:\MinGW\bin\make.exe.

  3. Add C:\MinGW\bin to $PATH (environment variable).

Now you can use make <target> in git-bash.exe now.

For MacOS (HomeBrew)

You have to make sure:

There’s two way of using virtualenv in MacOS:

  1. Use generic virtualenv.

  2. Use pyenv + pyenv-virtualenv.

I prefer pyenv + pyenv-virtualenv, because it allows you:

  1. use tox to test against multiple python version locally before using cloud CI (continues integration).

  2. will not mess up your global python environment.

  3. the Makefile will do the pyenv + pyenv-virtualenv setup for you, just make sure that you have HomeBrew installed.

AWS Command Line (Optional)

Use AWS S3 to host your doc site is a good idea!

We need awscli to automate the deployment.

  1. Install awscli, just pip install awscli.

  2. Configure your API token, just aws configure and follow the instruction.

Config PyPI (Optional)

If you want to publish your package to PyPI or new PyPI, you need a pypi account and Configure your credential.

  1. Create a ${HOME}/.pypirc file.

  2. put these contents:

    [distutils]
    index-servers =
        pypi
    
    [pypi]
    username:<username>
    password:<password>

CI (Continues Integration) (Optional)

  1. Test with travis-ci, basically you just need to:
    • sign in using GitHub account.

    • toggle on your repo.

  2. Code Coverage Test with codecov.

Install

pygitrepo is released on PyPI, so all you need is:

$ pip install pygitrepo

To upgrade to latest version:

$ pip install --upgrade pygitrepo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygitrepo-0.0.5.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

pygitrepo-0.0.5-py2-none-any.whl (56.4 kB view details)

Uploaded Python 2

File details

Details for the file pygitrepo-0.0.5.tar.gz.

File metadata

  • Download URL: pygitrepo-0.0.5.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pygitrepo-0.0.5.tar.gz
Algorithm Hash digest
SHA256 216ccab53c197f7eec951b9453b02ae640b5178447e7513d23c0c8d46ce9f36e
MD5 9e2a616a92c4692f48469b7a33ed9760
BLAKE2b-256 d343b2126d3e742e9bbf0b101d1a15b0fd8f4a4ac9ded57a7bf5d5e821aa3389

See more details on using hashes here.

File details

Details for the file pygitrepo-0.0.5-py2-none-any.whl.

File metadata

File hashes

Hashes for pygitrepo-0.0.5-py2-none-any.whl
Algorithm Hash digest
SHA256 d061311b83cf3deb866721b477f956e65c1d78c070e131588c546b21c80dc10a
MD5 7799fe5cfbe376cd0eee2568f2ec966c
BLAKE2b-256 b7804aa4947554db41d2ec7d1083ba92f89051263d65bf6857a5ea84abc275a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page