Skip to content

Commit

Permalink
Merge pull request #17 from Bernardo-MG/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Bernardo-MG committed Jan 7, 2018
2 parents bac2ba4 + 0b16bfa commit 77206e0
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 422 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Cookiecutter Python Library
`Cookiecutter`_ template for creating general-purpose Python libraries.

While it mostly follows my personal tastes, it offers a series of good
practices which include deployment files, makefile, testing, and the use of
various free services, such as Github, Travis and Pypi.
practices which include deployment files, testing, and the use of various
free services, such as Github, Travis and Pypi.

.. image:: https://img.shields.io/badge/docs-release-blue.svg
:target: http://docs.bernardomg.com/cookiecutter-python-library
Expand Down Expand Up @@ -66,10 +66,10 @@ Of course, a Python interpreter is also required. To find the valid versions
check the Cookiecutter page.

All other dependencies are indicated on the requirements.txt file.
These can be installed with the included makefile by using the following
command:

``$ make requirements``
These can be installed with:

``$ pip install --upgrade -r requirements.txt``

Installing and creating a new project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 3 additions & 3 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"developer_name": "Bernardo Martínez Garrido",
"developer_name": "Bernardo Mart\u00EDnez Garrido",
"developer_email": "programming@bernardomg.com",
"developer_url": "https://github.com/Bernardo-MG",
"github_username": "Bernardo-MG",
"project_name": "Python Library",
"package_name": "python-library",
"project_short_description": "A library for Python",
"year": "2016",
"version": "0.1.2",
"year": "2018",
"version": "0.1.0",
"docs_release_url": "docs.bernardomg.com",
"docs_development_url": "docs.bernardomg.com/development"
}
2 changes: 0 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@
('Usage', './usage.html'),
('Tests',
'./tests.html'),
('Makefile',
'./makefile.html'),
('Doc site',
'./doc_site.html')])],
}
Expand Down
5 changes: 1 addition & 4 deletions docs/source/doc_site.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ Documentation site
==================

The `Sphinx`_ folder contains basic files to generate a Sphinx documentation
site. Of course, Sphinx can be used to create other kinds of docs, but combined
with `ReadTheDocs`_ it is possible to have an always accessible documentation
site, which will look similar to this one.
site.

There is little to add which can't be found on the Sphinx site, apart from the
fact that the `Sphinx Docs Theme`_ template has been used for the UI look.

.. _ReadTheDocs: https://readthedocs.org/
.. _Sphinx: http://sphinx-doc.org/
.. _Sphinx Docs Theme: https://github.com/Bernardo-MG/sphinx-docs-theme
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Features
acquire
usage
doc_site
makefile
tests


Expand Down
63 changes: 0 additions & 63 deletions docs/source/makefile.rst

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Installation and deployment
setuptools==38.2.5
twine==1.9.1
bernardomg.tox-test-command==1.0.2

# Cookiecutter
cookiecutter==1.6.0
Expand Down
40 changes: 2 additions & 38 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
import sys
import io
from os.path import dirname
from os.path import join

from setuptools import find_packages, setup
from setuptools.command.test import test as test_command
from bernardomg.tox_test_command import ToxTestCommand

"""
PyPI configuration module.
Expand All @@ -27,41 +26,6 @@ def read(*names, **kwargs):
).read()


class _ToxTester(test_command):
"""
Tox test command.
Calls tox for running the tests.
"""
user_options = [
('test-module=', 'm', "Run 'test_suite' in specified module"),
('test-suite=', 's',
"Run single test, case or suite (e.g. 'module.test_suite')"),
('test-runner=', 'r', "Test runner to use"),
('profile=', 'p', 'Test profile to use')
]

def initialize_options(self):
test_command.initialize_options(self)
self.profile = None

def finalize_options(self):
test_command.finalize_options(self)
self.test_args = []

if self.profile is not None:
# Adds the profile argument
# For example: '-e=py36'
self.test_args.append('-e=' + self.profile)

def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox

errcode = tox.cmdline(self.test_args)
sys.exit(errcode)


setup(
name='cookiecutter-python-library',
packages=find_packages(),
Expand Down Expand Up @@ -95,5 +59,5 @@ def run_tests(self):
],
tests_require=_tests_require,
extras_require={'test': _tests_require},
cmdclass={'test': _ToxTester},
cmdclass={'test': ToxTestCommand},
)
2 changes: 0 additions & 2 deletions {{cookiecutter.package_name}}/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Miscellany files
include LICENSE
include README.rst
include Makefile
include make.bat
include tox.ini
include requirements.txt
include .coveragerc
Expand Down
89 changes: 0 additions & 89 deletions {{cookiecutter.package_name}}/Makefile

This file was deleted.

11 changes: 5 additions & 6 deletions {{cookiecutter.package_name}}/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ project according to a few pieces of data it will ask for.
:target: https://pypi.python.org/pypi/{{ cookiecutter.package_name }}
:alt: {{ cookiecutter.project_name }} Pypi package page

.. image:: https://readthedocs.org/projects/{{ cookiecutter.package_name }}/badge/?version=latest
.. image:: https://img.shields.io/badge/docs-release-blue.svg
:target: http://{{ cookiecutter.docs_release_url }}/{{ cookiecutter.package_name }}
:alt: {{ cookiecutter.project_name }} latest documentation Status
.. image:: https://readthedocs.org/projects/{{ cookiecutter.package_name }}/badge/?version=develop
.. image:: https://img.shields.io/badge/docs-develop-blue.svg
:target: http://{{ cookiecutter.docs_development_url }}/{{ cookiecutter.package_name }}
:alt: {{ cookiecutter.project_name }} development documentation Status

Features
--------

By default the project comes with the following features:

- Travis configuration file
- Customized setup.py module to minimize configuration, and using tox for the tests
- Docs using `Sphinx`_ and the `Sphinx Docs Theme <https://github.com/Bernardo-MG/sphinx-docs-theme>`_
Expand Down Expand Up @@ -63,9 +61,10 @@ The project has been tested in the following versions of the interpreter:
- Pypy 3

All other dependencies are indicated on the requirements.txt file.
The included makefile can install them with the command:

``$ make requirements``
These can be installed with:

``$ pip install --upgrade -r requirements.txt``

Installing
~~~~~~~~~~
Expand Down

0 comments on commit 77206e0

Please sign in to comment.