Skip to content

Commit bd0b8a0

Browse files
committed
First commit
0 parents  commit bd0b8a0

16 files changed

+512
-0
lines changed

.coveragerc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[run]
2+
branch = True
3+
omit = setup.py, */migrations/*, */conftest.py
4+
5+
[report]
6+
# Regexes for lines to exclude from consideration
7+
exclude_lines =
8+
# Have to re-enable the standard pragma
9+
pragma: no cover
10+
NOCOV
11+
12+
# Don't complain if non-runnable code isn't run:
13+
if __name__ == .__main__.:
14+
15+
[html]
16+
directory = .htmlcov

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
__pycache__
2+
*.pyc
3+
/.cache
4+
/.coverage
5+
/.tox
6+
/build
7+
/dist
8+
/docs/_build

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: python
2+
3+
python:
4+
- "2.7"
5+
- "3.3"
6+
- "3.4"
7+
- "3.5"
8+
9+
install:
10+
- pip install -r requirements-test.txt
11+
- pip install coveralls
12+
13+
script: py.test --flake8 --cov djclick
14+
15+
after_success: coveralls

AUTHORS.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
====================
2+
Project contributors
3+
====================
4+
5+
* Jonathan Stoppani <[email protected]>

CONTRIBUTING.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
=======================
2+
Contribution guidelines
3+
=======================
4+
5+
6+
Running tests
7+
=============
8+
9+
Use ``tox``::
10+
11+
pip install tox
12+
tox
13+
14+
15+
Creating a release
16+
==================
17+
18+
* Checkout the ``master`` branch.
19+
* Pull the latest changes from ``origin``.
20+
* Make sure ``check-manifest`` is happy.
21+
* Increment the version number.
22+
* Set the correct title for the release in ``HISTORY.rst``.
23+
* If needed update the ``AUTHORS.rst`` file with new contributors.
24+
* Commit everything and make sure the working tree is clean.
25+
* Push everything to github and make sure the tests pass on Travis::
26+
27+
git push origin master
28+
29+
* Build and upload the release::
30+
31+
./setup.py publish
32+
33+
* Tag the release::
34+
35+
git tag -a "v$(python setup.py --version)" -m "$(python setup.py --name) release version $(python setup.py --version)"
36+
37+
* Push everything to github::
38+
39+
git push --tags origin master
40+
41+
* Add the title for the next release to `HISTORY.rst`

HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
=======
2+
History
3+
=======
4+
5+
6+
0.1.0 – Unreleased
7+
==================
8+
9+
* Initial release

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2015 Jonathan Stoppani
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

MANIFEST.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
include AUTHORS.rst
2+
include CONTRIBUTING.rst
3+
include HISTORY.rst
4+
include LICENSE
5+
include README.rst
6+
7+
include requirements-dev.txt
8+
include requirements-test.txt
9+
include requirements.txt
10+
11+
exclude .coveragerc
12+
exclude .travis.yml
13+
exclude tox.ini
14+
15+
prune docs

README.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
============
2+
Django Click
3+
============
4+
5+
.. image:: https://img.shields.io/travis/GaretJax/django-click.svg
6+
:target: https://travis-ci.org/GaretJax/django-click
7+
8+
.. image:: https://img.shields.io/pypi/v/django-click.svg
9+
:target: https://pypi.python.org/pypi/django-click
10+
11+
.. image:: https://img.shields.io/pypi/dm/django-click.svg
12+
:target: https://pypi.python.org/pypi/django-click
13+
14+
.. image:: https://img.shields.io/coveralls/GaretJax/django-click/master.svg
15+
:target: https://coveralls.io/r/GaretJax/django-click?branch=master
16+
17+
.. image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
18+
:target: http://django-click.readthedocs.org/en/latest/
19+
20+
.. image:: https://img.shields.io/pypi/l/django-click.svg
21+
:target: https://github.com/GaretJax/django-click/blob/develop/LICENSE
22+
23+
.. image:: https://img.shields.io/requires/github/GaretJax/django-click.svg
24+
:target: https://requires.io/github/GaretJax/django-click/requirements/?branch=master
25+
26+
.. .. image:: https://img.shields.io/codeclimate/github/GaretJax/django-click.svg
27+
.. :target: https://codeclimate.com/github/GaretJax/django-click
28+
29+
django-click is a library to easily write django management commands using the
30+
click command line library.
31+
32+
* Free software: MIT license
33+
* Documentation: http://django-click.rtfd.org
34+
35+
36+
Installation
37+
============
38+
39+
::
40+
41+
pip install django-click
42+
43+
44+
Example
45+
=======
46+
47+
Create a command module as you would usually do, but instead of creating a
48+
class, just put a djclick command into it::
49+
50+
import djclick as click
51+
52+
@click.command()
53+
@click.argument('name')
54+
def command(name):
55+
click.secho('Hello, {}'.format(name), fg='red')

djclick/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Support click in Django management commands.
3+
"""
4+
5+
import click
6+
from click import * # NOQA
7+
from .adapter import CommandRegistrator
8+
9+
10+
__version__ = '0.1.0'
11+
__url__ = 'https://github.com/GaretJax/django-click'
12+
__all__ = click.__all__
13+
14+
command = CommandRegistrator

0 commit comments

Comments
 (0)