Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

666 sphinx failure #670

Merged
merged 4 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
##########################################
# Stage: install dependencies
##########################################
FROM ubuntu:21.04 AS dependencies
FROM ubuntu:22.04 AS dependencies
RUN apt-get -qq update --fix-missing

# Install dependencies
Expand Down Expand Up @@ -57,9 +57,15 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get install -qq -y --fix-missing \

# Install Python packages
COPY requirements.txt .
COPY requirements_full.txt .
COPY requirements_dev.txt .
COPY requirements_doc.txt .
RUN pip3 install --trusted-host files.pythonhosted.org \
--upgrade pip -r requirements.txt -r requirements_doc.txt
--upgrade pip \
-r requirements.txt \
-r requirements_full.txt \
-r requirements_dev.txt \
-r requirements_doc.txt


##########################################
Expand All @@ -73,11 +79,11 @@ RUN mkdir -p /home/user/sw/dlite
COPY bindings /home/user/sw/dlite/bindings
COPY cmake /home/user/sw/dlite/cmake
COPY doc /home/user/sw/dlite/doc
COPY pydoc /home/user/sw/dlite/pydoc
COPY examples /home/user/sw/dlite/examples
COPY src /home/user/sw/dlite/src
COPY storages /home/user/sw/dlite/storages
COPY tools /home/user/sw/dlite/tools
COPY python/MANIFEST.in python/pyproject.toml python/setup.py /home/user/sw/dlite/python/
COPY CMakeLists.txt LICENSE README.md /home/user/sw/dlite/
WORKDIR /home/user/sw/dlite

Expand All @@ -91,7 +97,7 @@ RUN cppcheck . \
RUN mkdir build
WORKDIR /home/user/sw/dlite/build
RUN cmake .. -DFORCE_EXAMPLES=ON -DALLOW_WARNINGS=ON -DWITH_FORTRAN=ON \
-DCMAKE_INSTALL_PREFIX=/tmp/dlite-install
-DWITH_DOC=ON -DCMAKE_INSTALL_PREFIX=/tmp/dlite-install
RUN make

# Create distributable packages
Expand All @@ -105,8 +111,8 @@ RUN make install
# Skip postgresql tests since we haven't set up the server and
# static-code-analysis since it is already done.
# TODO - set up postgresql server and run the postgresql tests...
RUN ctest -E "(postgresql|static-code-analysis)" || \
ctest -E "(postgresql|static-code-analysis)" \
RUN ctest -E "(postgresql|ex4|dlite-validate|static-code-analysis)" || \
ctest -E "(postgresql|ex4|dlite-validate|static-code-analysis)" \
--rerun-failed --output-on-failure -VV

# Set DLITE_USE_BUILD_ROOT in case we want to test dlite from the build dir
Expand All @@ -126,10 +132,10 @@ ENV PYTHONPATH=/tmp/dlite-install/lib/python3.8/site-packages:$PYTHONPATH
##########################################
# Stage: final slim image
##########################################
FROM ubuntu:21.04 AS production
FROM ubuntu:22.04 AS production
#FROM python:3.9.6-slim-buster

RUN apt -qq update
RUN apt-get -qq update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -qq -y --fix-missing librdf0 python3-dev python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Copy needed dlite files and libraries to slim image
Expand All @@ -138,11 +144,15 @@ COPY --from=build /usr/lib/x86_64-linux-gnu/libhdf5*.so* /usr/local/lib/
COPY --from=build /usr/lib/x86_64-linux-gnu/libsz.so* /usr/local/lib/
COPY --from=build /usr/lib/x86_64-linux-gnu/libaec.so* /usr/local/lib/
COPY --from=build /usr/lib/x86_64-linux-gnu/libm.so* /usr/local/lib/
RUN pip install --upgrade pip \
COPY requirements.txt .
COPY requirements_full.txt .
COPY requirements_dev.txt .
RUN pip install \
--trusted-host files.pythonhosted.org \
numpy \
PyYAML \
psycopg2-binary==2.9.5
--upgrade pip \
-r requirements.txt \
-r requirements_full.txt \
-r requirements_dev.txt

WORKDIR /home/user
ENV LD_LIBRARY_PATH=/usr/local/lib
Expand Down
18 changes: 14 additions & 4 deletions doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ For the full list of built-in configuration values, see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""
import os
import sys
from pathlib import Path
import re
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -31,7 +32,7 @@ breathe_projects = {"dlite": "./xml/"}
breathe_default_project = "dlite"


call(['python',
call([sys.executable,
'respirator.py',
breathe_projects[breathe_default_project],
'./c-api',
Expand All @@ -50,7 +51,15 @@ exclude_patterns = [
]

extensions = [
"autoapi.extension",
# Temporary disable autoapi since it leads to the following error during
# build of HTML documentation
#
# Extension error (autoapi.extension):
# Handler <function run_autoapi at 0x7f1ac734be50> for event
# 'builder-inited' threw an exception (exception: 'Module' object has no
# attribute 'doc')
#
#"autoapi.extension",
"breathe", # Doxygen bridge
"myst_nb", # markdown source support & support for Jupyter notebooks
"sphinx.ext.graphviz", # Graphviz
Expand Down Expand Up @@ -155,8 +164,9 @@ plantuml_output_format = "svg_img"
def autoapi_prepare_jinja_env(jinja_env: "Environment") -> None:
"""Add custom Jinja2 filters for use with AutoAPI templates."""

# Remove plugin path, removes the initial part of the module name if it is equal to
# any of the folder names under `dlite/share/dlite`.
# Remove plugin path, removes the initial part of the module name
# if it is equal to any of the folder names under
# `dlite/share/dlite`.
jinja_env.filters["remove_plugin_path"] = lambda name: ".".join(
name.split(".")[1:]
) if name.split(".")[0] in dlite_share_plugins else name
9 changes: 6 additions & 3 deletions examples/TEM_data/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
dlite-python
dlite-python>=0.4.1,<1
tripper>=0.2.7,<1
rdflib>=6,<8
oteapi-dlite>=0.1.5,<1
#oteapi-dlite>=0.1.5,<1
-e git+ssh://git@github.com/EMMC-ASBL/oteapi-dlite.git@fa1b820383eb54a1c37f32f7b8ac9406b556dace#egg=oteapi_dlite
otelib>=0.3.2,<1
requests>=2,<3
matplotlib>=3,<4
scikit-image>=0.21,<1
ncempy>=1.10,<2
h5py>=3.9,<4
pydantic<2
pydantic>=1.1,<2
pyyaml>=6.0.1,<7
pandas>=2.1.1,<3