This repository was archived by the owner on Feb 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* streamlit demo segm * fix Pillow ver. * add Makefile * move Docs CI - CircleCI > GHA * update line length
- Loading branch information
Showing
19 changed files
with
237 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: "Docs check" | ||
# https://github.com/marketplace/actions/sphinx-build | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
|
||
test-docs: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
# Note: This uses an internal pip API and may not always work | ||
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y cmake pandoc | ||
pip --version | ||
pip install -r requirements.txt | ||
pip install -r docs/requirements.txt | ||
python setup.py build_ext --inplace | ||
pip list | ||
shell: bash | ||
|
||
- name: Test Documentation | ||
run: | | ||
# First run the same pipeline as Read-The-Docs | ||
cd docs | ||
make doctest | ||
make-docs: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
# Note: This uses an internal pip API and may not always work | ||
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y cmake pandoc latexmk | ||
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures | ||
pip --version | ||
pip install -r requirements.txt | ||
pip install -r docs/requirements.txt | ||
python setup.py build_ext --inplace | ||
pip list | ||
shell: bash | ||
|
||
- name: Make Documentation | ||
run: | | ||
cd docs | ||
make clean | ||
make html --debug --jobs 2 SPHINXOPTS="-W" | ||
make latexpdf | ||
- name: Upload built docs | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: docs-results-${{ runner.os }}-${{ matrix.python-version }} | ||
path: docs/build/html/ | ||
if: success() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.PHONY: test clean docs | ||
|
||
clean: | ||
# clean all temp runs | ||
rm -rf .pytest_cache | ||
rm -rf ./docs/build | ||
rm -rf ./docs/source/*.md | ||
rm -rf ./docs/source/api | ||
rm -rf ./docs/source/notebooks | ||
|
||
test: clean | ||
pip install --quiet -r requirements.txt | ||
pip install --quiet -r tests/requirements.txt | ||
|
||
# run tests with coverage | ||
python -m coverage run --source imsegm -m pytest imsegm tests -v | ||
python -m coverage report | ||
|
||
docs: clean | ||
pip install --quiet -r docs/requirements.txt | ||
python setup.py build_ext --inplace | ||
python -m sphinx -b html -W --keep-going docs/source docs/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
sphinx>=2.0, <3.0 | ||
recommonmark # fails with badges | ||
m2r # fails with multi-line text | ||
nbsphinx | ||
myst-parser | ||
nbsphinx>=0.8.5 | ||
pandoc | ||
docutils<0.15 # higher version breaks py2 | ||
docutils | ||
ipython |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.