Skip to content

Commit 13bf2a4

Browse files
committed
initial build of docs
1 parent 75c5787 commit 13bf2a4

File tree

10 files changed

+61
-89
lines changed

10 files changed

+61
-89
lines changed

.github/workflows/code.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/docs.yml renamed to .github/workflows/org_docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
3737
with:
3838
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
# deploy to the organization github.io
40+
external_repository: ${{ github.repository_owner }}
3941
publish_dir: .github/pages
4042
keep_files: true
4143

@@ -64,6 +66,8 @@ jobs:
6466
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
6567
with:
6668
github_token: ${{ secrets.GITHUB_TOKEN }}
69+
# deploy to the organization github.io
70+
external_repository: ${{ github.repository_owner }}
6771
publish_dir: build/html
6872
keep_files: true
6973

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
sys.path.insert(0, os.path.abspath(os.path.join(__file__, "..", "..")))
1616

17+
import k8s_epics_docs # noqa
1718

1819
# -- General configuration ------------------------------------------------
1920

docs/explanations/strategy.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Kubernetes for EPICS IOCs strategy
2+
==================================
3+
4+
Todo
5+

docs/explanations/why-is-something-so.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/index.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ About the documentation
5151
:name: how-to
5252
:maxdepth: 1
5353

54-
how-to/accomplish-a-task
54+
how-to/setup_k8s
55+
how-to/manage_iocs
5556

5657
.. toctree::
5758
:caption: Explanations
5859
:name: explanations
5960
:maxdepth: 1
6061

61-
explanations/why-is-something-so
62+
explanations/strategy
6263

6364
.. rst-class:: no-margin-after-ul
6465

@@ -67,7 +68,7 @@ About the documentation
6768
:name: reference
6869
:maxdepth: 1
6970

70-
reference/api
71+
reference/cli
7172
reference/contributing
7273

7374
* :ref:`genindex`

docs/reference/cli.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _CLI:
22

3-
CLI
4-
===
3+
Command Line Interface for IOC Management
4+
=========================================
55

66
The Module k8s-epics-utils provides scripts that simplify common operations
77
for deploying and managing IOCs with Kubernetes.

docs/tutorials/installation.rst

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Installation Tutorial
22
=====================
33

4+
Intro
5+
----------------------------
6+
This project is documentation only but if you want to update the
7+
documentation and build it then follow these instructions
8+
9+
410
Check your version of python
511
----------------------------
612

@@ -9,29 +15,15 @@ typing into a terminal::
915

1016
python3 --version
1117

12-
Create a virtual environment
13-
----------------------------
14-
15-
It is recommended that you install into a “virtual environment” so this
16-
installation will not interfere with any existing Python software::
17-
18-
python3 -m venv /path/to/venv
19-
source /path/to/venv/bin/activate
20-
21-
22-
Installing the library
23-
----------------------
24-
25-
You can now use ``pip`` to install the library::
18+
Use Pipenv to install developer tools
19+
-------------------------------------
2620

27-
python3 -m pip install k8s_epics_docs
21+
Install pipenv if you do not already have it https://pypi.org/project/pipenv/
2822

29-
If you require a feature that is not currently released you can also install
30-
from github::
23+
pipenv install --dev
3124

32-
python3 -m pip install git+git://github.com/epics-containers/k8s-epics-docs.git
3325

34-
The library should now be installed and the commandline interface on your path.
35-
You can check the version that has been installed by typing::
26+
Building the documentation with sphinx
27+
--------------------------------------
3628

37-
k8s_epics_docs --version
29+
pipenv run docs

setup.cfg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,28 @@ include_package_data = False
2929
# Don't include our tests directory in the distribution
3030
exclude = tests
3131

32+
[options.entry_points]
33+
# Include a command line script
34+
console_scripts =
35+
k8s_epics_docs = k8s_epics_docs.cli:main
36+
37+
[mypy]
38+
# Ignore missing stubs for modules we use
39+
ignore_missing_imports = True
40+
41+
[isort]
42+
profile=black
43+
float_to_top=true
44+
skip=setup.py,conf.py,build
45+
46+
[flake8]
47+
# Make flake8 respect black's line length (default 88),
48+
max-line-length = 88
49+
extend-ignore =
50+
E203, # See https://github.com/PyCQA/pycodestyle/issues/373
51+
F811, # support typing.overload decorator
52+
F722, # allow Annotated[typ, some_func("some string")]
53+
3254
[tool:pytest]
3355
# Run pytest with all our checkers, and don't spam us with massive tracebacks on error
3456
addopts =

tests/test_boilerplate_removed.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
import pytest
88

99

10+
@pytest.fixture
11+
def setupcfg():
12+
import configparser
13+
14+
conf = configparser.ConfigParser()
15+
conf.read("setup.cfg")
16+
17+
return conf["metadata"]
18+
19+
1020
def assert_not_contains_text(path, text, explanation):
1121
with open(path, "r") as f:
1222
contents = f.read().replace("\n", " ")

0 commit comments

Comments
 (0)