-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Images page for website (#1372)
This adds a "Test Image" section to the website with a gallery of images from the test image repo https://github.com/AcademySoftwareFoundation/openexr-images, with a page for each image that shows the output of exrheader. Each image is a link to download the .exr file. Preview it here: https://cary-ilm-openexr.readthedocs.io/en/docs-images/index.html It's not perfect, but it's a decent start, feel free to suggest improvements to the layout or content. A few notes: In lieu of setting up a way to view .exr images directly in a browser, I converted the .exr's in openexr-images to .jpg's. They are stored in the openexr-images repo and served to the website directly from github, so the OpenEXR distribution (which holds the website source) doesn't get bloated with extra image data. The download link downloads the source .exr image, not the .jpg. This draft actually serves them from a branch of my fork of the openexr-images repo, but that can get fixed later. The exr2rst.py script generates the rst (and embedded html) from the .exr's (by running exrheader) and the accompanying README's, so it's (relatively) easy to add new images. --------- Major update to this, the .rst and the proxy .jpg’s are now generated automatically, so no need to maintain .jpg’s in the openexr-images repo. The docs/test_images.txt file lists urls for .exr’s and README.rst files that define the contents of the “Test Images” page. The docs/scripts/test_images.py script builds the index page and the per-image pages. It downloads the files via wget, then runs convert (ImageMagick) to generate the proxy .jpg’s, then runs exrheader to generate the tables of attribute values. The script puts the auto-generated .rst files in the docs/_test_images subdirectory. Ideally, these would go in the build directory, but sphinx seems to want all .rst input under a single source root. There's now a separate "Docs" CI job that builds the docs, so I removed all references to docs in the other jobs. It uses Ubuntu to mirror .readthedocs.yml. There's no need for the install_doxygen.sh and install_docs_env.sh scripts, the necessary installations are simple enough to do inline in the CI job. --------- Signed-off-by: Cary Phillips <cary@ilm.com>
- Loading branch information
Showing
9 changed files
with
688 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,5 @@ build/ | |
build-win/ | ||
build-nuget/ | ||
*~ | ||
.vscode | ||
.vscode | ||
docs/_test_images/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.9" | ||
apt_packages: | ||
- wget # for test images | ||
- imagemagick # for convert, for test images | ||
- openexr # for exrheader, for test images | ||
jobs: | ||
pre_build: | ||
- python docs/scripts/test_images.py | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.