Skip to content

Commit 59f6b4e

Browse files
committed
add initial plumbing (shields, CI Pipeline and Sphinx site)
1 parent 91507b7 commit 59f6b4e

12 files changed

+588
-1
lines changed

.btd.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
input: doc
2+
output: _build
3+
requirements: requirements.txt
4+
target: gh-pages
5+
formats: [ html ]
6+
images:
7+
base: btdi/sphinx:pytooling
8+
theme: https://codeload.GitHub.com/buildthedocs/sphinx.theme/tar.gz/v1

.github/workflows/Pipeline.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Pipeline
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
jobs:
12+
13+
Params:
14+
uses: pyTooling/Actions/.github/workflows/Parameters.yml@r0
15+
with:
16+
name: pyEDAA.Launcher
17+
18+
BuildTheDocs:
19+
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@r0
20+
needs:
21+
- Params
22+
with:
23+
artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.doc }}
24+
25+
PublishToGitHubPages:
26+
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@r0
27+
needs:
28+
- Params
29+
- BuildTheDocs
30+
with:
31+
doc: ${{ fromJson(needs.Params.outputs.params).artifacts.doc }}
32+
33+
ArtifactCleanUp:
34+
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r0
35+
needs:
36+
- Params
37+
- BuildTheDocs
38+
- PublishToGitHubPages
39+
with:
40+
package: ${{ fromJson(needs.Params.outputs.params).artifacts.package }}
41+
remaining: |
42+
${{ fromJson(needs.Params.outputs.params).artifacts.doc }}

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Python cache and object files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# Sphinx documentation
6+
doc/_build
7+
doc/_theme
8+
9+
# PyCharm project
10+
/.idea/workspace.xml
11+
12+
# VSCode settings
13+
/.vscode

README.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1-
# pyEDAA.Launcher
1+
<p align="center">
2+
<a title="edaa-org.github.io/pyEDAA.Launcher" href="https://edaa-org.github.io/pyEDAA.Launcher"><img height="80px" src="doc/_static/logo.svg"/></a>
3+
</p>
4+
5+
[![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-Launcher-ffca28.svg?longCache=true&style=flat-square&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.Launcher)
6+
[![Documentation](https://img.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpyEDAA.Launcher&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.Launcher%2Findex.html)](https://edaa-org.github.io/pyEDAA.Launcher/)
7+
[![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)
8+
[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/workflow/status/edaa-org/pyEDAA.Launcher/Pipeline/main?longCache=true&style=flat-square&label=Build%20and%20Test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://GitHub.com/edaa-org/pyEDAA.Launcher/actions/workflows/Pipeline.yml)
9+
10+
<!--
11+
[![Sourcecode License](https://img.shields.io/pypi/l/pyEDAA.Launcher?longCache=true&style=flat-square&logo=Apache&label=code)](LICENSE.md)
12+
[![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](LICENSE.md)
13+
14+
[![PyPI](https://img.shields.io/pypi/v/pyEDAA.Launcher?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyEDAA.Launcher/)
15+
![PyPI - Status](https://img.shields.io/pypi/status/pyEDAA.Launcher?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
16+
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.Launcher?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
17+
18+
[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pyEDAA.Launcher?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff)](https://libraries.io/github/edaa-org/pyEDAA.Launcher)
19+
[![Codacy - Quality](https://img.shields.io/codacy/grade/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=Codacy)](https://app.codacy.com/gh/edaa-org/pyEDAA.Launcher)
20+
[![Codacy - Coverage](https://img.shields.io/codacy/coverage/39d312bf98244961975559f141c3e000?longCache=true&style=flat-square&logo=Codacy)](https://app.codacy.com/gh/edaa-org/pyEDAA.Launcher)
21+
[![Codecov - Branch Coverage](https://img.shields.io/codecov/c/github/edaa-org/pyEDAA.Launcher?longCache=true&style=flat-square&logo=Codecov)](https://codecov.io/gh/edaa-org/pyEDAA.Launcher)
22+
23+
[![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/pypi/pyEDAA.Launcher?longCache=true&style=flat-square&logo=GitHub)](https://GitHub.com/edaa-org/pyEDAA.Launcher/network/dependents)
24+
[![Requires.io](https://img.shields.io/requires/github/edaa-org/pyEDAA.Launcher?longCache=true&style=flat-square)](https://requires.io/github/EDAA-ORG/pyEDAA.Launcher/requirements/?branch=main)
25+
[![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/pypi/pyEDAA.Launcher?longCache=true&style=flat-square)](https://libraries.io/github/edaa-org/pyEDAA.Launcher/sourcerank)
26+
-->
27+
28+
<p align="center">
29+
<a title="edaa-org.github.io/pyEDAA.Launcher" href="https://edaa-org.github.io/pyEDAA.Launcher"><img height="275px" src="doc/_static/work-in-progress.png"/></a>
30+
</p>

doc/Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
SPHINXOPTS =
2+
SPHINXBUILD = sphinx-build
3+
PAPER =
4+
BUILDDIR = _build
5+
6+
PAPEROPT_a4 = -D latex_paper_size=a4
7+
PAPEROPT_letter = -D latex_paper_size=letter
8+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -T -D language=en $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
9+
10+
%:
11+
$(SPHINXBUILD) -b $@ $(ALLSPHINXOPTS) $(BUILDDIR)/$@

doc/_static/favicon.svg

+65
Loading

doc/_static/logo.svg

+10
Loading

doc/_static/work-in-progress.png

28.3 KB
Loading

doc/conf.py

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# If extensions (or modules to document with autodoc) are in another directory,
2+
# add these directories to sys.path here. If the directory is relative to the
3+
# documentation root, use os.path.abspath to make it absolute, like shown here.
4+
5+
from sys import path as sys_path
6+
from os.path import abspath
7+
from pathlib import Path
8+
from json import loads
9+
10+
11+
ROOT = Path(__file__).resolve().parent
12+
13+
sys_path.insert(0, abspath('.'))
14+
sys_path.insert(0, abspath('..'))
15+
16+
17+
# ==============================================================================
18+
# Project information
19+
# ==============================================================================
20+
project = "pyEDAA.Launcher"
21+
copyright = "2021-2021 Patrick Lehmann - Boetzingen, Germany"
22+
author = "Patrick Lehmann"
23+
24+
version = "latest" # The short X.Y version.
25+
release = "latest" # The full version, including alpha/beta/rc tags.
26+
27+
28+
# ==============================================================================
29+
# Miscellaneous settings
30+
# ==============================================================================
31+
# The master toctree document.
32+
master_doc = 'index'
33+
34+
# Add any paths that contain templates here, relative to this directory.
35+
templates_path = ['_templates']
36+
37+
# List of patterns, relative to source directory, that match files and
38+
# directories to ignore when looking for source files.
39+
# This pattern also affects html_static_path and html_extra_path.
40+
exclude_patterns = [
41+
"_build",
42+
"_themes",
43+
"Thumbs.db",
44+
".DS_Store"
45+
]
46+
47+
# The name of the Pygments (syntax highlighting) style to use.
48+
pygments_style = 'stata-dark'
49+
50+
51+
# ==============================================================================
52+
# Restructured Text settings
53+
# ==============================================================================
54+
prologPath = "prolog.inc"
55+
try:
56+
with open(prologPath, "r") as prologFile:
57+
rst_prolog = prologFile.read()
58+
except Exception as ex:
59+
print("[ERROR:] While reading '{0!s}'.".format(prologPath))
60+
print(ex)
61+
rst_prolog = ""
62+
63+
64+
# ==============================================================================
65+
# Options for HTML output
66+
# ==============================================================================
67+
68+
html_context = {}
69+
ctx = ROOT / 'context.json'
70+
if ctx.is_file():
71+
html_context.update(loads(ctx.open('r').read()))
72+
73+
if (ROOT / "_theme").is_dir():
74+
html_theme_path = ["."]
75+
html_theme = "_theme"
76+
html_theme_options = {
77+
'logo_only': True,
78+
'home_breadcrumbs': False,
79+
'vcs_pageview_mode': 'blob',
80+
}
81+
else:
82+
html_theme = "alabaster"
83+
84+
# Add any paths that contain custom static files (such as style sheets) here,
85+
# relative to this directory. They are copied after the builtin static files,
86+
# so a file named "default.css" will overwrite the builtin "default.css".
87+
html_static_path = ['_static']
88+
89+
html_logo = str(Path(html_static_path[0]) / "logo.svg")
90+
html_favicon = str(Path(html_static_path[0]) / "favicon.svg")
91+
92+
# Output file base name for HTML help builder.
93+
htmlhelp_basename = 'pyEDAALauncherDoc'
94+
95+
# If not None, a 'Last updated on:' timestamp is inserted at every page
96+
# bottom, using the given strftime format.
97+
# The empty string is equivalent to '%b %d, %Y'.
98+
html_last_updated_fmt = "%d.%m.%Y"
99+
100+
101+
# ==============================================================================
102+
# Options for LaTeX / PDF output
103+
# ==============================================================================
104+
from textwrap import dedent
105+
106+
latex_elements = {
107+
# The paper size ('letterpaper' or 'a4paper').
108+
'papersize': 'a4paper',
109+
110+
# The font size ('10pt', '11pt' or '12pt').
111+
#'pointsize': '10pt',
112+
113+
# Additional stuff for the LaTeX preamble.
114+
'preamble': dedent(r"""
115+
% ================================================================================
116+
% User defined additional preamble code
117+
% ================================================================================
118+
% Add more Unicode characters for pdfLaTeX.
119+
% - Alternatively, compile with XeLaTeX or LuaLaTeX.
120+
% - https://GitHub.com/sphinx-doc/sphinx/issues/3511
121+
%
122+
\ifdefined\DeclareUnicodeCharacter
123+
\DeclareUnicodeCharacter{2265}{$\geq$}
124+
\DeclareUnicodeCharacter{21D2}{$\Rightarrow$}
125+
\fi
126+
127+
128+
% ================================================================================
129+
"""),
130+
131+
# Latex figure (float) alignment
132+
#'figure_align': 'htbp',
133+
}
134+
135+
# Grouping the document tree into LaTeX files. List of tuples
136+
# (source start file, target name, title,
137+
# author, documentclass [howto, manual, or own class]).
138+
latex_documents = [
139+
( master_doc,
140+
'pyEDAA.Launcher.tex',
141+
'The pyEDAA.Launcher Documentation',
142+
'Patrick Lehmann',
143+
'manual'
144+
),
145+
]
146+
147+
148+
# ==============================================================================
149+
# Extensions
150+
# ==============================================================================
151+
extensions = [
152+
'sphinx.ext.extlinks',
153+
'sphinx.ext.intersphinx',
154+
]
155+
156+
157+
# ==============================================================================
158+
# Sphinx.Ext.InterSphinx
159+
# ==============================================================================
160+
intersphinx_mapping = {
161+
'python': ('https://docs.python.org/3', None),
162+
}
163+
164+
165+
# ==============================================================================
166+
# Sphinx.Ext.ExtLinks
167+
# ==============================================================================
168+
extlinks = {
169+
'ghissue': ('https://GitHub.com/edaa-org/pyEDAA.Launcher/issues/%s', 'issue #'),
170+
'ghpull': ('https://GitHub.com/edaa-org/pyEDAA.Launcher/pull/%s', 'pull request #'),
171+
'ghsrc': ('https://GitHub.com/edaa-org/pyEDAA.Launcher/blob/main/%s', ''),
172+
}

0 commit comments

Comments
 (0)