Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation #33

Merged
merged 33 commits into from
Oct 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d33f6dc
Add darglint in dev dependencies
oncleben31 Aug 10, 2020
991cea0
Add darglint check in nox pre-commit session
oncleben31 Aug 10, 2020
1d6ba09
Add darglint configuration file
oncleben31 Aug 10, 2020
96704b0
Update python module top docstrings
oncleben31 Aug 10, 2020
5678a8d
Rewrite client docstrings with the Google style
oncleben31 Aug 12, 2020
c68566e
Rewrite helpers docstrings with Google style
oncleben31 Aug 14, 2020
d1c4243
use the term metropolitan France
oncleben31 Oct 3, 2020
fe4175a
Rewrite session docstrings with the Google doc style
oncleben31 Oct 3, 2020
757d6d3
Rewrite forecast model docstrings
oncleben31 Oct 3, 2020
0b4b369
Rewrite picture of day model docstrings
oncleben31 Oct 3, 2020
011faed
Rewrite place model doctstrings
oncleben31 Oct 3, 2020
1477498
Add missing type information for __init__ methods
oncleben31 Oct 3, 2020
f25f71d
Rewrite rain model doctstrings
oncleben31 Oct 3, 2020
8f150e6
Rewrite warning model docstrings
oncleben31 Oct 3, 2020
9794427
Add docstrings for __init__ methods
oncleben31 Oct 3, 2020
60ece91
Add sphinx to dev dependencies
oncleben31 Oct 3, 2020
143d00e
Init sphinx configuration
oncleben31 Oct 3, 2020
d12530e
Add nox session to generate docs
oncleben31 Oct 3, 2020
b64d27e
Add sphinx-autobuild to dev dependencies
oncleben31 Oct 3, 2020
f3a1144
Update sphinx configuration
oncleben31 Oct 3, 2020
9607bde
Convert LICENSE in reST
oncleben31 Oct 4, 2020
3572a60
Convert README to reST
oncleben31 Oct 4, 2020
6431648
update README reference in Poetry project
oncleben31 Oct 4, 2020
40d782e
Convert CONTRIBUTING to reST
oncleben31 Oct 4, 2020
e7dc761
Add sphinx documentation
oncleben31 Oct 4, 2020
94810cc
Add docs-build in Nox defaults sessions
oncleben31 Oct 4, 2020
800483a
Update README anchors and links
oncleben31 Oct 5, 2020
5bc90ac
Update CONTRIBUTING anchors and links
oncleben31 Oct 5, 2020
f771ae1
Apply suggestions from code review
oncleben31 Oct 11, 2020
1bdd4d6
Implement fix from code review
oncleben31 Oct 11, 2020
34e593c
Fix code style by Black
oncleben31 Oct 11, 2020
4817c55
Refresh poetry.lock
oncleben31 Oct 11, 2020
a72f6b3
Code style modification by Black
oncleben31 Oct 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .darglint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[darglint]
strictness = short
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
select = B,B9,C,D,E,F,N,S,W
select = B,B9,C,D,DAR,E,F,N,S,W
max-complexity = 10
docstring-convention = google
exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build,.eggs
Expand Down
117 changes: 0 additions & 117 deletions CONTRIBUTING.md

This file was deleted.

158 changes: 158 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
Contribuer | Contributing
=========================

You will find instructions in English in the section `Contributing`_.

Vous trouverez les instructions en français dans la section `Contribuer`_.

Contribuer
----------

Vous êtes tous invités à contribuer à ce projet pour le maintenir ou l'améliorer.
Même si vous n'êtes pas un développeur, vous pouvez sûrement donner un coup de
main en remontant les bugs constatés, en partageant vos idées d'amélioration ou
en participant à la documentation.

Préparer votre environement de développement
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Vous aurez besoin de Python 3.6+ et des outils suivants:

- Poetry_
- Nox_

Installez le package avec les dépendances de développement:

.. code:: console

$ poetry install

Vous pouvez maintenant utiliser une session interactive Python:

.. code:: console

$ poetry run python

Je vous recommande d'installer un pre-commit-hook pour lancer automatiquement quelques
vérfication avant de commit vos modifications.

.. code:: console

$ nox -s pre-commit -- install

Tester le projet
^^^^^^^^^^^^^^^^

Dérouler la suite de tests complète:

.. code:: console

$ nox

Lister toutes les sessions disponibles dans Nox:

.. code:: console

$ nox --list-sessions

Vous pouvez lancer une session Nox spécifique. Par exemple, lancez la suite de
tests unitaires avec:

.. code:: console

$ nox --session=tests

Les tests unitaires sont dans le répertoire `tests` et utilisent le framework pytest.

Soumettre votre Pull Request (PR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ouvrez une `pull request`_ pour proposer des changements à ce projet.

Votre pull request doit vérifier les conditions suivantes pour être acceptée:

* La suite de tests Nox doit réussir sans erreurs ni warning.
* Doit inclure des tests unitaires. Ce projet maintien une couverture de code à 100%.

Proposer une nouvelle fonctionnalité
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Pour proposer vos idées d'amélioration, ouvrez une `issue <https://github.com/hacf-fr/meteofrance-api/issues>`_
en utilisant le modèle ``feature request``.

Contributing
------------

You are all invited to contribute to this project for maintenance or improvement.
Even if you are not a developer, you can help to report some bugs, share
improvements ideas, or contribute to the documentation.

How to set up your development environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You need Python 3.6+ and the following tools:

- Poetry_
- Nox_

Install the package with development requirements:

.. code:: console

$ poetry install

You can now run an interactive Python session, or the command-line interface:

.. code:: console

$ poetry run python

I recommand to install a pre-commit-hook to have some checks done automatically before you commit your changes.

.. code:: console

$ nox -s pre-commit -- install

How to test the project
^^^^^^^^^^^^^^^^^^^^^^^

Run the full test suite:

.. code:: console

$ nox

List the available Nox sessions:

.. code:: console

$ nox --list-sessions

You can also run a specific Nox session. For example, invoke the unit test suite like this:

.. code:: console

$ nox --session=tests

Unit tests are located in the tests directory, and are written using the pytest testing framework.

How to submit changes
^^^^^^^^^^^^^^^^^^^^^

Open a `pull request`_ to submit
changes to this project.

Your pull request needs to meet the following guidelines for acceptance:

- The Nox test suite must pass without errors and warnings.
- Include unit tests. This project maintains 100% code coverage.

Feature suggestion
^^^^^^^^^^^^^^^^^^

If you want to suggest a new feature for this project, please open an `issue <https://github.com/hacf-fr/meteofrance-api/issues>`_
by using the `feature request` template.

.. _Poetry: https://python-poetry.org/
.. _Nox: https://nox.thea.codes/
.. _pull request: https://github.com/hacf-fr/meteofrance-api/pulls
15 changes: 8 additions & 7 deletions LICENSE → LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
MIT License
===========

Copyright (c) 2020 HACF Home Assistant Communauté Francophone

Expand All @@ -12,10 +13,10 @@ furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
**The software is provided "as is", without warranty of any kind, express or
implied, including but not limited to the warranties of merchantability,
fitness for a particular purpose and noninfringement. In no event shall the
authors or copyright holders be liable for any claim, damages or other
liability, whether in an action of contract, tort or otherwise, arising from,
out of or in connection with the software or the use or other dealings in the
software.**
88 changes: 0 additions & 88 deletions README.md

This file was deleted.

Loading