Skip to content

Commit 72d643e

Browse files
committed
Initial commit
0 parents  commit 72d643e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2495
-0
lines changed

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.bat]
14+
indent_style = tab
15+
end_of_line = crlf
16+
17+
[LICENSE]
18+
insert_final_newline = false
19+
20+
[Makefile]
21+
indent_style = tab

.github/ISSUE_TEMPLATE.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* psdwriter version:
2+
* Python version:
3+
* Operating System:
4+
5+
### Description
6+
7+
Describe what you were trying to get done.
8+
Tell us what happened, what went wrong, and what you expected to happen.
9+
10+
### What I Did
11+
12+
```
13+
Paste the command(s) you ran and the output.
14+
If there was a crash, please include the traceback here.
15+
```

.gitignore

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
55+
# Sphinx documentation
56+
docs/_build/
57+
58+
# PyBuilder
59+
target/

.travis.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Config file for automatic testing at travis-ci.org
2+
3+
language: python
4+
python:
5+
- 3.4
6+
- 3.5
7+
8+
install:
9+
- pip install -r requirements_dev.txt --use-mirrors
10+
- pip install -r requirements.txt --use-mirrors
11+
12+
# TODO: coverage, flake
13+
script:
14+
- py.test

AUTHORS.rst

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
=======
2+
Credits
3+
=======
4+
5+
Development Lead
6+
----------------
7+
8+
* Michael Droettboom <[email protected]>
9+
10+
Contributors
11+
------------

CONTRIBUTING.rst

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
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/mdboom/psdwriter/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+
psdwriter could always use more documentation, whether as part of the
42+
official psdwriter 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/mdboom/psdwriter/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 `psdwriter` for local development.
61+
62+
1. Fork the `psdwriter` repo on GitHub.
63+
2. Clone your fork locally::
64+
65+
$ git clone [email protected]:your_name_here/psdwriter.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 psdwriter
70+
$ cd psdwriter/
71+
$ pip install -r requirements_dev.txt
72+
$ pip install -r requirements.txt
73+
$ python setup.py develop
74+
75+
4. Create a branch for local development::
76+
77+
$ git checkout -b name-of-your-bugfix-or-feature
78+
79+
Now you can make your changes locally.
80+
81+
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
82+
83+
$ flake8 psdwriter tests
84+
$ py.test
85+
86+
6. Commit your changes and push your branch to GitHub::
87+
88+
$ git add .
89+
$ git commit -m "Your detailed description of your changes."
90+
$ git push origin name-of-your-bugfix-or-feature
91+
92+
7. Submit a pull request through the GitHub website.
93+
94+
Pull Request Guidelines
95+
-----------------------
96+
97+
Before you submit a pull request, check that it meets these guidelines:
98+
99+
1. The pull request should include tests.
100+
2. If the pull request adds functionality, the docs should be updated. Put
101+
your new functionality into a function with a docstring, and add the
102+
feature to the list in README.rst.
103+
3. The pull request should work for Python 3.4 and 3.5. Check
104+
https://travis-ci.org/mdboom/psdwriter/pull_requests
105+
and make sure that the tests pass for all supported Python versions.
106+
107+
Tips
108+
----
109+
110+
To run a subset of tests::
111+
112+
$ py.test tests.test_psdwriter

HISTORY.rst

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
=======
2+
History
3+
=======

LICENSE

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
BSD License
3+
4+
Copyright (c) 2016, Michael Droettboom
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above copyright notice, this
14+
list of conditions and the following disclaimer in the documentation and/or
15+
other materials provided with the distribution.
16+
17+
* Neither the name of psdwriter nor the names of its
18+
contributors may be used to endorse or promote products derived from this
19+
software without specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
28+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30+
OF THE POSSIBILITY OF SUCH DAMAGE.
31+

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

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 psdwriter 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 psdwriter 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/psdwriter.rst
69+
rm -f docs/modules.rst
70+
sphinx-apidoc -o docs/ psdwriter
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

0 commit comments

Comments
 (0)