From bf637a12a9b0d5c30ef302bd1ed57acc1fb555bb Mon Sep 17 00:00:00 2001 From: Lorenz Herzberger Date: Thu, 16 Feb 2023 15:00:10 +0100 Subject: [PATCH] migrated docs to use poetry, removed python browser script from makefile Signed-off-by: Lorenz Herzberger --- Makefile | 22 --------- docker-compose.yml | 2 +- docs/root/Makefile | 2 +- docs/root/requirements.txt | 46 ------------------- .../http-samples/api-index-response.http | 2 +- .../http-samples/index-response.http | 6 +-- 6 files changed, 6 insertions(+), 74 deletions(-) delete mode 100644 docs/root/requirements.txt diff --git a/Makefile b/Makefile index 24aa4b8..8df153b 100644 --- a/Makefile +++ b/Makefile @@ -3,21 +3,6 @@ .DEFAULT_GOAL := help -############################# -# Open a URL in the browser # -############################# -define BROWSER_PYSCRIPT -import os, webbrowser, sys -try: - from urllib import pathname2url -except: - from urllib.request import pathname2url - -webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) -endef -export BROWSER_PYSCRIPT - - ################################## # Display help for this makefile # ################################## @@ -42,7 +27,6 @@ export PRINT_HELP_PYSCRIPT ################## DOCKER := docker DC := docker-compose -BROWSER := python -c "$$BROWSER_PYSCRIPT" HELP := python -c "$$PRINT_HELP_PYSCRIPT" ECHO := /usr/bin/env echo @@ -100,15 +84,9 @@ test-integration: check-deps ## Run all integration tests cov: check-deps ## Check code coverage and open the result in the browser @$(DC) run --rm planetmint pytest -v --cov=planetmint --cov-report html - $(BROWSER) htmlcov/index.html docs: check-deps ## Generate HTML documentation and open it in the browser @$(DC) run --rm --no-deps bdocs make -C docs/root html - $(BROWSER) docs/root/build/html/index.html - -docs-integration: check-deps ## Create documentation for integration tests - @$(DC) run --rm python-integration pycco -i -s /src -d /docs - $(BROWSER) integration/python/docs/index.html clean: check-deps ## Remove all build, test, coverage and Python artifacts @$(DC) up clean diff --git a/docker-compose.yml b/docker-compose.yml index 6375756..565caec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -96,7 +96,7 @@ services: context: . dockerfile: Dockerfile args: - backend: tarantool + backend: tarantool_db volumes: - .:/usr/src/app/ command: make -C docs/root html diff --git a/docs/root/Makefile b/docs/root/Makefile index 357bb5c..764a1a1 100644 --- a/docs/root/Makefile +++ b/docs/root/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line. SPHINXOPTS = -SPHINXBUILD = sphinx-build +SPHINXBUILD = poetry run sphinx-build PAPER = a4 BUILDDIR = build diff --git a/docs/root/requirements.txt b/docs/root/requirements.txt deleted file mode 100644 index 93e5e50..0000000 --- a/docs/root/requirements.txt +++ /dev/null @@ -1,46 +0,0 @@ -aafigure==0.6 -alabaster==0.7.12 -Babel==2.10.1 -certifi==2022.12.7 -charset-normalizer==2.0.12 -commonmark==0.9.1 -docutils==0.17.1 -idna -imagesize==1.3.0 -importlib-metadata==4.11.3 -Jinja2==3.0.0 -markdown-it-py==2.1.0 -MarkupSafe==2.1.1 -mdit-py-plugins==0.3.0 -mdurl==0.1.1 -myst-parser==0.17.2 -packaging==21.3 -pockets==0.9.1 -Pygments==2.12.0 -pyparsing==3.0.8 -pytz==2022.1 -PyYAML>=5.4.0 -requests>=2.25i.1 -six==1.16.0 -snowballstemmer==2.2.0 -Sphinx==4.5.0 -sphinx-rtd-theme==1.0.0 -sphinxcontrib-applehelp==1.0.2 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.0 -sphinxcontrib-httpdomain==1.8.0 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-napoleon==0.7 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 -urllib3==1.26.9 -wget==3.2 -zipp==3.8.0 -nest-asyncio==1.5.5 -sphinx-press-theme==0.8.0 -sphinx-documatt-theme -base58>=2.1.1 -pynacl==1.4.0 -zenroom==2.1.0.dev1655293214 -pyasn1==0.4.8 -cryptography==3.4.7 diff --git a/docs/root/source/connecting/http-samples/api-index-response.http b/docs/root/source/connecting/http-samples/api-index-response.http index fd32de7..40eeb45 100644 --- a/docs/root/source/connecting/http-samples/api-index-response.http +++ b/docs/root/source/connecting/http-samples/api-index-response.http @@ -4,7 +4,7 @@ Content-Type: application/json { "assets": "/assets/", "blocks": "/blocks/", - "docs": "https://docs.planetmint.io/projects/server/en/v1.4.1/http-client-server-api.html", + "docs": "https://docs.planetmint.io/projects/server/en/v2.2.3/http-client-server-api.html", "metadata": "/metadata/", "outputs": "/outputs/", "streamedblocks": "ws://localhost:9985/api/v1/streams/valid_blocks", diff --git a/docs/root/source/connecting/http-samples/index-response.http b/docs/root/source/connecting/http-samples/index-response.http index 4433e63..cbd8f40 100644 --- a/docs/root/source/connecting/http-samples/index-response.http +++ b/docs/root/source/connecting/http-samples/index-response.http @@ -6,7 +6,7 @@ Content-Type: application/json "v1": { "assets": "/api/v1/assets/", "blocks": "/api/v1/blocks/", - "docs": "https://docs.planetmint.io/projects/server/en/v1.4.1/http-client-server-api.html", + "docs": "https://docs.planetmint.io/projects/server/en/v2.2.3/http-client-server-api.html", "metadata": "/api/v1/metadata/", "outputs": "/api/v1/outputs/", "streamedblocks": "ws://localhost:9985/api/v1/streams/valid_blocks", @@ -15,7 +15,7 @@ Content-Type: application/json "validators": "/api/v1/validators" } }, - "docs": "https://docs.planetmint.io/projects/server/en/v1.4.1/", + "docs": "https://docs.planetmint.io/projects/server/en/v2.2.3/", "software": "Planetmint", - "version": "1.4.1" + "version": "2.2.3" }