An open API service indexing awesome lists of open source software.

https://github.com/red-green-blue2/cookiecutter-pypi

How I setup my projects
https://github.com/red-green-blue2/cookiecutter-pypi

cookiecutter cookiecutter-template pypi python twine

Last synced: about 2 months ago
JSON representation

How I setup my projects

Awesome Lists containing this project

README

        

cookiecutter-pypi
==================
How I setup my projects.

Requirements:
--------------

- `cookiecutter `_
- `cairosvg `_

Installation
-------------

1. Clone the repository:

.. code-block:: bash

git clone https://github.com/jeremyarr/cookiecutter-pypi.git

2. Edit the ``cookicutter.json`` file with your details

Typical Project Setup Steps:
------------------------------

1. Navigate to the location where the project repository will reside:

.. code-block:: bash

$ cd my_python_dev_folder

2. From the command line, run:

.. code-block:: bash

$ cookiecutter path/to/cloned/cookiecutter-pypi

3. Create a project repository in GitHub matching the name used when cookie cutting. Do not initialize with README, license, or gitignore files

4. Push the project repository to GitHub:

.. code-block:: bash

$ git init
$ git add --all
$ git commit -am "initial commit"
$ git remote add origin
$ git push --set-upstream origin master

4. 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.

5. Setup jenkins build job ``1``

6. Verify webhooks are working (might need to change to https)

7. Give anon user ViewStatus role for the build job

8. Setup a virtualenv using the requirements from requirements-dev.txt

.. code-block:: bash

$ make virtualenv

9. Do a pull request from the dev branch to verify Jenkins is performing builds

10. Setup master as a protected branch in GitHub with status checks

11. Setup documentation at https://readthedocs.org/

Useful Commands
-----------------

Generating sphinx documentation:

.. code-block:: bash

$ make docs

Generating build artifacts:

.. code-block:: bash

$ make package

Uploading build artifacts to pypi:

.. code-block:: bash

$ make publish

Running unit tests locally:

.. code-block:: bash

$ make tests

Running tests:

.. code-block:: bash

$ python run_tests.py -h

PEP8 checking:

.. code-block:: bash

$ make flake8

Installing dev dependencies:

.. code-block:: bash

$ pip install -r requirements_dev.txt