Skip to content

Commit

Permalink
doc: pdoc target outputs to local path, add earthlyignore
Browse files Browse the repository at this point in the history
  • Loading branch information
saibatizoku committed Aug 22, 2023
1 parent 58047df commit 58648f4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
6 changes: 6 additions & 0 deletions services/voting-node/.earthlyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*egg-info/
build/
dist/
__pycache__/
.ruff-cache/
doc/
1 change: 1 addition & 0 deletions services/voting-node/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tempo-data/
*egg-info/
build/
doc/
22 changes: 11 additions & 11 deletions services/voting-node/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -92,25 +92,25 @@ 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

# Copy the distribution wheels from the build stage
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

Expand Down
2 changes: 1 addition & 1 deletion services/voting-node/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.0.1"
description = ""
authors = ["Catalyst Core Developers <dev@iohk.io>"]
license = "MIT or Apache License 2.0"
readme = "development.md"
readme = "readme.md"
packages = [{include = "voting_node"}]

[build-system]
Expand Down

0 comments on commit 58648f4

Please sign in to comment.