From 58648f4f4de8607c762d46f3d17496e7fbe90c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Rosales?= Date: Tue, 22 Aug 2023 13:21:54 -0600 Subject: [PATCH] doc: pdoc target outputs to local path, add earthlyignore --- services/voting-node/.earthlyignore | 6 ++++++ services/voting-node/.gitignore | 1 + services/voting-node/Earthfile | 22 +++++++++++----------- services/voting-node/pyproject.toml | 2 +- 4 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 services/voting-node/.earthlyignore diff --git a/services/voting-node/.earthlyignore b/services/voting-node/.earthlyignore new file mode 100644 index 0000000000..520c29fb33 --- /dev/null +++ b/services/voting-node/.earthlyignore @@ -0,0 +1,6 @@ +*egg-info/ +build/ +dist/ +__pycache__/ +.ruff-cache/ +doc/ diff --git a/services/voting-node/.gitignore b/services/voting-node/.gitignore index bac12a8962..7c0bf73c4b 100644 --- a/services/voting-node/.gitignore +++ b/services/voting-node/.gitignore @@ -1,3 +1,4 @@ tempo-data/ *egg-info/ build/ +doc/ diff --git a/services/voting-node/Earthfile b/services/voting-node/Earthfile index 576380ac9e..401342537e 100644 --- a/services/voting-node/Earthfile +++ b/services/voting-node/Earthfile @@ -42,7 +42,7 @@ install-deps: RUN poetry install --only main --no-root # Copy the voting_node source code - COPY --dir voting_node development.md ./ + COPY --dir voting_node readme.md ./ SAVE ARTIFACT .venv .venv SAVE IMAGE --cache-hint @@ -70,8 +70,8 @@ pytest: pdoc: FROM +build-dev - RUN poetry run pdoc -o /apidoc ./voting_node - SAVE ARTIFACT /apidoc doc + RUN poetry run pdoc -o /doc ./voting_node + SAVE ARTIFACT /doc AS LOCAL ./doc docker: FROM python:3.11-slim-bullseye @@ -92,6 +92,12 @@ docker: RUN apt-get clean && \ rm -rf /var/lib/apt/lists/* + # Copy the rest of the application code to the container + COPY ../../src/jormungandr/jormungandr+build/jormungandr /app/jormungandr + COPY ../../src/jormungandr/jcli+build/jcli /app/jcli + COPY ../../src/catalyst-toolbox/catalyst-toolbox+build/catalyst-toolbox /app/catalyst-toolbox + COPY ../../src/voting-tools-rs+build/snapshot_tool /app/snapshot_tool + # Set the working directory WORKDIR /app @@ -99,18 +105,12 @@ docker: COPY +build/wheels /app COPY +build/requirements.txt /app COPY ../../utilities/ideascale-importer+build/src /src/utilities/ideascale-importer - COPY entry.sh /app - RUN chmod +x /app/entry.sh - # Install the package RUN pip3 install --no-cache -r requirements.txt RUN pip3 install --no-cache *.whl - # Copy the rest of the application code to the container - COPY ../../src/jormungandr/jormungandr+build/jormungandr /app/jormungandr - COPY ../../src/jormungandr/jcli+build/jcli /app/jcli - COPY ../../src/catalyst-toolbox/catalyst-toolbox+build/catalyst-toolbox /app/catalyst-toolbox - COPY ../../src/voting-tools-rs+build/snapshot_tool /app/snapshot_tool + COPY entry.sh /app + RUN chmod +x /app/entry.sh ENV PATH=/app:$PATH diff --git a/services/voting-node/pyproject.toml b/services/voting-node/pyproject.toml index 7d95655e78..2ce67b5192 100644 --- a/services/voting-node/pyproject.toml +++ b/services/voting-node/pyproject.toml @@ -4,7 +4,7 @@ version = "0.0.1" description = "" authors = ["Catalyst Core Developers "] license = "MIT or Apache License 2.0" -readme = "development.md" +readme = "readme.md" packages = [{include = "voting_node"}] [build-system]