Skip to content

Commit

Permalink
Fixed docs (#1035)
Browse files Browse the repository at this point in the history
* Fixed build_docs step

* Increased buf_size

* Use lualatex

* Increase buf size dynamically

* Reverted Makefile

* Changed readthedocs image

* Bumped docs dependencies

* Reverted ci to test everything

* Removed comments on docs dependencies

* Updated CONTRIBUTING.md
  • Loading branch information
RobertSamoilescu authored Dec 6, 2024
1 parent c54bbf9 commit 71ead56
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: readthedocs/build:ubuntu-22.04-2022.03.15
image: readthedocs/build:ubuntu-24.04-2024.06.17
options: --user root

steps:
Expand Down
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ errors, the commit will fail and you will see the changes that need to be made.
We use `pytest` to run tests.
Because `alibi` uses some TensorFlow 1.x constructs, to run all tests you need to invoke `pytest` twice as follows:
```bash
pytest -m tf1 alibi
pytest -m "not tf1 alibi"
TF_USE_LEGACY_KERAS=1 pytest -m "tf1" alibi
pytest -m "not tf1" alibi
```

or run directly:
```bash
make test
```

[see also here](https://github.com/SeldonIO/alibi/blob/4d4f49e07263b20a25f552a8485844dc12281074/.github/workflows/ci.yml#L46-L47).
It is not necessary to run the whole test suite locally for every PR as this can take a long time, it is enough to run `pytest`
only on the affected test files or test functions. The whole test suite is run in CI on every PR.
Expand Down
12 changes: 7 additions & 5 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# dependencies for building docs, separate from dev.txt as this is also used for builds on readthedocs.org
# core dependencies
sphinx>=4.2.0, <8.0.0
sphinx-autodoc-typehints>=1.12.0, <1.21 # limited due to https://github.com/tox-dev/sphinx-autodoc-typehints/issues/260
sphinx-rtd-theme>=1.0.0, <2.0.0
sphinx>=4.2.0, <8.2.0
sphinx-autodoc-typehints>=1.12.0, <2.6.0
sphinx-rtd-theme>=1.0.0, <3.1.0
myst-parser>=1.0, <3.0
sphinxcontrib-apidoc>=0.3.0, <0.5.0
sphinxcontrib-apidoc>=0.3.0, <0.6.0
nbsphinx>=0.8.5, <0.10.0
sphinx_design==0.5.0 # Pinning for now as sphinx_design is v.new and still in flux.
sphinx_design==0.6.1 # Pinning for now as sphinx_design is v.new and still in flux.
ipykernel>=5.1.0, <7.0.0 # required for executing notebooks via nbsphinx
ipython>=7.2.0, <9.0.0 # required for executing notebooks nbsphinx
# dependencies required for imports to work and docs to render properly (as mocking doesn't work well)
Expand All @@ -16,3 +16,5 @@ shap>=0.40.0, <0.44.0 # https://github.com/SeldonIO/alibi/issues/333
# pandoc==2.9.2.1 # NB: as this is not a Python library, it should be installed manually on the system or via a package manager such as `conda`
# alibi dependencies (these are installed on ReadTheDocs so are not mocked)
typing-extensions>=3.7.4.3
#AttributeError: `np.obj2sctype` was removed in the NumPy 2.0 release. Use `np.dtype(obj).type` instead.
numpy<2.0.0

0 comments on commit 71ead56

Please sign in to comment.