Skip to content

Commit 9dc06d9

Browse files
authored
Merge pull request #484 from devosoft/documentation
Isolate docs changes from MABE changes in #480
2 parents fc374d2 + e1b4c29 commit 9dc06d9

File tree

678 files changed

+6075
-5056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

678 files changed

+6075
-5056
lines changed

Diff for: .github/workflows/CI.yml

+28-11
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ on:
77
- '**'
88
schedule:
99
- cron: '0 0 * * 0'
10+
workflow_dispatch:
1011
jobs:
1112
tidy:
1213
name: Enforce Tidyness
1314
runs-on: ubuntu-22.04
1415
steps:
15-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1617
with:
1718
submodules: 'recursive'
1819
- run: sudo apt-get update -qq
@@ -47,7 +48,7 @@ jobs:
4748
CXX: ${{ matrix.cxx }}
4849
TEST_SET: ${{ matrix.test-set }}
4950
steps:
50-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v3
5152
with:
5253
submodules: 'recursive'
5354
- name: Set up GCC
@@ -68,7 +69,7 @@ jobs:
6869
name: Web Tests
6970
runs-on: ubuntu-20.04
7071
steps:
71-
- uses: actions/checkout@v2
72+
- uses: actions/checkout@v3
7273
with:
7374
submodules: 'recursive'
7475
- name: Set up GCC
@@ -86,7 +87,7 @@ jobs:
8687
name: Measure Test Coverage
8788
runs-on: ubuntu-22.04
8889
steps:
89-
- uses: actions/checkout@v2
90+
- uses: actions/checkout@v3
9091
with:
9192
submodules: 'recursive'
9293
- run: sudo apt-get update -qq
@@ -138,17 +139,33 @@ jobs:
138139
# github actions requires root to access mounted volumes
139140
options: --user root
140141
steps:
141-
- uses: actions/checkout@v1
142+
- uses: actions/checkout@v3
142143
with:
143144
submodules: 'recursive'
144-
- run: |
145-
make -C doc html coverage | ./doc/headtail.sh
146-
python doc/parse_documentation_coverage.py doc/_build/doc-coverage.json >> doc-coverage.json
145+
- run: doxygen
146+
- run: cd doc && python make_md.py
147+
- run: cd doc && make html | ./headtail.sh
148+
- run: cd doc && make coverage
149+
- run: ls doc/ && ls doc/_build
150+
- run: cd doc && python parse_documentation_coverage.py _build/doc-coverage.json >> doc-coverage.json
151+
- uses: actions/upload-artifact@v2
152+
with:
153+
name: doc-coverage
154+
path: doc/doc-coverage.json
155+
deploy-documentation-coverage:
156+
name: Deploy Documentation Coverage
157+
runs-on: ubuntu-22.04
158+
if: github.ref == 'refs/heads/master'
159+
needs: test-documentation
160+
steps:
161+
- uses: actions/download-artifact@v2
162+
with:
163+
name: doc-coverage
164+
path: data
147165
- uses: sylvanld/action-storage@v1
148-
if: github.ref == 'refs/heads/master'
149166
with:
150-
src: doc-coverage.json
151-
dst: stats/doc-coverage.json
167+
src: data/doc-coverage.json
168+
dst: data/doc-coverage.json
152169
deploy-container:
153170
name: Deploy to DockerHub and ghcr.io
154171
runs-on: ubuntu-22.04

Diff for: .readthedocs.yaml

+11-9
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
# Read the Docs configuration file
33
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
44

5-
#Required
5+
# Required
66
version: 2
77

8+
# Set the version of Python and other tools you might need
89
build:
910
os: ubuntu-22.04
1011
tools:
11-
python: "3.7"
12+
python: "3.10"
13+
jobs:
14+
pre_build:
15+
- doxygen
16+
- cd doc && python make_md.py
1217

1318
# Build documentation in the docs/ directory with Sphinx
1419
sphinx:
15-
configuration: doc/conf.py
20+
configuration: doc/conf.py
1621

17-
# Optionally build your docs in additional formats such as PDF
18-
formats: []
19-
20-
# Optionally set the version of Python and requirements required to build your docs
22+
# Optionally declare the Python requirements required to build your docs
2123
python:
22-
install:
23-
- requirements: doc/requirements.txt
24+
install:
25+
- requirements: doc/requirements.txt

Diff for: Dockerfile

+42-35
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,10 @@ 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 \
75-
python3-setuptools \
76-
python3-virtualenv \
77-
python3-pip \
64+
'python3\.10' \
65+
'python3\.10-distutils' \
66+
'python3\.10-venv' \
7867
nodejs \
7968
npm \
8069
tar \
@@ -84,7 +73,7 @@ RUN \
8473
doxygen \
8574
curl \
8675
perl \
87-
perl-base=5.26.1-6 \
76+
perl-base \
8877
git \
8978
htop \
9079
man \
@@ -97,13 +86,22 @@ RUN \
9786
ssh-client \
9887
libasound2 \
9988
gpg-agent \
89+
doxygen \
10090
&& \
10191
apt-get clean \
10292
&& \
10393
rm -rf /var/lib/apt/lists/* \
10494
&& \
10595
echo "installed apt packages"
10696

97+
# Set Python 3.10 as the default version of Python 3
98+
RUN \
99+
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 \
100+
&& \
101+
update-alternatives --set python3 /usr/bin/python3.10 \
102+
&& \
103+
ln -s /usr/bin/python3.10 /usr/bin/python
104+
107105
RUN \
108106
echo $' \n\
109107
XVFB=/usr/bin/Xvfb \n\
@@ -162,24 +160,34 @@ ENV DISPLAY :99
162160
RUN echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/userns.conf
163161

164162
RUN \
165-
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 \
163+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 90 \
166164
&& \
167165
npm install -g n \
168166
&& \
169167
n 14.17 \
170168
&& \
169+
hash -r \
170+
&& \
171171
export python="/usr/bin/python3" \
172172
&& \
173173
npm install source-map \
174174
&& \
175175
echo "finalized set up dependency versions"
176176

177177
RUN \
178-
pip install wheel==0.30.0 \
178+
python3.10 --version \
179+
&& \
180+
python3 --version \
179181
&& \
180-
pip3 install wheel==0.30.0 \
182+
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \
181183
&& \
182-
pip3 install -r /opt/Empirical/doc/requirements.txt \
184+
python3.10 -m pip install --upgrade --force-reinstall pip virtualenv \
185+
&& \
186+
python3.10 -m pip install wheel==0.30.0 six==1.16.0 \
187+
&& \
188+
python3.10 -m pip install -r /opt/Empirical/third-party/requirements.txt \
189+
&& \
190+
python3.10 -m pip install -r /opt/Empirical/doc/requirements.txt \
183191
&& \
184192
echo "installed documentation build requirements"
185193

@@ -190,13 +198,19 @@ RUN \
190198
&& \
191199
git submodule init \
192200
&& \
193-
git submodule update -f \
201+
echo "nameserver 8.8.8.8" > /etc/resolv.conf \
202+
&& \
203+
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 \
194204
&& \
195205
echo "initialized submodules"
196206

197207
RUN \
198208
cd /opt/Empirical \
199209
&& \
210+
curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \
211+
&& \
212+
python3 -m pip install virtualenv \
213+
&& \
200214
make install-test-dependencies \
201215
&& \
202216
echo "installed test dependencies"
@@ -254,13 +268,6 @@ RUN \
254268
&& \
255269
echo "installed karma-firefox-launcher"
256270

257-
# @mmore500 10-2021: python3 -m pip fixes UnicodeDecodeError
258-
# when installing charset-normalizer from github
259-
RUN \
260-
python3 -m pip install -r /opt/Empirical/third-party/requirements.txt \
261-
&& \
262-
echo "installed documentation build requirements"
263-
264271
# Perform any further action as an unprivileged user.
265272
# adapted from https://stackoverflow.com/a/27703359
266273
# and https://superuser.com/a/235398

0 commit comments

Comments
 (0)