Skip to content

Commit 682b90b

Browse files
committed
Docs changes from #480
1 parent 79c4ffc commit 682b90b

File tree

14 files changed

+421
-104
lines changed

14 files changed

+421
-104
lines changed

.github/workflows/CI.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- '**'
88
schedule:
99
- cron: '0 0 * * 0'
10+
workflow_dispatch:
1011
jobs:
1112
tidy:
1213
name: Enforce Tidyness
@@ -106,7 +107,7 @@ jobs:
106107
- uses: mmore500/actions-setup-docker@94429ebc8d9edb4e8c8afb2667bce1e89435f74f
107108
- run: docker build -t devosoft/empirical .
108109
- run: docker ps -a
109-
- run: sudo docker run --name empirical devosoft/empirical /bin/bash -c "set -o pipefail && cd /opt/Empirical/doc && make html coverage | ./headtail.sh && python /opt/Empirical/doc/parse_documentation_coverage.py /opt/Empirical/doc/_build/doc-coverage.json >> /opt/Empirical/doc-coverage.json"
110+
- run: sudo docker run --name empirical devosoft/empirical /bin/bash -c "set -o pipefail && cd /opt/Empirical/doc && make html coverage | ./headtail.sh && python3 /opt/Empirical/doc/parse_documentation_coverage.py /opt/Empirical/doc/_build/doc-coverage.json >> /opt/Empirical/doc-coverage.json"
110111
- run: sudo docker cp empirical:/opt/Empirical/doc-coverage.json .
111112
- uses: sylvanld/action-storage@v1
112113
if: github.ref == 'refs/heads/master'

.readthedocs.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.10"
13+
14+
15+
# Build documentation in the docs/ directory with Sphinx
16+
sphinx:
17+
configuration: doc/conf.py
18+
19+
# Optionally declare the Python requirements required to build your docs
20+
python:
21+
install:
22+
- requirements: doc/requirements.txt

.readthedocs.yml

-19
This file was deleted.

Dockerfile

+45-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Pull base image.
2-
FROM ubuntu:bionic-20210416
2+
FROM ubuntu:focal-20230412
33

44
COPY . /opt/Empirical
55

@@ -8,6 +8,7 @@ SHELL ["/bin/bash", "-c"]
88
# Prevent interactive time zone config.
99
# adapted from https://askubuntu.com/a/1013396
1010
ENV DEBIAN_FRONTEND=noninteractive
11+
ENV SPHINXBUILD="python3.10 -m sphinx"
1112

1213
RUN \
1314
echo 'Acquire::http::Timeout "60";' >> "/etc/apt/apt.conf.d/99timeout" \
@@ -31,22 +32,21 @@ RUN \
3132
&& \
3233
rm -rf /var/lib/apt/lists/* \
3334
&& \
34-
find /etc/apt -type f -name '*.list' -exec sed -i 's/\(^deb.*-backports.*\)/#\1/; s/\(^deb.*-updates.*\)/#\1/; s/\(^deb.*-proposed.*\)/#\1/; s/\(^deb.*-security.*\)/#\1/' {} + \
35-
&& \
3635
apt-get update -y \
3736
&& \
38-
apt-get install -y software-properties-common=0.96.24.32.1 \
37+
apt-get install -y software-properties-common \
3938
&& \
4039
add-apt-repository -y ppa:ubuntu-toolchain-r/test \
4140
&& \
41+
add-apt-repository -y ppa:deadsnakes/ppa \
42+
&& \
4243
apt-get update -y \
4344
&& \
4445
apt-get install --no-install-recommends --allow-downgrades -y \
45-
dpkg-dev \
46-
libc6=2.27-3ubuntu1 \
47-
libc6-dev \
48-
libc6-dbg \
4946
build-essential \
47+
dpkg-dev \
48+
g++-11 \
49+
libc6 \
5050
xvfb \
5151
x11vnc \
5252
x11-xkb-utils \
@@ -60,21 +60,14 @@ RUN \
6060
libnss3 \
6161
lsb-release \
6262
xdg-utils \
63-
g++-8=8-20180414-1ubuntu2 \
64-
gcc-8-base=8-20180414-1ubuntu2 \
65-
cpp-8=8-20180414-1ubuntu2 \
66-
gcc-8=8-20180414-1ubuntu2 \
67-
gcc-8-base=8-20180414-1ubuntu2 \
68-
libgcc-8-dev \
69-
libstdc++-8-dev \
7063
cmake \
71-
python-virtualenv \
72-
python-pip-whl \
73-
python-pip \
74-
python-setuptools \
64+
python3-distutils \
7565
python3-setuptools \
7666
python3-virtualenv \
7767
python3-pip \
68+
'python3\.10' \
69+
'python3\.10-distutils' \
70+
'python3\.10-venv' \
7871
nodejs \
7972
npm \
8073
tar \
@@ -84,7 +77,7 @@ RUN \
8477
doxygen \
8578
curl \
8679
perl \
87-
perl-base=5.26.1-6 \
80+
perl-base \
8881
git \
8982
htop \
9083
man \
@@ -162,25 +155,47 @@ ENV DISPLAY :99
162155
RUN echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/userns.conf
163156

164157
RUN \
165-
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 \
158+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 90 \
166159
&& \
167160
npm install -g n \
168161
&& \
169162
n 14.17 \
170163
&& \
164+
hash -r \
165+
&& \
171166
export python="/usr/bin/python3" \
172167
&& \
173168
npm install source-map \
174169
&& \
175170
echo "finalized set up dependency versions"
176171

177172
RUN \
178-
pip install wheel==0.30.0 \
173+
curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \
174+
&& \
175+
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \
176+
&& \
177+
pip install --upgrade --force-reinstall pip virtualenv \
178+
&& \
179+
pip3 install --upgrade --force-reinstall pip virtualenv \
180+
&& \
181+
python3.10 -m pip install --upgrade --force-reinstall pip virtualenv \
179182
&& \
180-
pip3 install wheel==0.30.0 \
183+
python3 -m pip install --upgrade --force-reinstall pip virtualenv \
184+
&& \
185+
pip install wheel==0.30.0 six==1.16.0 \
186+
&& \
187+
pip3 install wheel==0.30.0 six==1.16.0 \
188+
&& \
189+
python3.10 -m pip install wheel==0.30.0 six==1.16.0 \
190+
&& \
191+
python3 -m pip install wheel==0.30.0 six==1.16.0 \
181192
&& \
182193
pip3 install -r /opt/Empirical/doc/requirements.txt \
183194
&& \
195+
python3.10 -m pip install -r /opt/Empirical/doc/requirements.txt \
196+
&& \
197+
python3 -m pip install -r /opt/Empirical/doc/requirements.txt \
198+
&& \
184199
echo "installed documentation build requirements"
185200

186201
RUN \
@@ -190,13 +205,19 @@ RUN \
190205
&& \
191206
git submodule init \
192207
&& \
193-
git submodule update -f \
208+
echo "nameserver 8.8.8.8" > /etc/resolv.conf \
209+
&& \
210+
n=0; until [ $n -ge 3 ]; do git submodule update -f && break || ((n++)); sleep 5; done; if [ $n -eq 3 ]; then echo "Update failed after 3 attempts."; else echo "Update successful!"; fi \
194211
&& \
195212
echo "initialized submodules"
196213

197214
RUN \
198215
cd /opt/Empirical \
199216
&& \
217+
curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \
218+
&& \
219+
python3 -m pip install virtualenv \
220+
&& \
200221
make install-test-dependencies \
201222
&& \
202223
echo "installed test dependencies"

doc/conf.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33
#
44
# Empirical documentation build configuration file, created by
@@ -22,6 +22,7 @@
2222
import sphinx_rtd_theme
2323
import subprocess
2424
import sys
25+
import textwrap
2526

2627
# -- General configuration ---------------------------------------------
2728

@@ -60,7 +61,10 @@
6061
# TIP: if using the sphinx-bootstrap-theme, you need
6162
# "treeViewIsBootstrap": True,
6263
"exhaleExecutesDoxygen": True,
63-
"exhaleDoxygenStdin": "INPUT = ../include"
64+
"exhaleDoxygenStdin": textwrap.dedent("""
65+
INPUT = ../include
66+
EXCLUDE_SYMBOLS += internal __impl_* *impl *IMPL *_IMPL_* *Impl
67+
""")
6468
}
6569

6670
# Tell sphinx what the primary language being documented is.

doc/library/Evolve/evolve.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Evolution tools
2+
3+
## World
4+
5+
```{eval-rst}
6+
.. doxygenfile:: emp/Evolve/World.hpp
7+
:project: Empirical
8+
:no-link:
9+
```
10+
11+
## Systematics Manager
12+
13+
```{include} systematics.md
14+
```
15+
16+
### Systematics API
17+
18+
```{eval-rst}
19+
.. doxygenfile:: emp/Evolve/Systematics.hpp
20+
:project: Empirical
21+
:no-link:
22+
```
23+
24+
## NK
25+
26+
```{eval-rst}
27+
.. doxygenfile:: emp/Evolve/NK.hpp
28+
:project: Empirical
29+
:no-link:
30+
```
31+
32+
## Selection
33+
34+
```{eval-rst}
35+
.. doxygenfile:: emp/Evolve/World_select.hpp
36+
:project: Empirical
37+
:no-link:
38+
```

0 commit comments

Comments
 (0)