Skip to content

Commit

Permalink
Wip/linting hooks (#43)
Browse files Browse the repository at this point in the history
* add minimal pyproject.yaml to configure tools
* modern pip will stop supporting installation in editable mode of a git url source
* comment out ignores
* add linter workflow
* update ruff output format
  • Loading branch information
msherman64 authored Jan 13, 2025
1 parent 272f2da commit a8b78d3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: push
jobs:
linting:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip install ruff
- run: ruff check --output-format=github .
28 changes: 28 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[build-system]
requires = ["pbr>=6.0.0", "setuptools>=64.0.0"]
build-backend = "pbr.build"

[tool.ruff]
line-length = 79

[tool.ruff.lint]
select = [
"E", # pycodestyle (error)
"F", # pyflakes
"G", # flake8-logging-format
"LOG", # flake8-logging
]


ignore = [
"E501", # line too long
# "G002", # Logging statement uses `%`
# "G004", # logging statement uses f-string
# "E741", # Ambiguous variable name
# "F401", # imported but unused
]

[tool.ruff.lint.per-file-ignores]
"blazar_dashboard/test/settings.py" = [
# "F405", #HORIZON_CONFIG` may be undefined, or defined from star imports
]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
#
# PBR should always appear first
pbr!=2.1.0,>=2.0.0 # Apache-2.0
-e git+https://github.com/ChameleonCloud/python-blazarclient.git@chameleoncloud/2023.1#egg=python_blazarclient
git+https://github.com/ChameleonCloud/python-blazarclient.git@chameleoncloud/2023.1#egg=python_blazarclient
horizon>=17.1.0 # Apache-2.0

0 comments on commit a8b78d3

Please sign in to comment.