XThomasBU commited on
Commit
6d87df4
1 Parent(s): 33adc14

code quality checks added

Browse files
.flake8 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [flake8]
2
+ max-line-length = 88
3
+ extend-ignore = E203, E266, E501, W503
.github/workflows/code_quality_check.yml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Code Quality and Security Checks
2
+
3
+ on:
4
+ push:
5
+ branches: [ main]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ code-quality:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: '3.11'
19
+
20
+ - name: Install dependencies
21
+ run: |
22
+ python -m pip install --upgrade pip
23
+ pip install flake8 black bandit
24
+
25
+ - name: Run Black
26
+ run: black --check .
27
+
28
+ - name: Run Flake8
29
+ run: flake8 .
30
+
31
+ - name: Run Bandit
32
+ run: |
33
+ bandit -r .
.gitignore CHANGED
@@ -2,12 +2,11 @@
2
  **/private/students.json
3
  .ragatouille/*
4
  */__pycache__/*
5
- .chainlit/translations/
6
- code/.chainlit/translations/
7
  storage/logs/*
8
  vectorstores/*
9
  **/apps/*/storage/logs/*
10
  **/apps/*/private/*
11
  *.log
12
  **/.files/*
13
- .env
 
2
  **/private/students.json
3
  .ragatouille/*
4
  */__pycache__/*
5
+ **/.chainlit/translations/*
 
6
  storage/logs/*
7
  vectorstores/*
8
  **/apps/*/storage/logs/*
9
  **/apps/*/private/*
10
  *.log
11
  **/.files/*
12
+ .env
pyproject.toml ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [tool.black]
2
+ line-length = 88