Skip to content

Commit 2492af8

Browse files
committed
docs: Add personalized doc files
1 parent 047c2b3 commit 2492af8

File tree

8 files changed

+277
-5
lines changed

8 files changed

+277
-5
lines changed

AUTHORS.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
3+
# Credits
4+
5+
---
6+
7+
# Development Lead
8+
9+
* [Elias Ojeda Medina @eocode]() <{{ cookiecutter.email }}>
10+
11+
# Contributors
12+
13+
---
14+
15+
None yet. Why not be the first?

cookiecutter.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
2-
"author_name": "ActivandoIdeas",
2+
"full_name": "Hello World",
3+
"email": "[email protected]",
4+
"github_username": "activandoideas",
5+
"author_name": "{{cookiecutter.github_username}}",
36
"project_name": "",
7+
"version": "0.1.0",
48
"project_slug": "{{cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_')}}",
59
"description": "{{cookiecutter.project_name}}",
610
"open_source_license": ["MIT license", "BSD license", "ISC license", "Apache Software License 2.0", "GNU General Public License v3", "Not open source"]

hooks/post_gen_project.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ def remove_file(filepath):
99

1010

1111
if __name__ == '__main__':
12+
13+
if '{{ cookiecutter.create_author_file }}' != 'y':
14+
remove_file('AUTHORS.rst')
15+
remove_file('docs/authors.rst')
16+
1217
if 'Not open source' == '{{ cookiecutter.open_source_license }}':
13-
remove_file('LICENSE')
18+
remove_file('LICENSE')
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
3+
# Credits
4+
5+
---
6+
7+
# Development Lead
8+
9+
* {{ cookiecutter.full_name }} <{{ cookiecutter.email }}>
10+
11+
# Contributors
12+
13+
---
14+
15+
None yet. Why not be the first?
+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
# List of project changes
1+
# Changelog
22

3-
## 0.1
3+
---
44

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

{{cookiecutter.project_slug}}/LICENSE

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{% if cookiecutter.open_source_license == 'MIT license' -%}
2+
MIT License
3+
4+
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
23+
{% elif cookiecutter.open_source_license == 'BSD license' %}
24+
25+
BSD License
26+
27+
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
28+
All rights reserved.
29+
30+
Redistribution and use in source and binary forms, with or without modification,
31+
are permitted provided that the following conditions are met:
32+
33+
* Redistributions of source code must retain the above copyright notice, this
34+
list of conditions and the following disclaimer.
35+
36+
* Redistributions in binary form must reproduce the above copyright notice, this
37+
list of conditions and the following disclaimer in the documentation and/or
38+
other materials provided with the distribution.
39+
40+
* Neither the name of the copyright holder nor the names of its
41+
contributors may be used to endorse or promote products derived from this
42+
software without specific prior written permission.
43+
44+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
45+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
46+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
48+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
49+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
51+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
52+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
53+
OF THE POSSIBILITY OF SUCH DAMAGE.
54+
{% elif cookiecutter.open_source_license == 'ISC license' -%}
55+
ISC License
56+
57+
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
58+
59+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
60+
61+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
62+
{% elif cookiecutter.open_source_license == 'Apache Software License 2.0' -%}
63+
Apache Software License 2.0
64+
65+
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
66+
67+
Licensed under the Apache License, Version 2.0 (the "License");
68+
you may not use this file except in compliance with the License.
69+
You may obtain a copy of the License at
70+
71+
http://www.apache.org/licenses/LICENSE-2.0
72+
73+
Unless required by applicable law or agreed to in writing, software
74+
distributed under the License is distributed on an "AS IS" BASIS,
75+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76+
See the License for the specific language governing permissions and
77+
limitations under the License.
78+
{% elif cookiecutter.open_source_license == 'GNU General Public License v3' -%}
79+
GNU GENERAL PUBLIC LICENSE
80+
Version 3, 29 June 2007
81+
82+
{{ cookiecutter.project_short_description }}
83+
Copyright (C) {% now 'local', '%Y' %} {{ cookiecutter.full_name }}
84+
85+
This program is free software: you can redistribute it and/or modify
86+
it under the terms of the GNU General Public License as published by
87+
the Free Software Foundation, either version 3 of the License, or
88+
(at your option) any later version.
89+
90+
This program is distributed in the hope that it will be useful,
91+
but WITHOUT ANY WARRANTY; without even the implied warranty of
92+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93+
GNU General Public License for more details.
94+
95+
You should have received a copy of the GNU General Public License
96+
along with this program. If not, see <http://www.gnu.org/licenses/>.
97+
98+
Also add information on how to contact you by electronic and paper mail.
99+
100+
You should also get your employer (if you work as a programmer) or school,
101+
if any, to sign a "copyright disclaimer" for the program, if necessary.
102+
For more information on this, and how to apply and follow the GNU GPL, see
103+
<http://www.gnu.org/licenses/>.
104+
105+
The GNU General Public License does not permit incorporating your program
106+
into proprietary programs. If your program is a subroutine library, you
107+
may consider it more useful to permit linking proprietary applications with
108+
the library. If this is what you want to do, use the GNU Lesser General
109+
Public License instead of this License. But first, please read
110+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
111+
{% endif %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include AUTHORS.md
2+
include CONTRIBUTING.md
3+
include CHANGELOG
4+
include LICENSE

0 commit comments

Comments
 (0)