Make poetry install manual and provide user with install instructions (#818)

* Add install instructions for poetry

* Update ci

* Move poetry before docker pull

* Added link
This commit is contained in:
Graham Neubig
2024-04-06 12:38:12 -04:00
committed by GitHub
parent 49f3665a99
commit 8f097f8643
2 changed files with 10 additions and 2 deletions

View File

@@ -13,5 +13,6 @@ jobs:
python-version: '3.11'
- name: Run tests
run: |
curl -sSL https://install.python-poetry.org | python3 -
make build
poetry run pytest ./tests

View File

@@ -54,10 +54,17 @@ build:
echo "$(RED)Docker is not installed. Please install Docker to continue.$(RESET)"; \
exit 1; \
fi
@echo "$(GREEN)Installing Python dependencies...$(RESET)"
@if command -v poetry > /dev/null; then \
echo "$(BLUE)Poetry is already installed.$(RESET)"; \
else \
echo "$(YELLOW)Poetry is not installed. You can install poetry by running the following command, then adding Poetry to your PATH:"; \
echo "$(YELLOW) curl -sSL https://install.python-poetry.org | python3 -$(RESET)"; \
echo "$(YELLOW)More detail here: https://python-poetry.org/docs/#installing-with-the-official-installer$(RESET)"; \
exit 1; \
fi
@echo "$(GREEN)Pulling Docker image...$(RESET)"
@docker pull $(DOCKER_IMAGE)
@echo "$(GREEN)Installing Python dependencies...$(RESET)"
@curl -sSL https://install.python-poetry.org | python3 -
@poetry install --without evaluation
@echo "$(GREEN)Activating Poetry shell...$(RESET)"
@echo "$(GREEN)Setting up frontend environment...$(RESET)"