dry-python / dry-python/returns

Move several examples from the docs to tests and then `literalinclude` them

Abierto
#678 2 comentarios 0 reacciones 0 asignados Ver en GitHub
documentation enhancement good first issue hacktoberfest help wanted
Lenguaje dominante
Python
Estrellas
4.4k
Forks
155
Merge medio
2 h 27 min
PR fusionados (30 d)
22

Descripción

We have several quite large examples that live in our docs:
1. https://github.com/dry-python/returns/blob/master/docs/pages/future.rst#futureresult
2. `Number` example from: https://github.com/dry-python/returns/blob/master/docs/pages/contrib/hypothesis_plugins.rst#check_all_laws
3. https://github.com/dry-python/returns/blob/master/docs/pages/context.rst#requirescontextfutureresult-container

What needs to be done?
- We need to extract these examples from docs to `tests/test_docs` folder
- Instead, we should add this:

```rst
.. literalinclude:: ../../tests/test_docs/test_${SOME_NEW_FILENAME}.py
:linenos:
```

- Provide a link to the source code on github somewhere near the example itself
- Possibly we would need to add some dev-dependencies to both `pyproject.toml` and `docs/requirements.txt`
- Make sure that it is checked by `flake8`, `mypy`, and `pytest`. And that it actually works.

This way we would have nice, complex, but working examples! 📖

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.