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

Rename "docs" to "website" #338

Merged
merged 4 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
12 changes: 6 additions & 6 deletions .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ jobs:
./bin/ImathTest
# Confirm the examples compile and execute
rm -rf bin CMakeCache.txt CMakeFiles cmake_install.cmake Makefile
cmake ../docs/examples \
cmake ../website/examples \
-DCMAKE_PREFIX_PATH=../../_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \
Expand Down Expand Up @@ -532,14 +532,14 @@ jobs:
shell: bash
working-directory: _build

Docs:
Website:

# Build the documentation, using a process that mimics the readthedoc build.
#
# Note that this job does not actually build Imath libraries,
# it just runs doxygen and sphinx.

name: 'Docs'
name: 'Website'
runs-on: ubuntu-latest

steps:
Expand All @@ -551,14 +551,14 @@ jobs:
# Need help2man for tool manpages
run: sudo apt-get install -y doxygen help2man
- name: Install sphinx requirements
run: pip3 install -r docs/requirements.txt
run: pip3 install -r website/requirements.txt
- name: Configure
run: cmake .. -DBUILD_DOCS='ON'
run: cmake .. -DBUILD_WEBSITE='ON'
working-directory: _build
- name: Build
run: |
cmake --build . \
--target docs \
--target website \
--config Release
working-directory: _build

4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ build:
python: "3.9"

sphinx:
configuration: docs/conf.py
configuration: website/conf.py

python:
install:
- requirements: docs/requirements.txt
- requirements: website/requirements.txt
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ if (PYTHON)
add_subdirectory(src/python)
endif()

option(BUILD_DOCS "Set ON to build readthedocs documentation")
if (BUILD_DOCS AND NOT IMATH_IS_SUBPROJECT)
option(INSTALL_DOCS "Set ON to install html documentation" ON)
add_subdirectory(docs)
option(BUILD_WEBSITE "Set ON to build the readthedocs website source")
if (BUILD_WEBSITE AND NOT IMATH_IS_SUBPROJECT)
add_subdirectory(website)
endif()

# If you want to use ctest to configure, build and
Expand Down
10 changes: 2 additions & 8 deletions docs/CMakeLists.txt → website/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,5 @@ add_custom_command(OUTPUT ${SPHINX_INDEX_FILE}
MAIN_DEPENDENCY conf.py
COMMENT "Generating documentation with Sphinx")

add_custom_target(docs ALL DEPENDS ${SPHINX_INDEX_FILE} ${DOXYGEN_INDEX_FILE})

# Add an install target to install the docs
if(INSTALL_DOCS)
include(GNUInstallDirs)
install(DIRECTORY ${SPHINX_BUILD}
DESTINATION ${CMAKE_INSTALL_DOCDIR})
endif()
add_custom_target(website ALL DEPENDS ${SPHINX_INDEX_FILE} ${DOXYGEN_INDEX_FILE})

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
35 changes: 22 additions & 13 deletions docs/install.rst → website/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ To build via CMake, you need to first identify three directories:
libraries and headers, referred to below as ``$installdir``.

To build:

.. code-block::

$ cd $builddir
$ cmake $srcdir --install-prefix $installdir
$ cmake --build $builddir --target install --config Release
% cd $builddir
% cmake $srcdir --install-prefix $installdir
% cmake --build $builddir --target install --config Release

Note that the CMake configuration prefers to apply an out-of-tree
build process, since there may be multiple build configurations
Expand Down Expand Up @@ -102,7 +103,7 @@ can specify a local install directory to cmake via the

.. code-block::

$ cmake .. -DCMAKE_INSTALL_PREFIX=$Imath_install_directory
% cmake .. -DCMAKE_INSTALL_PREFIX=$Imath_install_directory

Library Names
-------------
Expand Down Expand Up @@ -141,27 +142,35 @@ See the :doc:`PortingGuide` for details about differences from previous
releases and how to address them. Also refer to the porting guide for
details about changes to Imath.

Building the Documentation
--------------------------
Building the Website
--------------------

The Imath technical documentation at `https://imath.readthedocs.io
<https://imath.readthedocs.io>`_ is generated via `Sphinx
<https://www.sphinx-doc.org>`_ with the `Breathe
<https://breathe.readthedocs.io>`_ extension using information
extracted from header comments by `Doxygen <https://www.doxygen.nl>`_.

To build the documentation locally from the source headers and
``.rst`` files, set the CMake option ``BUILD_DOCS=ON``. This adds
``Doxygen`` and ``Sphinx`` CMake targets and enables building the docs
by default. generation is off by default.
To build the website locally from the source headers and
``.rst`` files, set the CMake option ``BUILD_WEBSITE=ON``. This adds
``Doxygen`` and ``Sphinx`` CMake targets. Generation is off by default.

Building the documentation requires that ``sphinx``, ``breathe``, and
Building the website requires that ``sphinx``, ``breathe``, and
``doxygen`` are installed. It further requires the `sphinx-press-theme
<https://pypi.org/project/sphinx-press-theme>`_, as indicated in the
`requirements.txt
<https://github.com/AcademySoftwareFoundation/imath/blob/main/docs/requirements.txt>`_
file.

On Debian/Ubuntu Linux:

.. code-block::

% apt-get install doxygen python3-sphinx
% pip3 install breathe
% pip install sphinx_press_theme


CMake Build-time Configuration Options
--------------------------------------

Expand All @@ -171,7 +180,7 @@ variables, run:

.. code-block::

$ cmake -LAH $imath_source_directory
% cmake -LAH $imath_source_directory

You can customize these options three ways:

Expand Down Expand Up @@ -306,5 +315,5 @@ initial generation:

.. code-block::

$ cmake -G “Ninja” ..
% cmake -G “Ninja” ..

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading