Skip to content

Commit

Permalink
Docs CI and ReadTheDocs Config (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
quaark committed Aug 10, 2020
1 parent 07d0714 commit 2243ab1
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 48 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/ci.yaml
Expand Up @@ -48,10 +48,16 @@ jobs:
- uses: actions/checkout@v2
- name: Run Dockerized tests
run: make test-dockerized
- name: Generate HTML docs
run: make html-docs-dockerized
- name: Upload generated docs
uses: actions/upload-artifact@v2
with:
name: docs
path: docs/_build/html

docs:
name: Build Project Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate HTML docs
run: make html-docs-dockerized
- name: Upload generated docs
uses: actions/upload-artifact@v2
with:
name: docs
path: docs/_build/html
15 changes: 15 additions & 0 deletions .readthedocs.yml
@@ -0,0 +1,15 @@
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

formats: all

python:
version: 3.7
install:
- requirements: requirements.txt
- requirements: dev-requirements.txt
- requirements: dockerfiles/mlrun-api/requirements.txt
- requirements: docs/requirements.txt
9 changes: 2 additions & 7 deletions Makefile
Expand Up @@ -277,18 +277,13 @@ test: clean ## Run mlrun tests
run-api-undockerized: ## Run mlrun api locally (un-dockerized)
python -m mlrun db

.PHONY: docs-requirements
docs-requirements: ## Build docs requirements
cp requirements.txt docs/requirements.txt
echo numpydoc >> docs/requirements.txt

.PHONY: html-docs
html-docs: docs-requirements ## Build html docs
html-docs: ## Build html docs
rm -f docs/external/*.md
cd docs && make html

.PHONY: html-docs-dockerized
html-docs-dockerized: ## Build html docs dockerized
html-docs-dockerized: build-test ## Build html docs dockerized
docker run \
--rm \
-v $(PWD)/docs/_build:/mlrun/docs/_build \
Expand Down
5 changes: 0 additions & 5 deletions dev-requirements.txt
@@ -1,12 +1,7 @@
msgpack<1.0.0
numpydoc==0.9.1
pytest~=5.4
recommonmark==0.6.0
sphinx==2.2.2
sphinx_rtd_theme==0.4.3
twine==3.1.1
xgboost
sphinx-copybutton
black
flake8
pytest-asyncio~=0.14
4 changes: 3 additions & 1 deletion dockerfiles/test/Dockerfile
Expand Up @@ -41,10 +41,12 @@ WORKDIR /mlrun
COPY ./requirements.txt ./
COPY ./dockerfiles/mlrun-api/requirements.txt ./mlrun-api-requirements.txt
COPY ./dev-requirements.txt ./
COPY ./docs/requirements.txt ./docs-requirements.txt

RUN pip install \
-r requirements.txt \
-r mlrun-api-requirements.txt \
-r dev-requirements.txt
-r dev-requirements.txt \
-r docs-requirements.txt

COPY . .
32 changes: 5 additions & 27 deletions docs/requirements.txt
@@ -1,27 +1,5 @@
# If you change this file, run "make docs-requirements"
# >=1.24.2 from kubernetes-asyncio (from API requirements), <1.25 from kfp
urllib3>=1.24.2, <1.25
GitPython>=2.1.0
aiohttp>=3.5.0
boto3>=1.9
click==7.0
# this is the pipelines version running in 2.8/2.10 iguazio system, for now locking it to this version
kfp==0.2.5
nest-asyncio>=1.0.0
# <0.16 from botocore inside nuclio-jupyter, >=0.13.1 from readme-renderer inside twine (from dev-requirements)
docutils<0.16, >=0.13.1
nuclio-jupyter>=0.8.3
pandas>=1.0.1
pyarrow>=0.13
pyyaml>=5.1.0
requests>=2.20.1
sqlalchemy>=1.3.0
tabulate>=0.8.0, <=0.8.3
v3io>=0.3.3
matplotlib
scikit-learn
seaborn
sphinx-copybutton
azure-storage-blob
pydantic~=1.5
numpydoc
numpydoc~=0.9
recommonmark~=0.6
sphinx~=2.2
sphinx_rtd_theme~=0.4
sphinx-copybutton~=0.3
1 change: 0 additions & 1 deletion requirements.txt
@@ -1,4 +1,3 @@
# If you change this file, run "make docs-requirements"
# >=1.24.2 from kubernetes-asyncio (from API requirements), <1.25 from kfp
urllib3>=1.24.2, <1.25
GitPython>=2.1.0
Expand Down

0 comments on commit 2243ab1

Please sign in to comment.