From b5227a2a8a3575ac18b4c47e792353fba8841132 Mon Sep 17 00:00:00 2001 From: TurconiAndrea Date: Sat, 8 Jan 2022 19:38:49 +0100 Subject: [PATCH] Edited docs index --- docs/conf.py | 9 +++++---- docs/index.rst | 19 +++--------------- docs/modules.rst | 9 +++++++++ docs/recipe_tagger.rst | 45 ++++++++++++++++++++++++++++++++++++++++++ docs/setup.rst | 7 +++++++ docs/tests.rst | 37 ++++++++++++++++++++++++++++++++++ 6 files changed, 106 insertions(+), 20 deletions(-) create mode 100644 docs/modules.rst create mode 100644 docs/recipe_tagger.rst create mode 100644 docs/setup.rst create mode 100644 docs/tests.rst diff --git a/docs/conf.py b/docs/conf.py index 650b6ba..d391cac 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,14 +14,15 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) +import os +import sys + +sys.path.insert(0, os.path.abspath(".")) # -- Project information ----------------------------------------------------- -project = "recipe tagger" +project = "Recipe Tagger" copyright = "2022, Andrea Turconi" author = "Andrea Turconi" diff --git a/docs/index.rst b/docs/index.rst index 199a0d4..ef9b40e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,27 +3,14 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to recipe tagger's documentation! +Recipe Tagger's documentation! ========================================= This package provides a classification, a tagging system and a water footprint calculator for ingredients and recipes. The functioning of the package is based on a dataset containing more than 700 ingredients mapped with their own class and water footprint. If a provided ingredient is not mapped into the dataset, the library search for it on wikipedia pages, into the dictionary and into NLTK Wordnet to find the best possible class. The water footprint is computed based on its ingredients. Every ingredient has a water footprint, measured in l/kg. -An ingredient could be classified in one of the following class: -- Vegetable -- Fruit -- Legume -- Meat -- Egg -- Diary -- Staple -- Condiment -- Nut -- Seafood -- Snack -- Mushroom -- Dessert -- Beverage +An ingredient could be classified in one of the following class: Vegetable, Fruit, Legume, Meat, Egg, Diary, Staple, +Condiment, Nut, Seafood, Snack, Mushroom, Dessert, Beverage. A recipe is tagged based on its ingredients class. The library also provides a function to get the class percentage of recipe ingredients. diff --git a/docs/modules.rst b/docs/modules.rst new file mode 100644 index 0000000..0885994 --- /dev/null +++ b/docs/modules.rst @@ -0,0 +1,9 @@ +food-recipe-tagger +================== + +.. toctree:: + :maxdepth: 4 + + recipe_tagger + setup + tests diff --git a/docs/recipe_tagger.rst b/docs/recipe_tagger.rst new file mode 100644 index 0000000..12a4359 --- /dev/null +++ b/docs/recipe_tagger.rst @@ -0,0 +1,45 @@ +recipe\_tagger package +====================== + +Submodules +---------- + +recipe\_tagger.foodcategory module +---------------------------------- + +.. automodule:: recipe_tagger.foodcategory + :members: + :undoc-members: + :show-inheritance: + +recipe\_tagger.recipe\_tagger module +------------------------------------ + +.. automodule:: recipe_tagger.recipe_tagger + :members: + :undoc-members: + :show-inheritance: + +recipe\_tagger.recipe\_waterfootprint module +-------------------------------------------- + +.. automodule:: recipe_tagger.recipe_waterfootprint + :members: + :undoc-members: + :show-inheritance: + +recipe\_tagger.util module +-------------------------- + +.. automodule:: recipe_tagger.util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: recipe_tagger + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/setup.rst b/docs/setup.rst new file mode 100644 index 0000000..552eb49 --- /dev/null +++ b/docs/setup.rst @@ -0,0 +1,7 @@ +setup module +============ + +.. automodule:: setup + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/tests.rst b/docs/tests.rst new file mode 100644 index 0000000..84cdecd --- /dev/null +++ b/docs/tests.rst @@ -0,0 +1,37 @@ +tests package +============= + +Submodules +---------- + +tests.test\_recipe\_tagger module +--------------------------------- + +.. automodule:: tests.test_recipe_tagger + :members: + :undoc-members: + :show-inheritance: + +tests.test\_recipe\_waterfootprint module +----------------------------------------- + +.. automodule:: tests.test_recipe_waterfootprint + :members: + :undoc-members: + :show-inheritance: + +tests.test\_util module +----------------------- + +.. automodule:: tests.test_util + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: tests + :members: + :undoc-members: + :show-inheritance: