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

Demo 4 PR into Main #238

Merged
merged 397 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
397 commits
Select commit Hold shift + click to select a range
9351042
Component Test
Yeshlen Sep 25, 2024
7ee6911
background
u21598012 Sep 25, 2024
a4e664e
fixed NER
u21598012 Sep 26, 2024
e67b47c
mock functionality
u21598012 Sep 26, 2024
9e3c65d
fixed normalization
u21598012 Sep 26, 2024
4aa23e5
changed metric
u21598012 Sep 26, 2024
9088220
updated logic
u21598012 Sep 26, 2024
cd23320
updated reqs
u21598012 Sep 26, 2024
071f76a
Merge branch 'develop' of https://github.com/COS301-SE-2024/GDPR-data…
u21598012 Sep 26, 2024
555fb37
bug fixes
u21598012 Sep 26, 2024
b1226c7
Merge pull request #206 from COS301-SE-2024/frontend/editing-faq-page
paul-nhlapo Sep 26, 2024
074545e
Paths Update: Report Gen
Yeshlen Sep 26, 2024
19cdc40
Merge branch 'feature/outlook_monitor' of https://github.com/COS301-S…
Yeshlen Sep 26, 2024
b7e3239
Delete gnd-admin/src/environments directory
paul-nhlapo Sep 26, 2024
702e955
Paths Update: Biometric and NER (hopefully)
Yeshlen Sep 26, 2024
313d2e9
Paths Update: Most of DC and DP
Yeshlen Sep 26, 2024
d498695
merged
u21598012 Sep 26, 2024
705bb88
merged package
u21598012 Sep 26, 2024
9091d84
Outlook Dates and API edit
Yeshlen Sep 26, 2024
6148c78
Updating the visualization page
Nevin-Thomas Sep 26, 2024
2227458
Updating visualization page
Nevin-Thomas Sep 26, 2024
6390424
Updating visualization page
Nevin-Thomas Sep 26, 2024
7f7dcab
Backend Folder Paths and UI Fixes
Yeshlen Sep 26, 2024
73298db
Visualization update
Nevin-Thomas Sep 26, 2024
bc887b7
RAG db on huggingface
u21598012 Sep 26, 2024
a0e6ba0
Okay I can now send the data to supabase
paul-nhlapo Sep 26, 2024
9314131
Update visualization styling
Nevin-Thomas Sep 26, 2024
d5b8899
Now I have all the fields I want
paul-nhlapo Sep 26, 2024
9c9c1ec
Updated the layout style
Nevin-Thomas Sep 26, 2024
8b990dc
I have all the fields now
paul-nhlapo Sep 26, 2024
66c38bc
edited
Yudi-G Sep 26, 2024
b46e35e
everything works now
paul-nhlapo Sep 26, 2024
de84bbb
All things check out
paul-nhlapo Sep 26, 2024
970dcb5
changed watcher file
Yudi-G Sep 26, 2024
93f034d
modified api with start download monitor|
Yudi-G Sep 26, 2024
ff7ee8b
API uses local folders
Yeshlen Sep 26, 2024
c597829
import changes
u21598012 Sep 26, 2024
20e06dc
everything needed to be done
paul-nhlapo Sep 26, 2024
07009ab
Visualization styling
Nevin-Thomas Sep 26, 2024
c67a1eb
integrated outlook monitor
u21598012 Sep 26, 2024
45711c8
outlook updates
u21598012 Sep 26, 2024
0489a1c
Styling visualization
Nevin-Thomas Sep 26, 2024
e57dfc2
edited ts file for frontend
Yudi-G Sep 26, 2024
75e07af
integrated to website
u21598012 Sep 26, 2024
03ed030
edited filewatcher
Yudi-G Sep 26, 2024
90014ba
updated total
u21598012 Sep 26, 2024
f4ac512
fixed totals
u21598012 Sep 26, 2024
4c378ba
integrated file monitor
u21598012 Sep 26, 2024
c18db4d
updated for file monitor
u21598012 Sep 26, 2024
bb273ff
terminated original file monitor
u21598012 Sep 26, 2024
0a1aa0d
file monitor changes
u21598012 Sep 26, 2024
3d4c79a
uncommented lines
u21598012 Sep 26, 2024
d83488a
Fixing the styling of the how the dashboard looks
paul-nhlapo Sep 26, 2024
0c25e95
fixing
paul-nhlapo Sep 26, 2024
497838d
just adding styling
paul-nhlapo Sep 27, 2024
667b7f4
I love this color more
paul-nhlapo Sep 27, 2024
7aa6a95
Need to continue in the morning
paul-nhlapo Sep 27, 2024
903046c
back implemented for data viz
u21598012 Sep 27, 2024
1999468
Merge branch 'integration/RAG' of https://github.com/COS301-SE-2024/G…
Nevin-Thomas Sep 27, 2024
78c3f85
Login page error handling now is working properly
paul-nhlapo Sep 27, 2024
cb23f9a
code clean up
paul-nhlapo Sep 27, 2024
1837f35
Error message dialogs
paul-nhlapo Sep 27, 2024
da2cf4b
Register error messages dialogues
paul-nhlapo Sep 27, 2024
69523ad
It does not serve any purpose at the moment
paul-nhlapo Sep 27, 2024
998260b
User now cannot use the app logo to go home when logged in
paul-nhlapo Sep 27, 2024
71ea1a3
Giving users some information about GDPR
paul-nhlapo Sep 27, 2024
f35ed63
Looks much better now
paul-nhlapo Sep 27, 2024
db9ea02
code clean up
paul-nhlapo Sep 27, 2024
978b46c
code cleanup
paul-nhlapo Sep 27, 2024
76015f5
Reactive and dynamic navbar
paul-nhlapo Sep 27, 2024
a7222c8
code cleanup
paul-nhlapo Sep 27, 2024
d3cf73d
Footer now in place
paul-nhlapo Sep 27, 2024
3ffc084
hooks
u21598012 Sep 27, 2024
c95aa92
fixing the functions on the dashboad
paul-nhlapo Sep 27, 2024
5bd7ad3
Update Styling visualization
Nevin-Thomas Sep 27, 2024
9c6602f
All the functions are now working dynamically
paul-nhlapo Sep 27, 2024
711716b
Fixing how other components look
paul-nhlapo Sep 27, 2024
91f3baa
Fixing the timestamp look and feel
paul-nhlapo Sep 27, 2024
7745906
Update visualization
Nevin-Thomas Sep 27, 2024
c509f48
Fixing minor things
paul-nhlapo Sep 27, 2024
254bd90
updates
u21598012 Sep 27, 2024
e2ccf61
Adding all the categories in their charts
paul-nhlapo Sep 27, 2024
7995f0d
Making it the changes needed
paul-nhlapo Sep 27, 2024
30a6cb0
Updated styling/visualization
Nevin-Thomas Sep 27, 2024
bf2c80c
All the categories have graphs now
paul-nhlapo Sep 27, 2024
9085821
Paths: Biometric
Yeshlen Sep 27, 2024
5a304e9
code cleanup
paul-nhlapo Sep 27, 2024
26b91f9
Paths: Biometric
Yeshlen Sep 27, 2024
9f7c4ca
code cleanup
paul-nhlapo Sep 27, 2024
82015ad
Paths: BiometricV2
Yeshlen Sep 27, 2024
841406c
back button fixes
u21598012 Sep 27, 2024
6b7c92d
Making changes to home page
paul-nhlapo Sep 27, 2024
7eade0a
changes on the html file
paul-nhlapo Sep 27, 2024
327ae27
Fixed the styling
paul-nhlapo Sep 27, 2024
171db4f
Added Toasts
Yeshlen Sep 27, 2024
7591bcf
Code cleanup
paul-nhlapo Sep 27, 2024
0900535
Code cleanup
paul-nhlapo Sep 27, 2024
5b70ab2
map changes
u21598012 Sep 27, 2024
18fcb0d
Merge branch 'integration/merging' of https://github.com/COS301-SE-20…
u21598012 Sep 27, 2024
4a0fabe
updated image report
u21598012 Sep 27, 2024
0ac1169
updated reqs
u21598012 Sep 27, 2024
633c250
final push
paul-nhlapo Sep 27, 2024
67e9add
just added the supabase to the requirements.txt
paul-nhlapo Sep 27, 2024
dafb395
Font Changes
Yeshlen Sep 27, 2024
628e17c
NER Fix - Underscore
Yeshlen Sep 27, 2024
2d1c0cf
Everything needed for safe hosting
paul-nhlapo Sep 27, 2024
3b5e43d
Merge pull request #214 from COS301-SE-2024/storing_reports
paul-nhlapo Sep 27, 2024
162eb93
added secrets to python app yaml
Yudi-G Sep 27, 2024
fc1b174
Merge pull request #216 from COS301-SE-2024/tests/secrets
Yudi-G Sep 27, 2024
b871b49
added downloads page styling
Yudi-G Sep 27, 2024
ab67f7d
File Monitor Fix
Yeshlen Sep 27, 2024
8bec2ad
Outlook Inbox UI Updates
Yeshlen Sep 28, 2024
96c58b2
Frontend UI Fixes
Yeshlen Sep 28, 2024
9fc510b
More UI Changes and Requirements Fix
Yeshlen Sep 28, 2024
a4d5b9d
len change
u21598012 Sep 28, 2024
6477d1c
Add production build step to package.json
paul-nhlapo Sep 28, 2024
3b9d293
Edited app's scroll bars
Yeshlen Sep 28, 2024
03e5238
Rag Score shows
Yeshlen Sep 28, 2024
f1bed73
Rag UI Edits
Yeshlen Sep 28, 2024
11759f7
Seeing if everything works fine now or what?
paul-nhlapo Sep 28, 2024
43407e0
pulled changes
u21598012 Sep 28, 2024
e1d4171
semantic changes
u21598012 Sep 28, 2024
c43a71f
Merge branch 'integration/merging' of https://github.com/COS301-SE-20…
u21598012 Sep 28, 2024
fbfde7e
annotation component
u21598012 Sep 28, 2024
f31854b
updated reqs
u21598012 Sep 28, 2024
c02f3a9
routing and service updates
u21598012 Sep 28, 2024
f4bb128
Reverted to working changes
paul-nhlapo Sep 28, 2024
066f8ae
annotation integration
u21598012 Sep 28, 2024
fd51957
Report Generation for Frontend
Yeshlen Sep 28, 2024
2693c47
Merge branch 'integration/merging' of https://github.com/COS301-SE-20…
Yeshlen Sep 28, 2024
1985d73
integration works now
u21598012 Sep 28, 2024
c9ab334
Merge branch 'integration/merging' of https://github.com/COS301-SE-20…
u21598012 Sep 28, 2024
8b78c81
positioning
u21598012 Sep 28, 2024
cd3777b
updated reqs
u21598012 Sep 28, 2024
bca01c4
terms and conditions component
paul-nhlapo Sep 28, 2024
1ee4f45
Need to give it logic and give it styling
paul-nhlapo Sep 28, 2024
87522f0
fixed the issue
paul-nhlapo Sep 28, 2024
03a0c1b
Progress
paul-nhlapo Sep 28, 2024
02345e1
progress
paul-nhlapo Sep 28, 2024
360aef3
basic encryption
u21598012 Sep 28, 2024
124c6f5
Revert "basic encryption"
u21598012 Sep 28, 2024
caed2a6
Merge pull request #223 from COS301-SE-2024/storing_reports
paul-nhlapo Sep 28, 2024
a97c97c
working version
paul-nhlapo Sep 29, 2024
5978830
code cleanup
paul-nhlapo Sep 29, 2024
c70531e
terms of use finished
paul-nhlapo Sep 29, 2024
e0b87ca
All good now
paul-nhlapo Sep 29, 2024
9224b31
Merge pull request #224 from COS301-SE-2024/storing_reports
paul-nhlapo Sep 29, 2024
f4c2c4f
All done. Tests are the remaining thing now
paul-nhlapo Sep 29, 2024
fb6b259
Merge pull request #225 from COS301-SE-2024/storing_reports
paul-nhlapo Sep 29, 2024
8d24723
encryption working
u21598012 Sep 29, 2024
d7fa0e4
fixed frontend agnostic
u21598012 Sep 29, 2024
c5aada1
removed xls
u21598012 Sep 29, 2024
3d9b589
edits
Yudi-G Sep 29, 2024
f9f7a97
File Watcher- Please work
Yeshlen Sep 29, 2024
513a0fe
File Monitor - Please work now
Yeshlen Sep 29, 2024
4aea0fb
file monitor fixed
u21598012 Sep 29, 2024
1fe2bf8
File Monitor - please, please work
Yeshlen Sep 29, 2024
6d6f43c
merged
u21598012 Sep 29, 2024
3dc1d2b
adjusted endpoints
u21598012 Sep 29, 2024
f81f80a
merged
u21598012 Sep 29, 2024
e8b3875
Merge branch 'integration/merging-teams' of https://github.com/COS301…
u21598012 Sep 29, 2024
449f008
integrated teams fix
u21598012 Sep 29, 2024
dc63052
Report Generation for Inboxes
Yeshlen Sep 29, 2024
0da7a6f
Merge branch 'integration/merging-teams' of https://github.com/COS301…
Yeshlen Sep 29, 2024
24787df
removed pyc
u21598012 Sep 29, 2024
6a66a89
merged
u21598012 Sep 29, 2024
61d28db
Error Handling for Uploads
Yeshlen Sep 29, 2024
55c8680
edited biometric detection counter
Yudi-G Sep 29, 2024
43d0ccf
pulled from encryption
u21598012 Sep 29, 2024
a928771
Disclaimer
Yeshlen Sep 29, 2024
b7c4c63
updated reqs
u21598012 Sep 29, 2024
f55c58f
clearing all from uploads
Yudi-G Sep 29, 2024
79212e0
Requirements
Yeshlen Sep 29, 2024
4081a7a
Merge branch 'integration/encryption-burn' of https://github.com/COS3…
u21598012 Sep 29, 2024
014a98e
Merge branch 'develop' into integration/encryption
paul-nhlapo Sep 29, 2024
2a79dd7
Merge pull request #226 from COS301-SE-2024/integration/encryption
paul-nhlapo Sep 29, 2024
78d1aba
requirements.txt fix
Yeshlen Sep 29, 2024
61b35d8
display test
Yudi-G Sep 29, 2024
b7f6382
filewatcher test
Yudi-G Sep 29, 2024
a8bd07e
removed pycache
Yudi-G Sep 29, 2024
b70ee3b
Merge branch 'tests/backendtests' into tests/codecov
Yudi-G Sep 29, 2024
79973ad
Merge pull request #227 from COS301-SE-2024/tests/codecov
Yudi-G Sep 29, 2024
2c29d9e
modified codecov in python yaml
Yudi-G Sep 29, 2024
719021c
created backendt_tests folder
Yudi-G Sep 29, 2024
5b986fc
Tests - attachment_retrieval
Yeshlen Sep 29, 2024
40877f7
added tests
Yudi-G Sep 29, 2024
492e674
Tests - uploads-monitor
Yeshlen Sep 29, 2024
12a1ada
added tests
Yudi-G Sep 29, 2024
fca617b
added tests
Yudi-G Sep 29, 2024
b3612c4
unit test fix
Yeshlen Sep 29, 2024
ad47a72
requirements.txt update
Yeshlen Sep 29, 2024
2d10e1b
landing page unit test
paul-nhlapo Sep 29, 2024
bbdfe1b
2 tests work out of 3 fixing the 3rd one
paul-nhlapo Sep 29, 2024
84f81c7
unit test for term and condition done
paul-nhlapo Sep 29, 2024
6d11439
Merge pull request #229 from COS301-SE-2024/testing/backend-outlook
Yeshlen Sep 29, 2024
83086ec
added tests. rag test
Yudi-G Sep 29, 2024
fa43392
Testing
paul-nhlapo Sep 29, 2024
58a1165
Checking
paul-nhlapo Sep 29, 2024
8efee8e
Update visualization.component.spec.ts
Nevin-Thomas Sep 29, 2024
46341f6
added tests
Yudi-G Sep 29, 2024
48187a4
update to pytest yaml
Yudi-G Sep 29, 2024
fa1a658
Working
paul-nhlapo Sep 29, 2024
66bd4a2
update to req.txt
Yudi-G Sep 29, 2024
63efadc
update to req.txt
Yudi-G Sep 29, 2024
a97e77c
testing
paul-nhlapo Sep 29, 2024
fd9c066
front end finalized
u21598012 Sep 29, 2024
a135a78
frontend finalized
u21598012 Sep 29, 2024
4dbb1cb
Merge branch 'integration/encryption' of https://github.com/COS301-SE…
u21598012 Sep 29, 2024
803498f
Merge pull request #232 from COS301-SE-2024/integration/encryption
Yeshlen Sep 29, 2024
6b569b4
int test fix
Yudi-G Sep 29, 2024
3cb3969
App component unit test
paul-nhlapo Sep 29, 2024
adac1d5
for test purposes
paul-nhlapo Sep 29, 2024
65f62f7
code cleanup
paul-nhlapo Sep 29, 2024
2d83b97
code cleanup
paul-nhlapo Sep 29, 2024
292bc9e
fix of int text
Yudi-G Sep 29, 2024
dc9f965
Inboxes
Yeshlen Sep 29, 2024
50c97c9
requires change to how the app works
paul-nhlapo Sep 29, 2024
43744a2
requires change to how the app works
paul-nhlapo Sep 29, 2024
91f9bfa
requires me to change the app
paul-nhlapo Sep 30, 2024
c2c9cbc
changes
paul-nhlapo Sep 30, 2024
fb57bc6
int test fix'
Yudi-G Sep 30, 2024
95c6ae2
Merge pull request #236 from COS301-SE-2024/webapp_testing
paul-nhlapo Sep 30, 2024
4aa614b
fix
Yudi-G Sep 30, 2024
95fe1c7
merge fixes
Yudi-G Sep 30, 2024
2f50399
python yaml
Yudi-G Sep 30, 2024
599dbd0
removed in yaml
Yudi-G Sep 30, 2024
9e4c248
Anno, Upload
Yeshlen Sep 30, 2024
2e9205a
Merge pull request #230 from COS301-SE-2024/frontend/unit-testing-fro…
paul-nhlapo Sep 30, 2024
98576cb
ReportGen
Yeshlen Sep 30, 2024
0957f6c
requirements fix
Yudi-G Sep 30, 2024
ce6eea8
yaml
Yudi-G Sep 30, 2024
cdf36c1
merged testing/backend
Yudi-G Sep 30, 2024
3613ddd
updated yaml
Yudi-G Sep 30, 2024
8d5cd7e
os system
Yudi-G Sep 30, 2024
057f004
os system
Yudi-G Sep 30, 2024
e5acba2
tests fixes
Yudi-G Sep 30, 2024
79ff895
pythoncom
Yudi-G Sep 30, 2024
db139eb
pythoncom
Yudi-G Sep 30, 2024
10ade9b
pythoncom
Yudi-G Sep 30, 2024
e6eeed2
pythoncom
Yudi-G Sep 30, 2024
b02078e
Merge pull request #237 from COS301-SE-2024/tests/combinedtests
paul-nhlapo Sep 30, 2024
2e87527
Update README.md
Yeshlen Sep 30, 2024
e039c02
Add files via upload
Yeshlen Sep 30, 2024
92baabe
Update README.md
Yeshlen Sep 30, 2024
b51d767
Update README.md
Yeshlen Sep 30, 2024
b944dd2
Update README.md
u21598012 Sep 30, 2024
091efb9
Update README.md
u21598012 Sep 30, 2024
67dcd68
Add files via upload
Yeshlen Sep 30, 2024
87b0dbe
Update README.md
u21598012 Sep 30, 2024
aa541ac
Update README.md
Yeshlen Sep 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file modified .DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions .github/workflows/frontendTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,12 @@ jobs:
- run: |
cd gnd-app
npm test -- --watch=false --browsers=ChromeHeadless

# - name: Generate frontend coverage report
# run: |
# cd gnd-app
# npm run test -- --watch=false --browsers=ChromeHeadless --code-coverage

# - name: Move frontend coverage to backend
# run: |
# mv gnd-app/coverage/lcov.info backend/.coverage.frontend
7 changes: 7 additions & 0 deletions .github/workflows/lint-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_TYPESCRIPT_STANDARD: false
VALIDATE_CHECKOV: false
VALIDATE_GITLEAKS: false
VALIDATE_BASH: false
VALIDATE_BASH_EXEC: false
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_GROOVY: false
VALIDATE_SHELL_SHFMT: false
VALIDATE_ENV: false

# doing this to use the config
run-flake8-lint:
Expand Down
43 changes: 41 additions & 2 deletions .github/workflows/python-app-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,51 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Test with pytest
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
run: |
ls -a
cd backend/backend_tests
pytest --cov=. --cov-report=xml --cov-append
continue-on-error: true

- name: test gnd email monitor
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
run: |
ls -a
cd backend/GND_Email_Monitor
pytest --cov=. --cov-report=xml --cov-append
continue-on-error: true

- name: test document parser
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
run: |
ls -a
cd backend/Document_parser
# cd backend
pytest --cov=. --cov-report=xml
pytest --cov=. --cov-report=xml --cov-append
continue-on-error: true

- name: Move Coverage Files to Root
run: |
mv backend/backend_tests/.coverage backend/.coverage.backend_tests
mv backend/GND_Email_Monitor/.coverage backend/.coverage.GND_Email_Monitor_tests
mv backend/Document_parser/.coverage backend/.coverage.Document_parser_tests

- name: Combine Coverage Reports
run: |
cd backend
coverage combine .coverage.*
coverage xml -o coverage.xml

- name: Integration test
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
run: |
ls -a
cd backend
Expand All @@ -75,4 +113,5 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
files: ./backend/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ obj/
**/__pycache__/
venv/
myenv/
env
.env
**/results/
__pycache__/
.DS_Store
**/.DS_Store
env
.env
.vs/
.pyc
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="https://github.com/COS301-SE-2024/GDPR-data-noncompliance-detector/blob/develop/documentation/headshots/GND.png" alt="GND Logo">
![image](https://github.com/user-attachments/assets/98c03af9-5f20-4d6e-8140-b4a69f7ff72f)<img src="https://github.com/COS301-SE-2024/GDPR-data-noncompliance-detector/blob/develop/documentation/headshots/GND.png" alt="GND Logo">

[![codecov](https://codecov.io/github/COS301-SE-2024/GDPR-data-noncompliance-detector/graph/badge.svg?token=nEPpXWGssM)](https://codecov.io/github/COS301-SE-2024/GDPR-data-noncompliance-detector)
![GitHub issues](https://img.shields.io/github/issues/COS301-SE-2024/GDPR-data-noncompliance-detector)
Expand Down Expand Up @@ -36,6 +36,17 @@ The GDPR Data Noncompliance Detector is a software tool designed to identify ins
<br></br>

### Demo 4
[Demo 4 SRS Documentation](https://github.com/COS301-SE-2024/GDPR-data-noncompliance-detector/blob/develop/documentation/Demo_3___SRS.pdf)
<br></br>
[Demo 4 Testing Specification](https://github.com/COS301-SE-2024/GDPR-data-noncompliance-detector/blob/develop/documentation/Demo_4___Testing_Specification.pdf)
<br></br>
# Download

[EXE Download](https://drive.google.com/drive/folders/1LANx27MNDwmfvDtj09NFvJ05s91Ya-7n?usp=sharing)

#Demo 4 Input

[Submit Personal Data](https://docs.google.com/spreadsheets/d/1_c1JbehTnfNju1iyqR2vt_2np4OUfFGkX9SmGOiEvco/edit?usp=sharing)

# Documentation

Expand All @@ -54,7 +65,7 @@ The GDPR Data Noncompliance Detector is a software tool designed to identify ins
[Coding Standards](https://github.com/COS301-SE-2024/GDPR-data-noncompliance-detector/blob/develop/documentation/Coding_Standards.pdf)

## User Manual
[GND User Manual](https://github.com/COS301-SE-2024/GDPR-data-noncompliance-detector/blob/develop/documentation/GND%20Manual.pdf)
[GND User Manual](https://github.com/COS301-SE-2024/GDPR-data-noncompliance-detector/blob/develop/documentation/GND%20Manual_V2.pdf)

## Project Management Tools
GitHub Issues and GitHub Boards
Expand Down Expand Up @@ -189,7 +200,7 @@ Angular with Electron

### Backend
Python
FastAPI
FlaskAPI

### Testing
PyTest
Expand Down
Binary file modified backend/.DS_Store
Binary file not shown.
Binary file modified backend/Detection_Engine/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions backend/Detection_Engine/CA_model_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def predict(self, input_text):
truncated_text = self.classifier.tokenizer.decode(tokens, skip_special_tokens=True)

result = self.classifier(truncated_text)
# print(result)
return result[0]['label']

if __name__ == '__main__':
Expand Down
46 changes: 33 additions & 13 deletions backend/Detection_Engine/EM_model_access.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import os
import os, sys
from transformers import BertTokenizer, BertForSequenceClassification, pipeline

def resource_path(relative_path):

try:
base_path = sys._MEIPASS

except Exception:
base_path = os.path.abspath(".")

return os.path.join(base_path, relative_path)
class EM:

def __init__(self):
Expand All @@ -13,19 +22,30 @@ def __init__(self):
def run_EM(self, text):
return self.predict(text)

def sliding_window(self, text, window_size, overlap):
tokens = self.classifier.tokenizer.encode(text, truncation=False)
chunks = []
for i in range(0, len(tokens), window_size - overlap):
chunk = tokens[i:i + window_size]
if len(chunk) < window_size:
break
chunks.append(chunk)
return chunks

def predict(self, input_text):
count = 0
tokens = self.classifier.tokenizer.encode(input_text, truncation=True, max_length=self.max_length_)
truncated_text = self.classifier.tokenizer.decode(tokens, skip_special_tokens=True)

result = self.classifier(truncated_text)
label = result[0]['label']
if label != 'LABEL_2':
count += 1
else:
count += 0

return count
window_size = 128
overlap = 64

chunks = self.sliding_window(input_text, window_size, overlap)
labels = []

for chunk in chunks:
truncated_text = self.classifier.tokenizer.decode(chunk, skip_special_tokens=True)
result = self.classifier(truncated_text)
label = result[0]['label']
labels.append(label)

return labels

if __name__ == '__main__':
em = EM()
Expand Down
44 changes: 31 additions & 13 deletions backend/Detection_Engine/GDPR_model_access.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import os
import os, sys
from transformers import DebertaV2Tokenizer, DebertaV2ForSequenceClassification, pipeline

def resource_path(relative_path):

try:
base_path = sys._MEIPASS

except Exception:
base_path = os.path.abspath(".")

return os.path.join(base_path, relative_path)

class GDPR:

Expand All @@ -12,22 +21,31 @@ def __init__(self):
def run_GDPR(self, text):
return self.predict(text)


def sliding_window(self, text, window_size, overlap):
tokens = self.classifier.tokenizer.encode(text, truncation=False)
chunks = []
for i in range(0, len(tokens), window_size - overlap):
chunk = tokens[i:i + window_size]
if len(chunk) < window_size:
break
chunks.append(chunk)
return chunks

def predict(self, input_text):
count = 0
tokens = self.classifier.tokenizer.encode(input_text, truncation=True, max_length=self.max_length_)
truncated_text = self.classifier.tokenizer.decode(tokens, skip_special_tokens=True)

result = self.classifier(truncated_text)
# return result[0]['label']
window_size = 128
overlap = 64

label = result[0]['label']
if label != 'LABEL_0':
count += 1
else:
count += 0
chunks = self.sliding_window(input_text, window_size, overlap)
labels = []

return count
for chunk in chunks:
truncated_text = self.classifier.tokenizer.decode(chunk, skip_special_tokens=True)
result = self.classifier(truncated_text)
label = result[0]['label']
labels.append(label)

return labels

if __name__ == '__main__':
gdpr = GDPR()
Expand Down
72 changes: 72 additions & 0 deletions backend/Detection_Engine/GF_model_access.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import os
# from transformers import BertTokenizer, BertForSequenceClassification, pipeline
import re

# base_dir = os.path.dirname(__file__)
# model_path = os.path.join(base_dir, 'trained_model')
# tokenizer_path = os.path.join(base_dir,'ca_tokenizer')

# tokenizer_ = AutoTokenizer.from_pretrained("rdhinaz/gdpr_consent_agreement")
# mode+l = AutoModelForSequenceClassification.from_pretrained("rdhinaz/gdpr_consent_agreement")

class GF:

def __init__(self):
self.patterns = [
re.compile("CGA"),
re.compile("TCAGGTCA"),
re.compile(r"ATG([ATGC]{3})*?(TAA|TAG|TGA)"),
re.compile(r"GATATC"),
re.compile(r"VI\w{2}L\w{2}"),
re.compile(r"SR[AG]"),
re.compile(r"F[LIV]{2}[KR]{1}\w{2}D"),
re.compile(r"TG\w{6}CA"),
re.compile(r"[WG]{1}\w{1,2}[ED]{1}\w{1,2}[WG]{1}"),
re.compile(r"[ACGT]{6}G[AG]N[AG]T[AC][AG][ACGT]{3}G[ACGT]{3}[ACGT]{2}"),
re.compile(r"(?:G|C){3,}|(?:A|U){3,}"),
re.compile(r"L.{1,3}L.{1,3}L")
]
# self.model_ = model
# self.tokenizer_ = tokenizer
# self.max_length_ = 512
# self.classifier = pipeline("text-classification", model="rdhinaz/genome-finder")
# self.max_length = self.max_length_

def run_GF(self, text):
match_count = 0
for pattern in self.patterns:
matches = pattern.findall(text)
match_count += len(matches) # Count the number of matches
return match_count
# return self.predict(text)

def sliding_window(self, text, window_size, overlap):
tokens = self.classifier.tokenizer.encode(text, truncation=False)
chunks = []
for i in range(0, len(tokens), window_size - overlap):
chunk = tokens[i:i + window_size]
if len(chunk) < window_size:
break
chunks.append(chunk)
return chunks

# def predict(self, input_text):
# window_size = 128
# overlap = 64

# chunks = self.sliding_window(input_text, window_size, overlap)
# labels = []

# for chunk in chunks:
# tokenized_text = self.classifier.tokenizer.encode(input_text, truncation=True, padding=True, return_tensors='pt')

# Pass the tokenized text to the classifier
# result = self.classifier(tokenized_text)
# label = result[0]['label']
# labels.append(label)

# return result

if __name__ == '__main__':
GF = GF()
print(GF.run_CA("Sure, you can use my data"))
11 changes: 11 additions & 0 deletions backend/Detection_Engine/MD_model_access.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import os, sys
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline

def resource_path(relative_path):

try:
base_path = sys._MEIPASS

except Exception:
base_path = os.path.abspath(".")

return os.path.join(base_path, relative_path)

class MD:

def __init__(self):
Expand Down
Loading
Loading