From f6868b024f99c88df5446fbaf15c368a08f02a2a Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sun, 17 Mar 2024 00:11:11 -0600 Subject: [PATCH] [fix] Pre-commit CI --- .gitignore | 2 ++ .gitlab-ci.yml | 6 ++---- pyproject.toml | 2 +- requirements.precommit.txt | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 requirements.precommit.txt diff --git a/.gitignore b/.gitignore index a0ea6ff..bd2eb0a 100644 --- a/.gitignore +++ b/.gitignore @@ -146,6 +146,8 @@ config.yaml # VSCode .vscode/ +.ruff_cache/ + # Custom NAFF versions naff/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2b7283f..e5b5b10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,11 +2,9 @@ precommit: stage: test image: python:3.12-bookworm before_script: - - apt update && apt install -y --no-install-recommends git + - apt-get update && apt-get install -y --no-install-recommends git script: - - pip install poetry - - poetry install - - source `poetry env info --path`/bin/activate + - pip install -r requirements.precommit.txt - pre-commit run --all-files rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' diff --git a/pyproject.toml b/pyproject.toml index 4945494..5fcdd60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ erapi = { git = "https://git.zevaryx.com/zevaryx-technologies/erapi.git" } pydantic-settings = "^2.2.1" [tool.poetry.group.dev.dependencies] -pre-commit = "^2.21.0" +pre-commit = "^3.6.2" pandas = "^1.5.3" black = "^23.1.0" diff --git a/requirements.precommit.txt b/requirements.precommit.txt new file mode 100644 index 0000000..ec8094b --- /dev/null +++ b/requirements.precommit.txt @@ -0,0 +1 @@ +pre-commit==3.6.2 \ No newline at end of file