Skip to content

Commit 8c91373

Browse files
committed
1 parent d47c3e8 commit 8c91373

25 files changed

+715
-0
lines changed

Diff for: .DS_Store

6 KB
Binary file not shown.

Diff for: 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+
* Christian Staudt <[email protected]>
9+
10+
Contributors
11+
------------
12+
13+
None yet. Why not be the first?

Diff for: CONTRIBUTING.rst

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
.. highlight:: shell
2+
3+
============
4+
Contributing
5+
============
6+
7+
Contributions are welcome, and they are greatly appreciated! Every little bit
8+
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/clstaudt/tuttle/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" and "help
30+
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+
tuttle could always use more documentation, whether as part of the
42+
official tuttle 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/clstaudt/tuttle/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 `tuttle` for local development.
61+
62+
1. Fork the `tuttle` repo on GitHub.
63+
2. Clone your fork locally::
64+
65+
$ git clone [email protected]:your_name_here/tuttle.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 tuttle
70+
$ cd tuttle/
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
80+
tests, including testing other Python versions with tox::
81+
82+
$ flake8 tuttle tests
83+
$ python setup.py test or pytest
84+
$ tox
85+
86+
To get flake8 and tox, just pip install them into your virtualenv.
87+
88+
6. Commit your changes and push your branch to GitHub::
89+
90+
$ git add .
91+
$ git commit -m "Your detailed description of your changes."
92+
$ git push origin name-of-your-bugfix-or-feature
93+
94+
7. Submit a pull request through the GitHub website.
95+
96+
Pull Request Guidelines
97+
-----------------------
98+
99+
Before you submit a pull request, check that it meets these guidelines:
100+
101+
1. The pull request should include tests.
102+
2. If the pull request adds functionality, the docs should be updated. Put
103+
your new functionality into a function with a docstring, and add the
104+
feature to the list in README.rst.
105+
3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
106+
https://travis-ci.com/clstaudt/tuttle/pull_requests
107+
and make sure that the tests pass for all supported Python versions.
108+
109+
Tips
110+
----
111+
112+
To run a subset of tests::
113+
114+
$ pytest tests.test_tuttle
115+
116+
117+
Deploying
118+
---------
119+
120+
A reminder for the maintainers on how to deploy.
121+
Make sure all your changes are committed (including an entry in HISTORY.rst).
122+
Then run::
123+
124+
$ bump2version patch # possible: major / minor / patch
125+
$ git push
126+
$ git push --tags
127+
128+
Travis will then deploy to PyPI if tests pass.

Diff for: HISTORY.rst

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

Diff for: LICENSE

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
GNU GENERAL PUBLIC LICENSE
2+
Version 3, 29 June 2007
3+
4+
PLess paperwork, more excitement.
5+
Copyright (C) 2021 Christian Staudt
6+
7+
This program is free software: you can redistribute it and/or modify
8+
it under the terms of the GNU General Public License as published by
9+
the Free Software Foundation, either version 3 of the License, or
10+
(at your option) any later version.
11+
12+
This program is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+
Also add information on how to contact you by electronic and paper mail.
21+
22+
You should also get your employer (if you work as a programmer) or school,
23+
if any, to sign a "copyright disclaimer" for the program, if necessary.
24+
For more information on this, and how to apply and follow the GNU GPL, see
25+
<http://www.gnu.org/licenses/>.
26+
27+
The GNU General Public License does not permit incorporating your program
28+
into proprietary programs. If your program is a subroutine library, you
29+
may consider it more useful to permit linking proprietary applications with
30+
the library. If this is what you want to do, use the GNU Lesser General
31+
Public License instead of this License. But first, please read
32+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
33+

Diff for: MANIFEST.in

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

Diff for: Makefile

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

Diff for: docs/Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = python -msphinx
7+
SPHINXPROJ = tuttle
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

Diff for: docs/authors.rst

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

0 commit comments

Comments
 (0)