Skip to content

Commit 9bacc2d

Browse files
committed
building and pushing docs
1 parent f0a88f2 commit 9bacc2d

File tree

7 files changed

+34
-5
lines changed

7 files changed

+34
-5
lines changed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ include tox.ini
99
recursive-include labelbox *.py
1010
recursive-include tests *.json
1111
recursive-include tests *.py
12+
recursive-include docs *.py
13+
recursive-include docs *.rst
14+
1215
include labelbox/exporters/pascal_voc_writer/templates/annotation.xml

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ To generate a `requirements.txt` for usage outside of `pipenv`
3838
```sh
3939
pipenv lock -r > requirements.txt
4040
```
41+
42+
## Publishing docs
43+
44+
```sh
45+
./build-docs.sh
46+
```

build-docs.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
# build the docs
3+
pipenv run tox -e docs
4+
5+
# commit and push
6+
git add -A
7+
git commit -m "building and pushing docs"
8+
git push origin master
9+
10+
# switch branches and pull the data we want
11+
git checkout gh-pages
12+
rm -rf .
13+
git checkout master docs/build/html
14+
mv ./docs/build/html/* ./
15+
rm -rf ./docs
16+
git add -A
17+
git commit -m "publishing updated docs..."
18+
git push origin gh-pages
19+
20+
# switch back
21+
git checkout master

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@
4141
extensions = [
4242
'sphinx.ext.autodoc',
4343
'sphinxcontrib.napoleon',
44-
'sphinx.ext.doctest',
4544
'sphinx.ext.todo',
46-
'sphinx.ext.coverage',
45+
'sphinx.ext.githubpages',
4746
]
4847

4948
# Add any paths that contain templates here, relative to this directory.

labelbox/predictions/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def vectorize_to_v4_label(
1010
segmentation_map,
1111
legend: Dict[int, str],
12-
epsilon: Optional[float]) -> DefaultDict[str, List[dict]]:
12+
epsilon: Optional[float] = None) -> DefaultDict[str, List[dict]]:
1313
"""Converts a segmentation map into polygons.
1414
1515
Given a raster pixel wise array of predictions in `segmentation_map`,

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = labelbox
3-
version = 0.0.1
3+
version = 0.0.2
44
description = A python library for interacting with labelbox.com
55
author = Feynman Liang
66
author_email = feynman@labelbox.com

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ commands=
2929
labelbox/ tests/
3030

3131
[testenv:docs]
32-
basepython = python3.6
3332
commands =
3433
pipenv install --dev --ignore-pipfile
34+
rm -rf docs/_build docs/source
3535
pipenv run sphinx-apidoc -f -o docs/source --implicit-namespaces labelbox
3636
pipenv run sphinx-build -W -b html docs docs/_build/html
3737

0 commit comments

Comments
 (0)