Skip to content

Commit

Permalink
Merge pull request #188 from microsoft/Pylint-Pipeline
Browse files Browse the repository at this point in the history
feat: Pipeline
  • Loading branch information
UtkarshMishra-Microsoft authored Dec 20, 2024
2 parents 7e71599 + 2539fce commit e9bfb0e
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 13 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,10 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r ClientAdvisor/App/requirements.txt
- name: Run flake8
run: flake8 --config=ClientAdvisor/App/.flake8 ClientAdvisor/App
pip install -r ResearchAssistant/App/requirements.txt
- name: Run flake8 and pylint
run: |
flake8 --config=ClientAdvisor/App/.flake8 ClientAdvisor/App
pylint --rcfile=ClientAdvisor/App/.pylintrc ClientAdvisor/App
flake8 --config=ResearchAssistant/App/.flake8 ResearchAssistant/App
pylint --rcfile=ResearchAssistant/App/.pylintrc ResearchAssistant/App
4 changes: 2 additions & 2 deletions ClientAdvisor/App/.flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
max-line-length = 88
extend-ignore = E501, E203
exclude = .venv, frontend,
extend-ignore = E501, E203, W503, G004, G200
exclude = .venv, frontend
42 changes: 42 additions & 0 deletions ClientAdvisor/App/.pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[MASTER]
ignore=tests,.venv, frontend ; Ignore the tests folder globally.

[MESSAGES CONTROL]
disable=
invalid-name,
line-too-long,
missing-function-docstring,
missing-class-docstring,
missing-module-docstring,
redefined-outer-name,
broad-exception-raised,
broad-exception-caught,
too-many-arguments,
too-many-locals,
too-many-return-statements,
too-many-branches,
unused-argument,
unspecified-encoding,
logging-fstring-interpolation,
missing-timeout,
no-else-return,
redefined-builtin,
global-statement,
no-name-in-module,
no-member,
pointless-string-statement,
unnecessary-comprehension,
fixme,
too-many-instance-attributes,
# too-many-positional-arguments,
raise-missing-from,
import-outside-toplevel,
no-value-for-parameter,
parse-error

[TYPECHECK]
generated-members=get_bearer_token_provider

[FORMAT]
max-module-lines=1700 # Allow large modules up to 1700 lines
max-line-length=160 # Allow lines up to 160 characters
11 changes: 10 additions & 1 deletion ClientAdvisor/App/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Core requirements
azure-identity==1.15.0
# Flask[async]==2.3.2
openai==1.55.3
Expand All @@ -12,9 +13,17 @@ gunicorn==20.1.0
quart-session==3.0.0
pymssql==2.3.0
httpx==0.28.0

# Linting and formatting tools
flake8==7.1.1
flake8-logging-format==0.9.0
black==24.8.0
autoflake==2.3.1
isort==5.13.2
pylint==2.15.10
astroid==2.12.13

# Testing tools
pytest>=8.2,<9 # Compatible version for pytest-asyncio
pytest-asyncio==0.24.0
pytest-cov==5.0.0
pytest-cov==5.0.0
4 changes: 2 additions & 2 deletions ResearchAssistant/App/.flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
max-line-length = 88
extend-ignore = E501, E203
exclude = .venv, frontend,
extend-ignore = E501, E203, G004
exclude = .venv, frontend
40 changes: 40 additions & 0 deletions ResearchAssistant/App/.pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[MASTER]
ignore=tests, .venv, frontend ; Ignore the tests folder globally.

[MESSAGES CONTROL]
disable=
invalid-name, # C0103: Ignore naming style errors
line-too-long, # C0301: Ignore long lines
missing-function-docstring, # C0116: Ignore missing function docstrings
missing-class-docstring, # C0115: Ignore missing class docstrings
missing-module-docstring, # C0114: Ignore missing module docstrings
redefined-outer-name, # W0621: Ignore redefined variables warnings
broad-exception-raised, # W0719: Ignore broad exception raised warnings
broad-exception-caught, # W0718: Ignore broad exception caught warnings
too-many-arguments, # R0913: Ignore too many arguments
too-many-locals, # R0914: Ignore too many local variables
too-many-return-statements, # R0911: Ignore too many return statements
too-many-statements, # R0915: Ignore too many statements in a function
too-many-branches, # R0912: Ignore too many branches
unused-argument, # W0613: Ignore unused arguments
unspecified-encoding, # W1514: Ignore unspecified encoding in open()
logging-fstring-interpolation, # W1203: Ignore lazy f-string interpolation
missing-timeout, # W3101: Ignore missing timeout in requests.get
no-else-return, # R1705: Ignore unnecessary 'else' after return
redefined-builtin, # W0622: Ignore redefining built-ins
global-statement, # W0603: Ignore global statement usage
no-name-in-module, # E0611: Ignore unresolved module names
no-member, # E1101: Ignore module has no 'member'
pointless-string-statement, # W0105: Ignore pointless string statements
unnecessary-comprehension, # R1721: Ignore unnecessary comprehensions
simplifiable-if-expression, # R1719: Ignore simplifiable if expressions
dangerous-default-value, # W0102: Ignore mutable default arguments
consider-using-with, # R1732: Ignore using 'with' for file or resource management
parse-error

[TYPECHECK]
generated-members=get_bearer_token_provider

[FORMAT]
max-module-lines=1700 # Allow large modules up to 1700 lines
max-line-length=160 # Allow lines up to 160 character
27 changes: 21 additions & 6 deletions ResearchAssistant/App/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
azure-identity==1.14.0
Flask==3.0.0
openai==1.6.1
# Core requirements
azure-identity==1.15.0
# Flask[async]==2.3.2
openai==1.55.3
azure-search-documents==11.4.0b6
azure-storage-blob==12.17.0
python-dotenv==1.0.0
azure-cosmos==4.5.0
pytest-asyncio==0.24.0
pytest-cov==5.0.0
quart==0.19.9
uvicorn==0.24.0
aiohttp==3.9.2
gunicorn==20.1.0
quart-session==3.0.0
pymssql==2.3.0
httpx==0.28.0

# Linting and formatting tools
flake8==7.1.1
flake8-logging-format==0.9.0
black==24.8.0
autoflake==2.3.1
isort==5.13.2
isort==5.13.2
pylint==2.17.4

# Testing tools
pytest>=8.2,<9 # Compatible version for pytest-asyncio
pytest-asyncio==0.24.0
pytest-cov==5.0.0

0 comments on commit e9bfb0e

Please sign in to comment.