Skip to content

Commit

Permalink
Preparatory configuration updates (#1313)
Browse files Browse the repository at this point in the history
* Split development and documentation requirements

* Add sphinx-copybutton and sphinx-design

* IPython

* Cache

* Disable domain indices & copying source
  • Loading branch information
AA-Turner authored Jul 24, 2023
1 parent 4b8754c commit 001db3e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
cache: 'pip'
cache-dependency-path: |
requirements/base.txt
requirements/dev.txt
requirements/doc.txt
- name: Install Pandoc
run: sudo apt-get install --yes pandoc
Expand All @@ -44,7 +44,7 @@ jobs:
run: python -m pip install --upgrade pip

- name: Install HARK
run: python -m pip install .[dev]
run: python -m pip install .[doc]

- name: Run Sphinx
run: >
Expand Down
6 changes: 6 additions & 0 deletions Documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

# General configuration
extensions = [
# built-in extensions
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
Expand All @@ -30,8 +31,11 @@
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
# third-party extensions
"nbsphinx",
"myst_parser",
"sphinx_copybutton",
"sphinx_design",
]

exclude_patterns = [
Expand Down Expand Up @@ -93,6 +97,8 @@

html_logo = "images/econ-ark-logo.png"
html_favicon = "images/econ-ark-logo.png"
html_domain_indices = False
html_copy_source = False

# sphinx.ext.intersphinx configuration
intersphinx_mapping = {
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ dynamic = ["dependencies", "optional-dependencies"]
file = "requirements/base.txt"

[tool.setuptools.dynamic.optional-dependencies]
dev = {"file" = "requirements/dev.txt"}
dev.file = "requirements/dev.txt"
doc.file = "requirements/doc.txt"

[project.urls]
Homepage = "https://github.com/econ-ark/HARK"
Expand Down
6 changes: 1 addition & 5 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
estimagic
nbsphinx>=0.8
nbval
pre-commit
pytest
pytest-xdist
myst-parser>=2
sphinx>=6.1
pydata-sphinx-theme
pytest-xdist
11 changes: 11 additions & 0 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sphinx>=6.1

# theme requirements
pydata-sphinx-theme

# extension requirements
ipython # for the Pygments lexer
myst-parser>=2
nbsphinx>=0.8
sphinx-copybutton
sphinx-design

0 comments on commit 001db3e

Please sign in to comment.