Skip to content

Commit

Permalink
Run poetry check as part of pre-commit (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
moshemorad authored Jan 8, 2025
1 parent 3335f7a commit 57c13b5
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 45 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/test-poetry-lock.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/test_robusta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ name: Test robusta with pytest
on: [push, pull_request, workflow_dispatch]

jobs:
check:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]

run_tests:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
58 changes: 34 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
args: [--config=pyproject.toml]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
- repo: https://github.com/python-poetry/poetry
rev: 1.8.5
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: poetry-check
- id: poetry-lock
pass_filenames: false
args:
- --no-update

# - repo: https://github.com/ambv/black
# rev: 22.3.0
# hooks:
# - id: black
# language_version: python3
# args: [--config=pyproject.toml]

- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
# - repo: https://github.com/pre-commit/pre-commit-hooks
# rev: v3.3.0
# hooks:
# - id: trailing-whitespace
# - id: end-of-file-fixer

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
args: [--config=.flake8]
# - repo: https://github.com/MarcoGorelli/absolufy-imports
# rev: v0.3.1
# hooks:
# - id: absolufy-imports

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--settings-path=pyproject.toml]
# - repo: https://github.com/pycqa/flake8
# rev: 5.0.4
# hooks:
# - id: flake8
# args: [--config=.flake8]

# - repo: https://github.com/pycqa/isort
# rev: 5.12.0
# hooks:
# - id: isort
# args: [--settings-path=pyproject.toml]

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.790
Expand Down
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ types-toml = "^0.10.2"
types-tabulate = "^0.8.10"

[tool.poetry.extras]
all = ["Flask", "grafana-api", "watchdog", "dulwich", "better-exceptions", "CairoSVG", "tabulate", "kafka-python", "prometheus-api-client", "supabase", "datadog-api-client", "tinycss", "cssselect", "rsa", "sentry-sdk", "poetry-core"]
all = ["Flask", "grafana-api", "watchdog", "better-exceptions", "CairoSVG", "tabulate", "kafka-python", "prometheus-api-client", "supabase", "datadog-api-client", "sentry-sdk", "poetry-core"]

[tool.poetry.group.dev.dependencies]
sphinx-jinja = { git = "https://github.com/robusta-dev/sphinx-jinja.git" }
Expand Down

0 comments on commit 57c13b5

Please sign in to comment.