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/add code quality #110

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9c3e9e0
Add code quality workflow
UtkarshMishra-Microsoft Dec 3, 2024
0ab2c15
Add code quality workflow changes
UtkarshMishra-Microsoft Dec 3, 2024
c6b435e
Add code quality workflow in app
UtkarshMishra-Microsoft Dec 3, 2024
188f50a
Add code quality workflow in flask
UtkarshMishra-Microsoft Dec 3, 2024
0dd3d92
Add code quality workflow in flask8
UtkarshMishra-Microsoft Dec 3, 2024
a1f8898
Add code quality workflow in app.py
UtkarshMishra-Microsoft Dec 3, 2024
4d22598
fic formatting and import order for app.py
UtkarshMishra-Microsoft Dec 3, 2024
06c5b09
fix pipeline
UtkarshMishra-Microsoft Dec 3, 2024
20f5b41
fix black formatting
UtkarshMishra-Microsoft Dec 3, 2024
b5eb5bf
fix black formatting
UtkarshMishra-Microsoft Dec 3, 2024
4bbc335
fix black formatting
UtkarshMishra-Microsoft Dec 3, 2024
414fd22
Testing
UtkarshMishra-Microsoft Dec 4, 2024
e2e86b4
Testing2
UtkarshMishra-Microsoft Dec 4, 2024
9371b70
Testing3
UtkarshMishra-Microsoft Dec 4, 2024
584f253
Testin4
UtkarshMishra-Microsoft Dec 4, 2024
ed94f51
Testi5
UtkarshMishra-Microsoft Dec 4, 2024
9bc0aa4
Testi5
UtkarshMishra-Microsoft Dec 4, 2024
780889a
Merge branch 'main' into feature/add-code-quality
UtkarshMishra-Microsoft Dec 4, 2024
e39044e
Test6
UtkarshMishra-Microsoft Dec 4, 2024
74eaccc
Test7
UtkarshMishra-Microsoft Dec 4, 2024
cd7b81e
Test8
UtkarshMishra-Microsoft Dec 4, 2024
7357038
Test8
UtkarshMishra-Microsoft Dec 5, 2024
234a600
Test9
UtkarshMishra-Microsoft Dec 5, 2024
b547ecb
Test10
UtkarshMishra-Microsoft Dec 5, 2024
8d4f375
test9
UtkarshMishra-Microsoft Dec 5, 2024
a416d5a
test10
UtkarshMishra-Microsoft Dec 5, 2024
1080115
test11
UtkarshMishra-Microsoft Dec 5, 2024
cbaf106
test12
UtkarshMishra-Microsoft Dec 5, 2024
edc3f19
test13
UtkarshMishra-Microsoft Dec 5, 2024
f22ed43
test14
UtkarshMishra-Microsoft Dec 5, 2024
c02c548
test15
UtkarshMishra-Microsoft Dec 5, 2024
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
13 changes: 13 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[flake8]
max-line-length = 120
exclude = .venv, _pycache_, migrations, build, dist
ignore =
F401
F841
W293
E501
E722
W503
F811
E266
F541
35 changes: 35 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Code Quality Workflow

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]

steps:
# Step 1: Checkout code
- name: Checkout code
uses: actions/checkout@v4

# Step 2: Set up Python environment
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

# Step 3: Run all code quality checks
- name: Run Code Quality Checks
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
echo "Fixing imports with Isort..."
python -m isort --verbose .
echo "Formatting code with Black..."
python -m black --verbose .
echo "Running Flake8..."
python -m flake8 --config=.flake8 --verbose . || true
echo "Running Pylint..."
python -m pylint --rcfile=.pylintrc --verbose . || true
34 changes: 34 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[MASTER]
ignore=__init__.py,__pycache__, .vscode, .github


[MESSAGES CONTROL]
# Retain your disabled warnings and errors
disable=
missing-docstring, # Missing docstrings
invalid-name, # Variable names not in snake_case
too-many-arguments, # Exceeding argument limits
too-many-locals, # Exceeding local variable limits
too-many-branches, # Complex functions
too-many-lines, # Exceeding file line limit
import-error, # Ignored unresolved imports
no-name-in-module, # Missing module names
broad-exception-raised, # Avoid broad exceptions
redefined-outer-name, # Outer variable shadowing
no-else-return, # Remove unnecessary else
unused-import, # Unused imports

[FORMAT]
# Set the maximum line length
max-line-length=120

[DESIGN]
# Adjust thresholds for warnings
max-args=10
max-locals=30
max-branches=20
max-statements=100

[LOGGING]
# Disable logging format errors
logging-format-style=old
Loading
Loading