Skip to content

Commit 1e6e0b2

Browse files
author
Jordan Yoshihara
committed
Added cookie cutter structure
1 parent d04bef6 commit 1e6e0b2

20 files changed

+813
-0
lines changed

.travis.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Config file for automatic testing at travis-ci.org
2+
# This file will be regenerated if you run travis_pypi_setup.py
3+
4+
language: python
5+
python: 3.5
6+
7+
env:
8+
- TOXENV=py35
9+
- TOXENV=py34
10+
- TOXENV=py33
11+
- TOXENV=py27
12+
- TOXENV=py26
13+
- TOXENV=pypy
14+
15+
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
16+
install: pip install -U tox
17+
18+
# command to run tests, e.g. python setup.py test
19+
script: tox -e ${TOXENV}
20+
21+
# After you create the Github repo and add it to Travis, run the
22+
# travis_pypi_setup.py script to finish PyPI deployment setup
23+
deploy:
24+
provider: pypi
25+
distributions: sdist bdist_wheel
26+
user: jayoshih
27+
password:
28+
secure: PLEASE_REPLACE_ME
29+
on:
30+
tags: true
31+
repo: jayoshih/ricecooker
32+
condition: $TOXENV == py27

AUTHORS.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======
2+
Credits
3+
=======
4+
5+
Development Lead
6+
----------------
7+
8+
* Jordan Yoshihara <[email protected]>
9+
10+
Contributors
11+
------------
12+
13+
None yet. Why not be the first?

CONTRIBUTING.rst

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
.. highlight:: shell
2+
3+
============
4+
Contributing
5+
============
6+
7+
Contributions are welcome, and they are greatly appreciated! Every
8+
little bit helps, and credit will always be given.
9+
10+
You can contribute in many ways:
11+
12+
Types of Contributions
13+
----------------------
14+
15+
Report Bugs
16+
~~~~~~~~~~~
17+
18+
Report bugs at https://github.com/jayoshih/ricecooker/issues.
19+
20+
If you are reporting a bug, please include:
21+
22+
* Your operating system name and version.
23+
* Any details about your local setup that might be helpful in troubleshooting.
24+
* Detailed steps to reproduce the bug.
25+
26+
Fix Bugs
27+
~~~~~~~~
28+
29+
Look through the GitHub issues for bugs. Anything tagged with "bug"
30+
and "help wanted" is open to whoever wants to implement it.
31+
32+
Implement Features
33+
~~~~~~~~~~~~~~~~~~
34+
35+
Look through the GitHub issues for features. Anything tagged with "enhancement"
36+
and "help wanted" is open to whoever wants to implement it.
37+
38+
Write Documentation
39+
~~~~~~~~~~~~~~~~~~~
40+
41+
ricecooker could always use more documentation, whether as part of the
42+
official ricecooker docs, in docstrings, or even on the web in blog posts,
43+
articles, and such.
44+
45+
Submit Feedback
46+
~~~~~~~~~~~~~~~
47+
48+
The best way to send feedback is to file an issue at https://github.com/jayoshih/ricecooker/issues.
49+
50+
If you are proposing a feature:
51+
52+
* Explain in detail how it would work.
53+
* Keep the scope as narrow as possible, to make it easier to implement.
54+
* Remember that this is a volunteer-driven project, and that contributions
55+
are welcome :)
56+
57+
Get Started!
58+
------------
59+
60+
Ready to contribute? Here's how to set up `ricecooker` for local development.
61+
62+
1. Fork the `ricecooker` repo on GitHub.
63+
2. Clone your fork locally::
64+
65+
$ git clone [email protected]:your_name_here/ricecooker.git
66+
67+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
68+
69+
$ mkvirtualenv ricecooker
70+
$ cd ricecooker/
71+
$ python setup.py develop
72+
73+
4. Create a branch for local development::
74+
75+
$ git checkout -b name-of-your-bugfix-or-feature
76+
77+
Now you can make your changes locally.
78+
79+
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
80+
81+
$ flake8 ricecooker tests
82+
$ python setup.py test or py.test
83+
$ tox
84+
85+
To get flake8 and tox, just pip install them into your virtualenv.
86+
87+
6. Commit your changes and push your branch to GitHub::
88+
89+
$ git add .
90+
$ git commit -m "Your detailed description of your changes."
91+
$ git push origin name-of-your-bugfix-or-feature
92+
93+
7. Submit a pull request through the GitHub website.
94+
95+
Pull Request Guidelines
96+
-----------------------
97+
98+
Before you submit a pull request, check that it meets these guidelines:
99+
100+
1. The pull request should include tests.
101+
2. If the pull request adds functionality, the docs should be updated. Put
102+
your new functionality into a function with a docstring, and add the
103+
feature to the list in README.rst.
104+
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
105+
https://travis-ci.org/jayoshih/ricecooker/pull_requests
106+
and make sure that the tests pass for all supported Python versions.
107+
108+
Tips
109+
----
110+
111+
To run a subset of tests::
112+
113+
$ py.test tests.test_ricecooker
114+

HISTORY.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=======
2+
History
3+
=======
4+
5+
0.1.0 (2016-09-30)
6+
------------------
7+
8+
* First release on PyPI.

MANIFEST.in

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
include AUTHORS.rst
3+
4+
include CONTRIBUTING.rst
5+
include HISTORY.rst
6+
include LICENSE
7+
include README.rst
8+
9+
recursive-include tests *
10+
recursive-exclude * __pycache__
11+
recursive-exclude * *.py[co]
12+
13+
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif

Makefile

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
.PHONY: clean clean-test clean-pyc clean-build docs help
2+
.DEFAULT_GOAL := help
3+
define BROWSER_PYSCRIPT
4+
import os, webbrowser, sys
5+
try:
6+
from urllib import pathname2url
7+
except:
8+
from urllib.request import pathname2url
9+
10+
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
11+
endef
12+
export BROWSER_PYSCRIPT
13+
14+
define PRINT_HELP_PYSCRIPT
15+
import re, sys
16+
17+
for line in sys.stdin:
18+
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
19+
if match:
20+
target, help = match.groups()
21+
print("%-20s %s" % (target, help))
22+
endef
23+
export PRINT_HELP_PYSCRIPT
24+
BROWSER := python -c "$$BROWSER_PYSCRIPT"
25+
26+
help:
27+
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
28+
29+
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
30+
31+
32+
clean-build: ## remove build artifacts
33+
rm -fr build/
34+
rm -fr dist/
35+
rm -fr .eggs/
36+
find . -name '*.egg-info' -exec rm -fr {} +
37+
find . -name '*.egg' -exec rm -f {} +
38+
39+
clean-pyc: ## remove Python file artifacts
40+
find . -name '*.pyc' -exec rm -f {} +
41+
find . -name '*.pyo' -exec rm -f {} +
42+
find . -name '*~' -exec rm -f {} +
43+
find . -name '__pycache__' -exec rm -fr {} +
44+
45+
clean-test: ## remove test and coverage artifacts
46+
rm -fr .tox/
47+
rm -f .coverage
48+
rm -fr htmlcov/
49+
50+
lint: ## check style with flake8
51+
flake8 ricecooker tests
52+
53+
test: ## run tests quickly with the default Python
54+
py.test
55+
56+
57+
test-all: ## run tests on every Python version with tox
58+
tox
59+
60+
coverage: ## check code coverage quickly with the default Python
61+
coverage run --source ricecooker py.test
62+
63+
coverage report -m
64+
coverage html
65+
$(BROWSER) htmlcov/index.html
66+
67+
docs: ## generate Sphinx HTML documentation, including API docs
68+
rm -f docs/ricecooker.rst
69+
rm -f docs/modules.rst
70+
sphinx-apidoc -o docs/ ricecooker
71+
$(MAKE) -C docs clean
72+
$(MAKE) -C docs html
73+
$(BROWSER) docs/_build/html/index.html
74+
75+
servedocs: docs ## compile the docs watching for changes
76+
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
77+
78+
release: clean ## package and upload a release
79+
python setup.py sdist upload
80+
python setup.py bdist_wheel upload
81+
82+
dist: clean ## builds source and wheel package
83+
python setup.py sdist
84+
python setup.py bdist_wheel
85+
ls -l dist
86+
87+
install: clean ## install the package to the active Python's site-packages
88+
python setup.py install

docs/authors.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../AUTHORS.rst

docs/contributing.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../CONTRIBUTING.rst

docs/history.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../HISTORY.rst

docs/installation.rst

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.. highlight:: shell
2+
3+
============
4+
Installation
5+
============
6+
7+
8+
Stable release
9+
--------------
10+
11+
To install ricecooker, run this command in your terminal:
12+
13+
.. code-block:: console
14+
15+
$ pip install ricecooker
16+
17+
This is the preferred method to install ricecooker, as it will always install the most recent stable release.
18+
19+
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
20+
you through the process.
21+
22+
.. _pip: https://pip.pypa.io
23+
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
24+
25+
26+
From sources
27+
------------
28+
29+
The sources for ricecooker can be downloaded from the `Github repo`_.
30+
31+
You can either clone the public repository:
32+
33+
.. code-block:: console
34+
35+
$ git clone git://github.com/jayoshih/ricecooker
36+
37+
Or download the `tarball`_:
38+
39+
.. code-block:: console
40+
41+
$ curl -OL https://github.com/jayoshih/ricecooker/tarball/master
42+
43+
Once you have a copy of the source, you can install it with:
44+
45+
.. code-block:: console
46+
47+
$ python setup.py install
48+
49+
50+
.. _Github repo: https://github.com/jayoshih/ricecooker
51+
.. _tarball: https://github.com/jayoshih/ricecooker/tarball/master

0 commit comments

Comments
 (0)