Adjust and simplify template.

This commit is contained in:
Lukas Tenbrink
2025-07-29 19:58:55 +02:00
parent c0085fa993
commit 05168bdd80
14 changed files with 66 additions and 137 deletions

3
.gitignore vendored
View File

@@ -154,3 +154,6 @@ dmypy.json
cython_debug/ cython_debug/
# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks # End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks
# IDEs
.idea/

View File

@@ -7,7 +7,7 @@ build:
python: python:
install: install:
- requirements: docs/requirements.txt - requirements: requirements.txt
sphinx: sphinx:
configuration: docs/source/conf.py configuration: conf.py

View File

@@ -5,7 +5,7 @@
# from the environment for the first two. # from the environment for the first two.
SPHINXOPTS ?= SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build SPHINXBUILD ?= sphinx-build
SOURCEDIR = source SOURCEDIR = .
BUILDDIR = build BUILDDIR = build
# Put it first so that "make" without argument is like "make help". # Put it first so that "make" without argument is like "make help".

19
README.md Normal file
View 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
```

View File

@@ -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/

View File

@@ -2,9 +2,9 @@
# -- Project information # -- Project information
project = 'Lumache' project = 'Godot Contributing Docs'
copyright = '2021, Graziella' copyright = '2025, Godot Engine Contributors'
author = 'Graziella' author = 'Godot Engine Contributors'
release = '0.1' release = '0.1'
version = '0.1.0' version = '0.1.0'

View File

@@ -1,7 +0,0 @@
API
===
.. autosummary::
:toctree: generated
lumache

View File

@@ -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

View File

@@ -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']

2
index.rst Normal file
View File

@@ -0,0 +1,2 @@
WIP
===

View File

@@ -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"]

View File

@@ -1,35 +1,35 @@
@ECHO OFF @ECHO OFF
pushd %~dp0 pushd %~dp0
REM Command file for Sphinx documentation REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" ( if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build set SPHINXBUILD=sphinx-build
) )
set SOURCEDIR=source set SOURCEDIR=.
set BUILDDIR=build set BUILDDIR=build
if "%1" == "" goto help if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL %SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 ( if errorlevel 9009 (
echo. echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH. echo.may add the Sphinx directory to PATH.
echo. echo.
echo.If you don't have Sphinx installed, grab it from echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/ echo.http://sphinx-doc.org/
exit /b 1 exit /b 1
) )
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end goto end
:help :help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end :end
popd popd

View File

@@ -3,6 +3,6 @@ requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi" build-backend = "flit_core.buildapi"
[project] [project]
name = "lumache" name = "Godot Contributing Docs"
authors = [{name = "Graziella", email = "graziella@lumache"}] authors = [{name = "Graziella", email = "graziella@lumache"}]
dynamic = ["version", "description"] dynamic = ["version", "description"]