Skip to content
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

Feature/melhorias feedback #5

Merged
merged 2 commits into from
Sep 26, 2024
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
14 changes: 3 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Define o diretório do ambiente virtual
VENV_DIR = venv
VENV_DIR = .venv

# Define o nome do comando para o Python
PYTHON = python3
Expand All @@ -25,18 +25,17 @@ venv:
echo "A pasta temporaria do dvc já existe."; \
fi

## Atualiza as dependências no poetry, útil quando alterar bibliotecas em pyproject.toml
.PHONY: install-poetry
install-poetry: venv
@echo "Instalando o Poetry..."
$(VENV_DIR)/bin/pip install poetry
$(VENV_DIR)/bin/poetry config virtualenvs.in-project true


.PHONY: install-dependencies
install-dependencies: install-poetry
@echo "Instalando dependências com o Poetry..."
$(VENV_DIR)/bin/poetry lock
$(VENV_DIR)/bin/poetry install --no-root
$(VENV_DIR)/bin/poetry install

.PHONY: install-pre-commit
install-pre-commit: install-dependencies
Expand All @@ -60,13 +59,6 @@ clean:
@echo "Removendo o ambiente virtual..."
rm -rf $(VENV_DIR)

## Atualiza as dependências no poetry, útil quando alterar bibliotecas em pyproject.toml
.PHONY: update
update:
@echo "Atualizando pacotes com poetry"
$(VENV_DIR)/bin/poetry lock
$(VENV_DIR)/bin/poetry install --no-root

## Lint usando ruff (use `make format` para formatação)
.PHONY: lint
lint:
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,8 @@ O projeto inclui um Makefile para facilitar o gerenciamento do ambiente e das de
- **make clean**: Remove o ambiente virtual e desinstala o pre-commit.
- **make update**: Atualiza as dependências do Poetry.
- **make lint**: Executa o lint no código-fonte com o Ruff.
- **make format**: Formata o código-fonte com o Ruff.
- **make format**: Formata o código-fonte com o Ruff.

## Boas Práticas para Commits com Pré-commit

- Durante o commit, o Pré-commit verifica e corrige a formatação do código, mas não inclui essas alterações automaticamente no commit. É necessário executar `git add` novamente para registrar essas modificações. O Git não faz isso automaticamente para que você tenha controle total sobre o que será comitado.