mirror of
https://github.com/godotengine/godot-contributing-docs.git
synced 2025-12-31 05:48:13 +03:00
Adjust and simplify template.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -154,3 +154,6 @@ dmypy.json
|
||||
cython_debug/
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
|
||||
|
||||
# IDEs
|
||||
.idea/
|
||||
|
||||
@@ -7,7 +7,7 @@ build:
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
- requirements: requirements.txt
|
||||
|
||||
sphinx:
|
||||
configuration: docs/source/conf.py
|
||||
configuration: conf.py
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = source
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
19
README.md
Normal file
19
README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Godot Engine Contributing documentation
|
||||
|
||||
WIP Repository
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install
|
||||
```
|
||||
|
||||
## Serve
|
||||
|
||||
```bash
|
||||
make html
|
||||
cd build/html
|
||||
python -m http.server
|
||||
```
|
||||
@@ -1,9 +0,0 @@
|
||||
Template for the Read the Docs tutorial
|
||||
=======================================
|
||||
|
||||
This GitHub template includes fictional Python library
|
||||
with some basic Sphinx docs.
|
||||
|
||||
Read the tutorial here:
|
||||
|
||||
https://docs.readthedocs.io/en/stable/tutorial/
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
# -- Project information
|
||||
|
||||
project = 'Lumache'
|
||||
copyright = '2021, Graziella'
|
||||
author = 'Graziella'
|
||||
project = 'Godot Contributing Docs'
|
||||
copyright = '2025, Godot Engine Contributors'
|
||||
author = 'Godot Engine Contributors'
|
||||
|
||||
release = '0.1'
|
||||
version = '0.1.0'
|
||||
@@ -1,7 +0,0 @@
|
||||
API
|
||||
===
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
|
||||
lumache
|
||||
@@ -1,22 +0,0 @@
|
||||
Welcome to Lumache's documentation!
|
||||
===================================
|
||||
|
||||
**Lumache** (/lu'make/) is a Python library for cooks and food lovers
|
||||
that creates recipes mixing random ingredients.
|
||||
It pulls data from the `Open Food Facts database <https://world.openfoodfacts.org/>`_
|
||||
and offers a *simple* and *intuitive* API.
|
||||
|
||||
Check out the :doc:`usage` section for further information, including
|
||||
how to :ref:`installation` the project.
|
||||
|
||||
.. note::
|
||||
|
||||
This project is under active development.
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
.. toctree::
|
||||
|
||||
usage
|
||||
api
|
||||
@@ -1,34 +0,0 @@
|
||||
Usage
|
||||
=====
|
||||
|
||||
.. _installation:
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
To use Lumache, first install it using pip:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
(.venv) $ pip install lumache
|
||||
|
||||
Creating recipes
|
||||
----------------
|
||||
|
||||
To retrieve a list of random ingredients,
|
||||
you can use the ``lumache.get_random_ingredients()`` function:
|
||||
|
||||
.. autofunction:: lumache.get_random_ingredients
|
||||
|
||||
The ``kind`` parameter should be either ``"meat"``, ``"fish"``,
|
||||
or ``"veggies"``. Otherwise, :py:func:`lumache.get_random_ingredients`
|
||||
will raise an exception.
|
||||
|
||||
.. autoexception:: lumache.InvalidKindError
|
||||
|
||||
For example:
|
||||
|
||||
>>> import lumache
|
||||
>>> lumache.get_random_ingredients()
|
||||
['shells', 'gorgonzola', 'parsley']
|
||||
|
||||
23
lumache.py
23
lumache.py
@@ -1,23 +0,0 @@
|
||||
"""
|
||||
Lumache - Python library for cooks and food lovers.
|
||||
"""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
|
||||
|
||||
class InvalidKindError(Exception):
|
||||
"""Raised if the kind is invalid."""
|
||||
pass
|
||||
|
||||
|
||||
def get_random_ingredients(kind=None):
|
||||
"""
|
||||
Return a list of random ingredients as strings.
|
||||
|
||||
:param kind: Optional "kind" of ingredients.
|
||||
:type kind: list[str] or None
|
||||
:raise lumache.InvalidKindError: If the kind is invalid.
|
||||
:return: The ingredients list.
|
||||
:rtype: list[str]
|
||||
"""
|
||||
return ["shells", "gorgonzola", "parsley"]
|
||||
@@ -7,7 +7,7 @@ REM Command file for Sphinx documentation
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set SOURCEDIR=source
|
||||
set SOURCEDIR=.
|
||||
set BUILDDIR=build
|
||||
|
||||
if "%1" == "" goto help
|
||||
@@ -3,6 +3,6 @@ requires = ["flit_core >=3.2,<4"]
|
||||
build-backend = "flit_core.buildapi"
|
||||
|
||||
[project]
|
||||
name = "lumache"
|
||||
name = "Godot Contributing Docs"
|
||||
authors = [{name = "Graziella", email = "graziella@lumache"}]
|
||||
dynamic = ["version", "description"]
|
||||
|
||||
Reference in New Issue
Block a user