Skip to content

Commit

Permalink
Fix Makefile to use tox for docs (#752)
Browse files Browse the repository at this point in the history
* Fix Makefile to use tox for docs

* Resolve `open` based upon operating system

Co-authored-by: Abhinav Singh <[email protected]>
  • Loading branch information
webknjaz and abhinavsingh authored Nov 19, 2021
1 parent 2b3f0cb commit 736747a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ dist
build

proxy/public
docs/_build
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ CA_KEY_FILE_PATH := ca-key.pem
CA_CERT_FILE_PATH := ca-cert.pem
CA_SIGNING_KEY_FILE_PATH := ca-signing-key.pem

OPEN=$(shell which open)
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
OPEN=$(shell which xdg-open)
endif

.PHONY: all https-certificates sign-https-certificates ca-certificates
.PHONY: lib-check lib-clean lib-test lib-package lib-coverage lib-lint lib-pytest
.PHONY: lib-release-test lib-release lib-profile lib-doc
Expand Down Expand Up @@ -89,7 +95,6 @@ lib-dep:
-r requirements-testing.txt \
-r requirements-release.txt \
-r requirements-tunnel.txt \
-r docs/requirements.txt

lib-lint:
python -m tox -e lint
Expand All @@ -115,18 +120,12 @@ lib-release: lib-package
twine upload dist/*

lib-doc:
pushd docs && \
python -m sphinx \
--keep-going \
-b dirhtml \
-d _build/doctrees \
-D language=en . _build/html && \
popd && \
open docs/_build/html/index.html
python -m tox -e lint && \
$(OPEN) .tox/build-docs/docs_out/index.html

lib-coverage:
pytest --cov=proxy --cov=tests --cov-report=html tests/
open htmlcov/index.html
$(OPEN) htmlcov/index.html

lib-profile:
sudo py-spy record -o profile.svg -t -F -s -- python -m proxy
Expand Down

0 comments on commit 736747a

Please sign in to comment.