Commit bc7964c5a94bca66dbaa8ff4a3e3982b1f7c375a
1 parent
f9f61c77
Exists in
master
and in
4 other branches
Documentation sphink skeleton
Showing
9 changed files
with
192 additions
and
28 deletions
Show diff stats
.gitignore
INSTALL.md
1 | -make venv && source activate && pip -r requi.. | |
2 | -picharm requirement | |
3 | -run with pycharm | |
4 | -run with apache+wsgi | |
5 | -run with nginx+uwsgi | |
6 | -run through docker | |
7 | -install standalone on your own server | |
8 | -update your server installation | |
9 | -ress/flaskenv > .flaskenv | |
10 | -run tests | |
11 | -PYTHONPATH=. pytest --cov=app --cov-report=xml:"coverage.xml" --cov-report=term --junitxml "tests-report.xml" | |
12 | - | |
13 | -install | |
14 | -------- | |
15 | - | |
16 | -make working dir: | |
1 | +# install | |
2 | + | |
3 | +## make working dir: | |
17 | 4 | |
18 | 5 | mkdir /path/to/working-directory |
19 | 6 | git --work-tree=/path/to/working-directory --git-dir=/path/to/the/repo.git checkout -f master |
20 | 7 | |
21 | -set environment | |
8 | +## set environment | |
22 | 9 | |
23 | 10 | python3 -m venv venv |
24 | 11 | source venv/bin/activate |
... | ... | @@ -26,8 +13,7 @@ set environment |
26 | 13 | cp resources/pdc_config.py . |
27 | 14 | $(EDITOR) pdc_config.py |
28 | 15 | |
29 | -git autodeploy | |
30 | --------------- | |
16 | +## git autodeploy | |
31 | 17 | |
32 | 18 | # make bare repo |
33 | 19 | git clone --bare /path/to/the/repo.git |
... | ... | @@ -37,18 +23,31 @@ git autodeploy |
37 | 23 | |
38 | 24 | git push to repo |
39 | 25 | |
40 | -configure apache | |
41 | ----------------- | |
26 | +## configure apache | |
42 | 27 | |
43 | 28 | cp ./resources/apache2-virtual-host.conf /etc/apache2/sites-available/pdc-web.conf |
44 | 29 | $(EDITOR) /etc/apache2/sites-available/pdc-web.conf # set parameters |
45 | 30 | $(EDITOR) /etc/hosts # to add your hostname if local install |
46 | 31 | apachectl restart |
47 | 32 | |
48 | -virtual-apage.conf | |
49 | -pdc_web.py | |
50 | -pdc_web.wsgi | |
51 | -.flaskenv | |
52 | -post-deploy.sh | |
53 | -git-hook | |
54 | -git bare repo | |
33 | +## To Include in install procedures | |
34 | + | |
35 | +- virtual-apage.conf | |
36 | +- pdc_web.py | |
37 | +- pdc_web.wsgi | |
38 | +- .flaskenv | |
39 | +- post-deploy.sh | |
40 | +- git-hook | |
41 | +- git bare repo | |
42 | +- make venv && source activate && pip -r requi.. | |
43 | +- picharm requirement | |
44 | +- run with pycharm | |
45 | +- run with apache+wsgi | |
46 | +- run with nginx+uwsgi | |
47 | +- run through docker | |
48 | +- install standalone on your own server | |
49 | +- update your server installation | |
50 | +- ress/flaskenv > .flaskenv | |
51 | +- run tests | |
52 | +- PYTHONPATH=. pytest --cov=app --cov-report=xml:"coverage.xml" --cov-report=term --junitxml "tests-report.xml" | |
53 | + | ... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +# Minimal makefile for Sphinx documentation | |
2 | +# | |
3 | + | |
4 | +# You can set these variables from the command line, and also | |
5 | +# from the environment for the first two. | |
6 | +SPHINXOPTS ?= | |
7 | +SPHINXBUILD ?= sphinx-build | |
8 | +SOURCEDIR = . | |
9 | +BUILDDIR = _build | |
10 | + | |
11 | +# Put it first so that "make" without argument is like "make help". | |
12 | +help: | |
13 | + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | |
14 | + | |
15 | +.PHONY: help Makefile | |
16 | + | |
17 | +# Catch-all target: route all unknown targets to Sphinx using the new | |
18 | +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | |
19 | +%: Makefile | |
20 | + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ... | ... |
... | ... | @@ -0,0 +1,16 @@ |
1 | +# Documentation PlanDeCharge | |
2 | + | |
3 | +Ce répertoire héberge les source de la documentation sphinx du projet et les fichier pour la construire. | |
4 | + | |
5 | +## Prérequis | |
6 | + | |
7 | + sudo apt-get install latexmk texlive-latex-extra # (pour les outils latexpdf ) | |
8 | + source ../venv/bin/activate | |
9 | + pip install -r ../requirements-docs.txt | |
10 | + | |
11 | + | |
12 | +## Générer la documentation | |
13 | + | |
14 | + | |
15 | + # construire la documentation dans _build/latex/plandecharge.pdf | |
16 | + make latexpdf | ... | ... |
... | ... | @@ -0,0 +1,76 @@ |
1 | +# Configuration file for the Sphinx documentation builder. | |
2 | +# | |
3 | +# This file only contains a selection of the most common options. For a full | |
4 | +# list see the documentation: | |
5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html | |
6 | + | |
7 | +# -- Path setup -------------------------------------------------------------- | |
8 | + | |
9 | +# If extensions (or modules to document with autodoc) are in another directory, | |
10 | +# add these directories to sys.path here. If the directory is relative to the | |
11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. | |
12 | +# | |
13 | +# import os | |
14 | +# import sys | |
15 | +# sys.path.insert(0, os.path.abspath('.')) | |
16 | + | |
17 | + | |
18 | +#20210216 rhi: allow md parsing and autostructify | |
19 | +import recommonmark | |
20 | +from recommonmark.parser import CommonMarkParser | |
21 | + | |
22 | + | |
23 | +# -- Project information ----------------------------------------------------- | |
24 | + | |
25 | +project = 'Plan de Charge' | |
26 | +copyright = '2021, Richard Hitier' | |
27 | +author = 'Richard Hitier' | |
28 | + | |
29 | +# The full version, including alpha/beta/rc tags | |
30 | +release = '0.1' | |
31 | + | |
32 | + | |
33 | +# -- General configuration --------------------------------------------------- | |
34 | + | |
35 | +# Add any Sphinx extension module names here, as strings. They can be | |
36 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | |
37 | +# ones. | |
38 | +#$extensions = ['sphinx.ext.autodoc'] | |
39 | +extensions = ['recommonmark'] | |
40 | + | |
41 | + | |
42 | + | |
43 | +#20210216 rhi: addings for markdown inclusion support | |
44 | +source_suffix = ['.rst', '.md'] | |
45 | +source_parsers = { | |
46 | + '.md': CommonMarkParser, | |
47 | + } | |
48 | + | |
49 | +# Add any paths that contain templates here, relative to this directory. | |
50 | +templates_path = ['_templates'] | |
51 | + | |
52 | +# The language for content autogenerated by Sphinx. Refer to documentation | |
53 | +# for a list of supported languages. | |
54 | +# | |
55 | +# This is also used if you do content translation via gettext catalogs. | |
56 | +# Usually you set "language" from the command line for these cases. | |
57 | +language = 'fr' | |
58 | + | |
59 | +# List of patterns, relative to source directory, that match files and | |
60 | +# directories to ignore when looking for source files. | |
61 | +# This pattern also affects html_static_path and html_extra_path. | |
62 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | |
63 | + | |
64 | + | |
65 | +# -- Options for HTML output ------------------------------------------------- | |
66 | + | |
67 | +# The theme to use for HTML and HTML Help pages. See the documentation for | |
68 | +# a list of builtin themes. | |
69 | +# | |
70 | +html_theme = 'alabaster' | |
71 | + | |
72 | +# Add any paths that contain custom static files (such as style sheets) here, | |
73 | +# relative to this directory. They are copied after the builtin static files, | |
74 | +# so a file named "default.css" will overwrite the builtin "default.css". | |
75 | +html_static_path = ['_static'] | |
76 | + | ... | ... |
... | ... | @@ -0,0 +1,27 @@ |
1 | +.. Plan de Charge documentation master file, created by | |
2 | + sphinx-quickstart on Tue Feb 16 15:07:36 2021. | |
3 | + You can adapt this file completely to your liking, but it should at least | |
4 | + contain the root `toctree` directive. | |
5 | + | |
6 | +Bienvenue dans la documentation Plan de Charge | |
7 | +============================================== | |
8 | + | |
9 | +Contents: | |
10 | + | |
11 | +.. toctree:: | |
12 | + :maxdepth: 2 | |
13 | + :caption: Contents: | |
14 | + | |
15 | + installation | |
16 | + | |
17 | + glossary | |
18 | + | |
19 | + | |
20 | + | |
21 | +Indices and tables | |
22 | +================== | |
23 | + | |
24 | +* :ref:`genindex` | |
25 | +* :ref:`modindex` | |
26 | +* :ref:`search` | |
27 | +* :ref:`glossary` | ... | ... |