generated from readthedocs/tutorial-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
92 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# .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-20.04 | ||
tools: | ||
python: '3.8' | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
# Build documentation with MkDocs | ||
#mkdocs: | ||
# configuration: mkdocs.yml | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: all | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: requirements.txt | ||
|
||
# Optionally include all submodules | ||
submodules: | ||
include: all | ||
recursive: true |
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
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
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,33 @@ | ||
""" | ||
Configure and build the nwb project analytics sources | ||
""" | ||
import os | ||
|
||
|
||
def build_project_analytics(target_dir=None): | ||
""" | ||
Clone the nwb-project-analytics repo and build the documentation | ||
:param target_dir: Directory where to clone the repo or None if the repo should be | ||
cloned in the same directory as this file. | ||
:return: Path where the generated rst sources are located | ||
""" | ||
# Clone the project analytics repo | ||
target_dir = os.path.join(os.path.dirname(__file__), "nwb-project-analytics") | ||
if not os.path.exists(target_dir): | ||
repo_url = "https://github.com/NeurodataWithoutBorders/nwb-project-analytics.git" | ||
clone_command = f"git clone {repo_url} {target_dir}" | ||
os.system(clone_command) | ||
# remove the readme.rst file to avoid Sphinx warnings and possible unrelated linkcheck errors | ||
os.remove(os.path.join(target_dir, "README.rst")) | ||
else: | ||
print(f"{target_dir} already checked out. Use 'make clean' to do a full rebuild.") | ||
|
||
# Build the project analytics docs (assuming all dependencies are installed) | ||
docs_dir = os.path.join(target_dir, "docs") | ||
build_command = f"cd {docs_dir}; make html;" | ||
os.system(build_command) | ||
|
||
# Return the location of the rst sources | ||
source_dir = os.path.join(docs_dir, "source") | ||
return source_dir |
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
myst_parser | ||
sphinx | ||
sphinx>=4 # improved support for docutils>=0.17 | ||
sphinx_rtd_theme>=1 # <1 does not work with docutils>=0.17 | ||
sphinx_design | ||
sphinx-tabs | ||
sphinx-copybutton | ||
git+https://github.com/NeurodataWithoutBorders/nwb-project-analytics.git |