Skip to content

Fix Makefile to use tox for docs #752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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