-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from bsipocz/CI_adding_rendering
CI: adding rendering for local CI
- Loading branch information
Showing
6 changed files
with
144 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
|
||
build-docs: | ||
docker: | ||
- image: cimg/python:3.11 | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: Install CI dependencies | ||
command: python -m pip install --upgrade tox | ||
|
||
- run: | ||
name: Build HTML rendering of notebooks | ||
no_output_timeout: 30m | ||
command: | | ||
python -m tox -e py311-buildhtml | ||
- store_artifacts: | ||
path: _build/html | ||
|
||
workflows: | ||
version: 2 | ||
default: | ||
jobs: | ||
- build-docs |
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,15 @@ | ||
name: Run CircleCI artifacts redirector, rendered pages are under Details | ||
|
||
on: [status] | ||
jobs: | ||
circleci_artifacts_redirector_job: | ||
runs-on: ubuntu-latest | ||
name: Run CircleCI artifacts redirector | ||
steps: | ||
- name: GitHub Action step | ||
uses: scientific-python/circleci-artifacts-redirector-action@4e13a10d89177f4bfc8007a7064bdbeda848d8d1 # v1.0.0 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
api-token: ${{ secrets.FORNAX_DOCUMENTATION_CIRCLE_TOKEN }} | ||
artifact-path: 0/_build/html/index.html | ||
circleci-jobs: build-docs |
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,67 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'Fornax Documentation' | ||
copyright = '2023-2024, Fornax developers' | ||
author = 'Fornax developers' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
'myst_nb', | ||
'sphinx_copybutton', | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ['_build', 'notes', '.tox', '.tmp', '.pytest_cache'] | ||
|
||
# MyST-NB configuration | ||
nb_execution_timeout = 900 | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'sphinx_book_theme' | ||
html_title = 'Fornax Demo Notebooks' | ||
html_logo = '_static/fornax_logo.png' | ||
html_theme_options = { | ||
"github_url": "https://github.com/nasa-fornax/fornax-documentation", | ||
"repository_url": "https://github.com/nasa-fornax/fornax-documentation", | ||
"repository_branch": "main", | ||
"use_repository_button": True, | ||
"use_issues_button": True, | ||
"use_edit_page_button": True, | ||
"home_page_in_toc": True, | ||
} | ||
|
||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] | ||
|
||
# myst configurations | ||
myst_heading_anchors = 4 |
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,8 @@ | ||
# User Documentation | ||
|
||
```{toctree} | ||
--- | ||
maxdepth: 2 | ||
--- | ||
README |
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,4 @@ | ||
sphinx | ||
myst-nb | ||
sphinx-book-theme | ||
sphinx-copybutton |
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,21 @@ | ||
[tox] | ||
envlist = | ||
py{311}-buildhtml | ||
requires = | ||
pip >= 19.3.1 | ||
|
||
[testenv] | ||
|
||
description = run tests and build html | ||
|
||
deps = | ||
# We use these files to specify all the dependencies, and below we override | ||
# versions for specific testing scenarios | ||
buildhtml: -rsite-requirements.txt | ||
|
||
commands = | ||
pip freeze | ||
|
||
buildhtml: sphinx-build -b html . _build/html -D nb_execution_mode=off -nT --keep-going | ||
|
||
skip_install = true |