From 2ea657ae3d1114e9ad89411ca78dfcfdeee78c45 Mon Sep 17 00:00:00 2001 From: benne238 Date: Thu, 17 Dec 2020 17:21:03 -0500 Subject: [PATCH] mkdocs initialization --- api/ECNQueue.py | 10 ++-- api/documentation/docs/api.md | 11 ++++ api/documentation/docs/hellothere.md | 3 ++ api/documentation/docs/index.md | 17 ++++++ api/documentation/docs/readme.md | 53 +++++++++++++++++++ api/documentation/mkdocs.yml | 9 ++++ api/setup.py | 5 ++ api/webqueueapi.egg-info/PKG-INFO | 10 ++++ api/webqueueapi.egg-info/SOURCES.txt | 6 +++ api/webqueueapi.egg-info/dependency_links.txt | 1 + api/webqueueapi.egg-info/top_level.txt | 2 + 11 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 api/documentation/docs/api.md create mode 100644 api/documentation/docs/hellothere.md create mode 100644 api/documentation/docs/index.md create mode 100644 api/documentation/docs/readme.md create mode 100644 api/documentation/mkdocs.yml create mode 100644 api/setup.py create mode 100644 api/webqueueapi.egg-info/PKG-INFO create mode 100644 api/webqueueapi.egg-info/SOURCES.txt create mode 100644 api/webqueueapi.egg-info/dependency_links.txt create mode 100644 api/webqueueapi.egg-info/top_level.txt diff --git a/api/ECNQueue.py b/api/ECNQueue.py index 2cfcf98..b4eaa12 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -85,11 +85,13 @@ def isValidItemName(name: str) -> bool: class Item: """A single issue. - Example: - # Create an Item (ce100) - >>> item = Item("ce", 100) + ### Example: + **Create an Item (ce100)** + ``` + >>> item = Item("ce", 100) + ``` - Attributes: + **Attributes:** lastUpdated: An ISO 8601 formatted time string showing the last time the file was updated according to the filesystem. headers: A list of dictionaries containing header keys and values. content: A list of section dictionaries. diff --git a/api/documentation/docs/api.md b/api/documentation/docs/api.md new file mode 100644 index 0000000..6201166 --- /dev/null +++ b/api/documentation/docs/api.md @@ -0,0 +1,11 @@ +# API documentation + +## Item Class + +::: ECNQueue.Item + :docstring: + +## Item functions + +::: ECNQueue.Item + :members: diff --git a/api/documentation/docs/hellothere.md b/api/documentation/docs/hellothere.md new file mode 100644 index 0000000..7551dc4 --- /dev/null +++ b/api/documentation/docs/hellothere.md @@ -0,0 +1,3 @@ +# Hello there + +ahh general kenobi \ No newline at end of file diff --git a/api/documentation/docs/index.md b/api/documentation/docs/index.md new file mode 100644 index 0000000..000ea34 --- /dev/null +++ b/api/documentation/docs/index.md @@ -0,0 +1,17 @@ +# Welcome to MkDocs + +For full documentation visit [mkdocs.org](https://www.mkdocs.org). + +## Commands + +* `mkdocs new [dir-name]` - Create a new project. +* `mkdocs serve` - Start the live-reloading docs server. +* `mkdocs build` - Build the documentation site. +* `mkdocs -h` - Print help message and exit. + +## Project layout + + mkdocs.yml # The configuration file. + docs/ + index.md # The documentation homepage. + ... # Other markdown pages, images and other files. diff --git a/api/documentation/docs/readme.md b/api/documentation/docs/readme.md new file mode 100644 index 0000000..36e6205 --- /dev/null +++ b/api/documentation/docs/readme.md @@ -0,0 +1,53 @@ +## Mkdocs configuration and installation + +[Mkdocs](https://www.mkdocs.org/) is a html documentation generator which parses markdown files and outputs the contents of markdown into html. Mkautodoc is an extension of mkdocs that pulls markdown formated docstrings from python scripts without having to copy the docstrings manually. This project will make use of the mkdocs material theme. + +**Note:** *The starting directory for commands will be the `webqueue2` project directory* + +**1. Mkdocs, mkautodoc, and the mkdoc material theme can be installed directly with pip (ensure that the python virtual environment is running)** +```bash +pip install mkdocs +``` +```bash +pip install mkautodoc +``` +```bash +pip install mkdocs-material +``` +**2. Mkdocs needs a directory to contain all of the documentation related files and subdirectories, to do that:** +```bash +cd api +``` +This next command will create several things: +* a directory called documentation with a subdirectory called docs +* a `mkdocs.yml` file located within the newly created documentation directory +* an `index.md` file located within the newly created docs directory +```bash +mkdocs new documentation +``` +**Output:** +```bash +$ mkdocs new docstwo +INFO - Creating project directory: documentation +INFO - Writing config file: documentation/mkdocs.yml +INFO - Writing initial docs: docuentation/docs/index.md +``` +**3. Edit the `mkdocs.yml` file** +```bash +nano documentation/mkdocs.yml +``` +*mkdocs.yml* +```yml +site_name: My Docs + +markdown_extensions: + - admonition + - codehilite + - mkautodoc + +theme: + name: material +``` +Change the `site_name` from `My Docs` to something more appropriate but append all the other lines from above as is. + +This file is used for a number of different configurations which change the output format of the html files produced my mkdocs, a list of all the flags can be found [here](https://www.mkdocs.org/user-guide/configuration/) diff --git a/api/documentation/mkdocs.yml b/api/documentation/mkdocs.yml new file mode 100644 index 0000000..0923251 --- /dev/null +++ b/api/documentation/mkdocs.yml @@ -0,0 +1,9 @@ +site_name: WebQueue2 + +markdown_extensions: + - admonition + - codehilite + - mkautodoc + +theme: + name: material diff --git a/api/setup.py b/api/setup.py new file mode 100644 index 0000000..bde3ef7 --- /dev/null +++ b/api/setup.py @@ -0,0 +1,5 @@ +from distutils.core import setup +setup(name='webqueueapi', + version='1.0', + py_modules=['api', 'ECNqueue'], + ) \ No newline at end of file diff --git a/api/webqueueapi.egg-info/PKG-INFO b/api/webqueueapi.egg-info/PKG-INFO new file mode 100644 index 0000000..d92f4ac --- /dev/null +++ b/api/webqueueapi.egg-info/PKG-INFO @@ -0,0 +1,10 @@ +Metadata-Version: 1.0 +Name: webqueueapi +Version: 1.0 +Summary: UNKNOWN +Home-page: UNKNOWN +Author: UNKNOWN +Author-email: UNKNOWN +License: UNKNOWN +Description: UNKNOWN +Platform: UNKNOWN diff --git a/api/webqueueapi.egg-info/SOURCES.txt b/api/webqueueapi.egg-info/SOURCES.txt new file mode 100644 index 0000000..2f0f7ee --- /dev/null +++ b/api/webqueueapi.egg-info/SOURCES.txt @@ -0,0 +1,6 @@ +api.py +setup.py +webqueueapi.egg-info/PKG-INFO +webqueueapi.egg-info/SOURCES.txt +webqueueapi.egg-info/dependency_links.txt +webqueueapi.egg-info/top_level.txt \ No newline at end of file diff --git a/api/webqueueapi.egg-info/dependency_links.txt b/api/webqueueapi.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/api/webqueueapi.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/api/webqueueapi.egg-info/top_level.txt b/api/webqueueapi.egg-info/top_level.txt new file mode 100644 index 0000000..7cc9ebf --- /dev/null +++ b/api/webqueueapi.egg-info/top_level.txt @@ -0,0 +1,2 @@ +ECNqueue +api