Skip to content

Commit 57414bc

Browse files
author
Janneke van der Zwaan
committed
Convert README to rst
1 parent 67496fd commit 57414bc

File tree

2 files changed

+164
-133
lines changed

2 files changed

+164
-133
lines changed

{{cookiecutter.project_slug}}/README.md

Lines changed: 0 additions & 133 deletions
This file was deleted.
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
################################################################################
2+
{{ cookiecutter.project_name }}
3+
################################################################################
4+
5+
{{ cookiecutter.project_short_description }}
6+
7+
Project Setup
8+
*************
9+
10+
Here we provide some details about the project setup. Most of the choices are explained in the `guide <https://guide.esciencecenter.nl>`_. Links to the relevant sections are included below.
11+
Feel free to remove this text when the development of the software package takes off.
12+
13+
For a quick reference on software development, we refer to `the software guide checklist <https://guide.esciencecenter.nl/best_practices/checklist.html>`_.
14+
15+
Version control
16+
---------------
17+
18+
Once your Python package is created, put it under
19+
`version control <https://guide.esciencecenter.nl/best_practices/version_control.html>`_!
20+
We recommend using `git <http://git-scm.com/>`_ and `github <https://github.com/>`_.
21+
22+
.. code-block:: console
23+
24+
cd {{ cookiecutter.project_slug }}
25+
git init
26+
git add -A
27+
git commit
28+
29+
Python versions
30+
---------------
31+
32+
This repository is set up with Python versions: 2.7, 3.4, 3.5, and 3.6. Add or remove Python versions based on project requirements. `The guide <https://guide.esciencecenter.nl/best_practices/language_guides/python.html>`_ contains more information about Python versions and writing Python 2 and 3 compatible code.
33+
34+
Package management
35+
------------------
36+
37+
You can use either `pip` or `conda` for installing dependencies and package management. This repository does not force you to use one or the other, as project requirements differ. For advice on what to use, please check `the relevant section of the guide <https://guide.esciencecenter.nl/languages/python.html#dependencies-and-package-management>`_.
38+
39+
Packaging/One command install
40+
-----------------------------
41+
42+
You can distribute your code using pipy or conda. Again, the project template does not enforce the use of either one. `The guide <https://guide.esciencecenter.nl/languages/python.html#building-and-packaging-code>`_ can help you decide which tool to use for packaging.
43+
44+
Testing and code coverage
45+
-------------------------
46+
47+
* Tests should be put in the ``tests`` folder.
48+
* The testing framework used is `PyTest <https://pytest.org>`_
49+
50+
- `PyTest introduction <http://pythontesting.net/framework/pytest/pytest-introduction/>`_
51+
52+
* Tests can be run with ``python setup.py test``
53+
54+
- This is configured in ``setup.py`` and ``setup.cfg``
55+
56+
* Use `Travis CI <https://travis-ci.com/>`_ to automatically run tests and to test using multiple Python versions
57+
58+
- Configuration can be found in ``.travis.yml``
59+
- `Getting started with Travis CI <https://docs.travis-ci.com/user/getting-started/>`_
60+
61+
* TODO: add something about code quality/coverage tool?
62+
63+
Documentation
64+
-------------
65+
66+
* Documentation should be put in the ``docs`` folder. The contents have been generated using ``sphinx-quickstart`` (Sphinx version 1.6.5).
67+
* We recommend writing the documentation using Restructured Text (reST)
68+
69+
- `Restructured Text (reST) and Sphinx CheatSheet <http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/sphinx/rest_syntax.html>`_
70+
71+
* To generate html documentation run ``python setup.py build_sphinx``
72+
73+
- This is configured in ``setup.cfg``
74+
- Alternatively, run ``make html`` in the ``docs`` folder.
75+
76+
* The ``docs/_static`` and ``docs/_templates`` contain an (empty) ``.gitignore`` file, to be able to add them to the repository. These two files can be safely removed (or you can just leave them there).
77+
* To put the documentation on `Read the Docs <https://readthedocs.org>`_, log in to your Read the Docs account, and import the repository (under 'My Projects').
78+
79+
- Include the link to the documentation in this README_.
80+
81+
Coding style conventions and code quality
82+
-----------------------------------------
83+
84+
* Check your code style with ``prospector``
85+
* You may need run ``pip install .[dev]`` first, to install the required dependencies
86+
* You can use ``yapf`` to fix the readability of your code style and ``isort`` to format and group your imports
87+
* `Relevant section in the guide <https://guide.esciencecenter.nl/languages/python.html#coding-style-conventions>`_
88+
89+
CHANGELOG.md
90+
------------
91+
92+
* Document changes to your software package
93+
* `Relevant section in the guide <https://guide.esciencecenter.nl/software/releases.html#changelogmd>`_
94+
95+
CITATION.cff
96+
------------
97+
98+
* To allow others to cite your software, add a ``CITATION.cff`` file
99+
* It only makes sense to do this once there is something to cite (e.g., a software release with a DOI).
100+
* To generate a CITATION.cff file given a DOI, use `doi2cff <https://github.com/citation-file-format/doi2cff>`_.
101+
* `Relevant section in the guide <https://guide.esciencecenter.nl/software/documentation.html#citation-file>`_
102+
103+
CODE_OF_CONDUCT.md
104+
------------------
105+
106+
* Information about how to behave professionally
107+
* `Relevant section in the guide <https://guide.esciencecenter.nl/software/documentation.html#code-of-conduct>`_
108+
109+
CONTRIBUTING.md
110+
---------------
111+
112+
* Information about how to contribute to this software package
113+
* `Relevant section in the guide <https://guide.esciencecenter.nl/software/documentation.html#contribution-guidelines>`_
114+
115+
MANIFEST.in
116+
-----------
117+
118+
* List non-Python files that should be included in a source distribution
119+
* `Relevant section in the guide <https://guide.esciencecenter.nl/languages/python.html#building-and-packaging-code>`_
120+
121+
NOTICE
122+
------
123+
124+
* List of licenses of the project and dependencies
125+
* `Relevant section in the guide <https://guide.esciencecenter.nl/software/licensing.html#noticetxtmd>`_
126+
127+
Installation
128+
------------
129+
130+
To install {{ cookiecutter.project_slug }}, do:
131+
132+
.. code-block:: console
133+
134+
git clone [email protected]:{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}.git
135+
cd {{ cookiecutter.project_slug }}
136+
pip install .
137+
138+
139+
Run tests (including coverage) with:
140+
141+
.. code-block:: console
142+
143+
python setup.py test
144+
145+
146+
Documentation
147+
*************
148+
149+
.. _README:
150+
151+
Include a link to your project's full documentation here.
152+
153+
Contributing
154+
************
155+
156+
If you want to contribute to the development of {{ cookiecutter.project_name }},
157+
have a look at the `contribution guidelines <CONTRIBUTING.md>`_.
158+
159+
License
160+
*******
161+
162+
Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.copyright_holder }}
163+
164+
{{ cookiecutter.open_source_license }}

0 commit comments

Comments
 (0)