Skip to content

Commit

Permalink
Fix broken readthedocs workflow (#1539)
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 committed Oct 12, 2023
1 parent 13d32b1 commit 8331c2b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 37 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install asreview
- name: Install ASReview with docs dependencies
run: |
python -m pip install .
- name: Install docs dependencies
run: |
python -m pip install -r docs/requirements.txt
python -m pip install .[docs]
- name: Build HTML
run: |
python -m sphinx -W --keep-going --color docs/source/ build/html/
6 changes: 4 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ formats:
- htmlzip

python:
install:
- requirements: docs/requirements.txt
install:
- path: .
extra_requirements:
- docs
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ or PDF files.
Install the dependencies for rendering the documentation with

```
pip install -r docs/requirements.txt
pip install .[docs]
```

Navigate into the `docs` folder and render the documentation (the HTML version) with
Expand Down
6 changes: 0 additions & 6 deletions docs/requirements.txt

This file was deleted.

22 changes: 2 additions & 20 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,18 @@

# -- Mock
autodoc_mock_imports = [
"numpy",
"modAL",
"modAL.models",
"modAL.utils.data",
"modAL.utils.selection",
"rispy",
"pandas",
"tensorflow",
"tensorflow.keras",
"tensorflow.keras.wrappers.scikit_learn",
"tensorflow.keras.models",
"tensorflow.keras.models.layers",
"tensorflow.keras.optimizers",
"tensorflow.keras.constraints",
"tqdm",
"sklearn",
"sklearn.naive_bayes",
"sklearn.svm",
"sklearn.base",
"sklearn.exceptions",
"scipy",
"fuzzywuzzy",
"dill",
"PyInquirer",
"gensim",
"gensim.utils" "gensim.models.doc2vec",
"gensim.utils",
"gensim.models.doc2vec",
"sentence_transformers",
"sentence_transformers.SentenceTransformer",
"jsonschema",
"filelock",
]


Expand Down
14 changes: 11 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def get_long_description():
"tensorflow": ["tensorflow~=2.0"],
"dev": ["black", "check-manifest", "flake8", "flake8-isort", "isort"],
"test": ["coverage", "pytest", "pytest-random-order"],
"docs": [
"ipython",
"sphinx",
"sphinx_rtd_theme",
"sphinx-reredirects",
"sphinxcontrib-youtube",
"nbsphinx",
],
}
DEPS["all"] = DEPS["sbert"] + DEPS["doc2vec"]
DEPS["all"] += DEPS["tensorflow"]
Expand Down Expand Up @@ -113,12 +121,12 @@ def run(self):
subprocess.check_call(
["npm", "install"],
cwd=str(path_webapp),
shell=(platform.system() == "Windows")
shell=(platform.system() == "Windows"),
)
subprocess.check_call(
["npm", "run-script", "build"],
cwd=str(path_webapp),
shell=(platform.system() == 'Windows')
shell=(platform.system() == "Windows"),
)


Expand Down Expand Up @@ -194,7 +202,7 @@ def get_cmdclass():
"asreview.datasets": [
"benchmark = asreview.datasets:BenchmarkDataGroup",
"benchmark-nature = asreview.datasets:NaturePublicationDataGroup",
"synergy = asreview.datasets:SynergyDataGroup"
"synergy = asreview.datasets:SynergyDataGroup",
],
"asreview.models.classifiers": [
"svm = asreview.models.classifiers:SVMClassifier",
Expand Down

0 comments on commit 8331c2b

Please sign in to comment.