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

Feedback #1

Open
wants to merge 467 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
467 commits
Select commit Hold shift + click to select a range
93b95d7
merge
akrakman Oct 22, 2022
2898afa
Fix eslint
MinhPhan8803 Oct 22, 2022
31084f6
Fix eslint 2
MinhPhan8803 Oct 22, 2022
720ea61
Revert
MinhPhan8803 Oct 22, 2022
b55d2b0
Fix eslint #3
MinhPhan8803 Oct 22, 2022
7da63c2
Touch up
MinhPhan8803 Oct 22, 2022
2417861
Try fixing jest
MinhPhan8803 Oct 22, 2022
6d02ecf
Try fixing jest again
MinhPhan8803 Oct 22, 2022
9030b8b
Treat all eslint warnings as errors
MinhPhan8803 Oct 22, 2022
0e73339
Max warnings 0 on eslint
MinhPhan8803 Oct 22, 2022
8408bcc
Fix ESlint warnings
MinhPhan8803 Oct 22, 2022
b46461e
Merge pull request #31 from CS222-UIUC/minh/fix_eslint
MinhPhan8803 Oct 22, 2022
45e7f6f
Merge branch 'main' into minh/connect_mainpage_backend_frontend
MinhPhan8803 Oct 23, 2022
665dca9
Added support for writing review
MinhPhan8803 Oct 23, 2022
2a1b143
Changed order of code so pylint stops complaining
MinhPhan8803 Oct 23, 2022
7a7173e
created home route to return json
akrakman Oct 24, 2022
dc7b373
pylint fixes
akrakman Oct 24, 2022
4c680eb
pylint fixes
akrakman Oct 24, 2022
57fe5f5
Merge pull request #32 from CS222-UIUC/minh/connect_mainpage_backend_…
MinhPhan8803 Oct 24, 2022
9198595
added inital request and selected buttons functionality
akrakman Oct 25, 2022
5c837cb
Delete app.py
akrakman Oct 25, 2022
b222c0e
Delete apt.py
akrakman Oct 25, 2022
0f88b03
add back files
akrakman Oct 25, 2022
4c42449
add back files
akrakman Oct 25, 2022
65d9354
remove my backend changes
akrakman Oct 25, 2022
6248801
merge
akrakman Oct 25, 2022
a09e436
black styling
akrakman Oct 25, 2022
536752c
Added comments
akrakman Oct 26, 2022
a14bf79
change file names
akrakman Oct 26, 2022
ed363f4
clarified a comment
akrakman Oct 26, 2022
072ac44
added searchbar dropdown component
akrakman Oct 26, 2022
f116ba9
fixes
akrakman Oct 26, 2022
775f324
Updated write_reviews and database
MinhPhan8803 Oct 27, 2022
64ce387
Fixed db again
MinhPhan8803 Oct 27, 2022
b16fe16
Fixed write review
MinhPhan8803 Oct 27, 2022
d035555
Fully implemented write_review
MinhPhan8803 Oct 27, 2022
f646cf0
Fix database
MinhPhan8803 Oct 27, 2022
0b7ed44
Fix database
MinhPhan8803 Oct 27, 2022
56c5c3a
Remove db
MinhPhan8803 Oct 27, 2022
ebd52b1
Readd db
MinhPhan8803 Oct 27, 2022
d911be1
Fix ubuntu version in actions?
MinhPhan8803 Oct 27, 2022
7a52668
Manually update sqlite on github runner
MinhPhan8803 Oct 27, 2022
f0f444c
Actually fix the github runner probably
MinhPhan8803 Oct 27, 2022
7e39e10
Added mainpage handling
MinhPhan8803 Oct 28, 2022
41d95b5
Split code to be more readable
MinhPhan8803 Oct 28, 2022
cbe27eb
Fix aptId autocast
MinhPhan8803 Oct 28, 2022
88c8445
Fix returns
MinhPhan8803 Oct 28, 2022
591e653
Tentative mainpage tests
MinhPhan8803 Oct 29, 2022
e40587e
Added test for mainpage post
MinhPhan8803 Oct 29, 2022
54afbfc
Ran black
MinhPhan8803 Oct 29, 2022
e5cb2ae
Fix pylint and black errors
MinhPhan8803 Oct 29, 2022
d1d4278
Changed login and register to account for the no json case
MinhPhan8803 Oct 29, 2022
0349e65
Added all tests for login and register
MinhPhan8803 Oct 29, 2022
45fd5ba
Restructured backend
MinhPhan8803 Oct 29, 2022
4212ea3
Fix pylint error
MinhPhan8803 Oct 29, 2022
81e9b80
put right section in
xxxfzxxx Oct 31, 2022
2df864d
fix eslint
xxxfzxxx Oct 31, 2022
c1e491f
starts router and simplify gets
akrakman Oct 31, 2022
1d5b416
remove press
akrakman Oct 31, 2022
7e71a6d
remove press
akrakman Oct 31, 2022
fdbc9e2
Modified docstrings to be more descriptive
MinhPhan8803 Oct 31, 2022
dfabf3c
Add a DB decorator to reduce db open/close repetition
MinhPhan8803 Oct 31, 2022
65001cb
Add ignore instructions for pylint
MinhPhan8803 Oct 31, 2022
922ccdc
Fuck pylint, PoS cant handle decorators
MinhPhan8803 Oct 31, 2022
f085bf5
Fix pylint action
MinhPhan8803 Oct 31, 2022
93b75ce
Merge pull request #35 from CS222-UIUC/minh/connect_mainpage
MinhPhan8803 Oct 31, 2022
8707060
remove press
akrakman Nov 1, 2022
5d61134
remove press
akrakman Nov 1, 2022
cdc1af0
lint
akrakman Nov 1, 2022
b7a00a2
lint
akrakman Nov 1, 2022
7ecd252
removed review and image data
akrakman Nov 2, 2022
5182a7b
fix conflict
akrakman Nov 2, 2022
d685559
split up search bar and left side
akrakman Nov 2, 2022
13ced48
split up search bar and left side
akrakman Nov 2, 2022
ba2e38c
can fix the button group another time
akrakman Nov 2, 2022
4b0f43c
Merge branch 'main' of https://github.com/CS222-UIUC/course-project-g…
xxxfzxxx Nov 3, 2022
5724cf8
delete and edit incomplete
xxxfzxxx Nov 4, 2022
fd28d3a
conifgure correct urls for 'get'
akrakman Nov 4, 2022
5248142
Fixes
akrakman Nov 4, 2022
c3cd069
uncomment line
akrakman Nov 4, 2022
a2dcd22
remove picture
akrakman Nov 4, 2022
0be7df2
fix eslint
xxxfzxxx Nov 4, 2022
e43cfa8
balck and pylint
xxxfzxxx Nov 4, 2022
6ac052a
push
xxxfzxxx Nov 4, 2022
93206d4
fix eslint
xxxfzxxx Nov 4, 2022
812eb1e
init databse:
xxxfzxxx Nov 4, 2022
d7b46e0
delete flask cors
xxxfzxxx Nov 4, 2022
ea8787b
Removed node_modules
xxxfzxxx Nov 4, 2022
b80023e
Merge pull request #36 from CS222-UIUC/zfeng13-4
xxxfzxxx Nov 4, 2022
b3adf87
merge
akrakman Nov 5, 2022
e7d01ef
merge
akrakman Nov 5, 2022
cf6eb2d
Aden/searching (#34)
akrakman Nov 5, 2022
767b339
Add cors to app.py
MinhPhan8803 Nov 5, 2022
36f9055
Changed apartment populate handling
MinhPhan8803 Nov 5, 2022
e730473
Updated tests to reflect changes
MinhPhan8803 Nov 5, 2022
fb9b718
Updated requirements.txt
MinhPhan8803 Nov 5, 2022
577976b
Ran black on app.py
MinhPhan8803 Nov 5, 2022
e5323b5
fixed app error and accepted in apt_id from res.data
akrakman Nov 5, 2022
a9f1eaa
fix merge
akrakman Nov 5, 2022
4b23703
Merge pull request #38 from CS222-UIUC/aden/connectmainpage
akrakman Nov 5, 2022
43c5e1c
fixed file name issue. MainPage.tsx imported old file name
akrakman Nov 5, 2022
fb18c93
Merge pull request #39 from CS222-UIUC/aden/connect
akrakman Nov 5, 2022
f2e36b0
Merge pull request #37 from CS222-UIUC/minh/mainpage_backend_wrap_up
MinhPhan8803 Nov 5, 2022
02a8e0b
Added further sort to db
MinhPhan8803 Nov 5, 2022
73f2b97
Use decorator on populate methods
MinhPhan8803 Nov 5, 2022
272c21e
added onSelect for selection of apartment
akrakman Nov 5, 2022
88b6bb7
added initial state functionality
akrakman Nov 6, 2022
c78ddb2
Support pagination in the backend
MinhPhan8803 Nov 6, 2022
40c1d5c
Fixed pylint errors
MinhPhan8803 Nov 6, 2022
8db08f4
Separated databases, need more testing
MinhPhan8803 Nov 6, 2022
e3b156b
Separated prod and test databases
MinhPhan8803 Nov 6, 2022
8d4f6e2
Stopped excluding decorators.py from coverage
MinhPhan8803 Nov 6, 2022
f1bfa98
Merge pull request #40 from CS222-UIUC/aden/connecting
xxxfzxxx Nov 6, 2022
2c3d90e
Added test for use_database exception
MinhPhan8803 Nov 6, 2022
911877d
Fixed pylint and black errors
MinhPhan8803 Nov 6, 2022
a8c61b5
Merge pull request #41 from CS222-UIUC/minh/touch_up_backend
MinhPhan8803 Nov 7, 2022
af967bf
Separated get request processing + fix decorator test
MinhPhan8803 Nov 8, 2022
64f9bcc
Removed dataclass tests
MinhPhan8803 Nov 8, 2022
c6cef25
Removed pytest-coverage.txt
MinhPhan8803 Nov 8, 2022
d1bb346
Renamed get request type to be more descriptive
MinhPhan8803 Nov 8, 2022
95c3756
finished pagination, css styling, url, etc.
akrakman Nov 8, 2022
aa98579
moved files into new folders for organization, added comments on righ…
akrakman Nov 8, 2022
907e50b
prettier
akrakman Nov 8, 2022
9c3d454
Merge pull request #42 from CS222-UIUC/minh/fixes_database
MinhPhan8803 Nov 8, 2022
15ddab9
Merge pull request #43 from CS222-UIUC/aden/connecting
akrakman Nov 8, 2022
1de74b2
tested it works, added data, fix bug
akrakman Nov 8, 2022
6ffce28
add testing data
akrakman Nov 8, 2022
db0d4c1
add AptPics data
akrakman Nov 8, 2022
32bff1c
Merge pull request #44 from CS222-UIUC/aden/testing
akrakman Nov 8, 2022
e462773
Fix prod tests to display values
MinhPhan8803 Nov 13, 2022
68edb1f
Added support for deleting reviews
MinhPhan8803 Nov 13, 2022
382e9fc
Minor fix on review frontend
MinhPhan8803 Nov 13, 2022
ef23fbc
Merge pull request #45 from CS222-UIUC/minh/fix_prod_tests
xxxfzxxx Nov 13, 2022
3dc82e1
Added User class, userpage.py, tests, and app.py routes. still gettin…
akrakman Nov 15, 2022
a357b1c
change tests and fix imports
akrakman Nov 16, 2022
dd12134
update_phone tests pass
akrakman Nov 16, 2022
54a7f6a
started testing app.py
akrakman Nov 16, 2022
1a8a9fa
added some userpage functionality, still need to modify
sd-20 Nov 16, 2022
73ee854
added some userpage functionality, need to fix
sd-20 Nov 16, 2022
2b34de5
added tests for app.py
akrakman Nov 17, 2022
95c2612
adjust test
akrakman Nov 17, 2022
eb7dcb3
finished userpage template, ran pylinter
sd-20 Nov 17, 2022
6e4a2a6
fixed userpage, ran linter
sd-20 Nov 17, 2022
abf88af
added more test coverage
akrakman Nov 17, 2022
0cb4779
resolve merge
akrakman Nov 17, 2022
8df46f3
fixed linting errors in userpage
sd-20 Nov 17, 2022
386bf9d
added back overwritten code
sd-20 Nov 17, 2022
020a7c1
fixed app.py tests and userpage
akrakman Nov 17, 2022
599cc09
Merge pull request #46 from CS222-UIUC/aden/userpage
akrakman Nov 17, 2022
0aecede
return json in userpage() and fix userpage test
akrakman Nov 17, 2022
817d6cf
Add files via upload
xxxfzxxx Nov 18, 2022
65a31bd
finish userpage.py tests
akrakman Nov 18, 2022
93dfd53
fix some pylint problem
xxxfzxxx Nov 18, 2022
026c1c5
delete accidental coverage output files
akrakman Nov 18, 2022
a9466d2
touch up
akrakman Nov 18, 2022
332a33c
move authentication to new file
akrakman Nov 19, 2022
9f0cf22
Added userpage methods
MinhPhan8803 Nov 25, 2022
1e12232
Merge pull request #47 from CS222-UIUC/aden/userpagetouchup
akrakman Nov 25, 2022
11ae814
Display reviewed apts
MinhPhan8803 Nov 26, 2022
21ee58d
Merge branch 'main' into minh/userpage_frontend
MinhPhan8803 Nov 26, 2022
12163e5
Styled user info
MinhPhan8803 Nov 26, 2022
6cfbcf4
Add some functions for POST requests
MinhPhan8803 Nov 26, 2022
8cecab2
fix return errors and type errors
akrakman Nov 26, 2022
471d3c8
Add files via upload
xxxfzxxx Nov 26, 2022
05a3af8
Update pylint.yml
xxxfzxxx Nov 26, 2022
635477e
Add files via upload
xxxfzxxx Nov 26, 2022
07c2f6e
Add files via upload
xxxfzxxx Nov 26, 2022
fcbb841
Add files via upload
xxxfzxxx Nov 26, 2022
d130c0d
fix tests
akrakman Nov 26, 2022
5b15da6
pylint
akrakman Nov 26, 2022
c5b31fe
Change button to input new email and password
MinhPhan8803 Nov 27, 2022
1df1b36
Touched up UI
MinhPhan8803 Nov 27, 2022
cc6e28d
Added routing and logout
MinhPhan8803 Nov 27, 2022
519f1f0
Some more routing + fix login routing
MinhPhan8803 Nov 27, 2022
1ec025b
Route register to login
MinhPhan8803 Nov 27, 2022
85b1e27
Made mainpage looks nice
MinhPhan8803 Nov 27, 2022
26cdb88
Ran prettier
MinhPhan8803 Nov 27, 2022
da40ee1
Removed React.Fragment in left section
MinhPhan8803 Nov 27, 2022
c19d69f
Fixed mainpage top bar and added comments
MinhPhan8803 Nov 27, 2022
14126fd
Ran prettier
MinhPhan8803 Nov 27, 2022
bdc7e1f
Merge pull request #48 from CS222-UIUC/zfeng13-scraper
xxxfzxxx Nov 27, 2022
72a0f22
Changed routing
MinhPhan8803 Nov 28, 2022
5787cfe
Minor fix
MinhPhan8803 Nov 28, 2022
85419da
add new route to get session object
akrakman Nov 28, 2022
2522136
Added error message displays for login and resgiter
MinhPhan8803 Nov 28, 2022
022db54
Fixed login and register routing
MinhPhan8803 Nov 28, 2022
ba73781
add tests for new route
akrakman Nov 28, 2022
050fd68
PR #49: fix return errors and type errors, add new route
akrakman Nov 28, 2022
8558ea2
remove <username>
akrakman Nov 28, 2022
810d730
Merge pull request #50 from CS222-UIUC/aden/removeusernameroute
akrakman Nov 28, 2022
d07ddca
Changed app.py to match main
MinhPhan8803 Nov 28, 2022
9c9793d
Merge from main
MinhPhan8803 Nov 28, 2022
aeadb05
Fixed session and add conditional routes
MinhPhan8803 Nov 28, 2022
9369d9f
Fixed review on mainpage
MinhPhan8803 Nov 28, 2022
b21052f
Fixed logic stuff in userpage backend
MinhPhan8803 Nov 29, 2022
3dc74a5
Fixed user UI
MinhPhan8803 Nov 29, 2022
afbe82d
Redirect register to login
MinhPhan8803 Nov 29, 2022
831c210
Misc suggested changes that got wiped during dev
MinhPhan8803 Nov 29, 2022
a805bf4
Added some comments
MinhPhan8803 Nov 29, 2022
f62b780
Wrap register and login redirs in useEffects
MinhPhan8803 Nov 29, 2022
2f448f4
Log out user if register is successful
MinhPhan8803 Nov 29, 2022
455de9c
Fix changeinfo and redid components
MinhPhan8803 Nov 29, 2022
c55fac3
Fix add review comment and display total votes
MinhPhan8803 Nov 30, 2022
a459901
Fix black errors
MinhPhan8803 Nov 30, 2022
902c61a
reduce register time, fixed register and login text spacing
MinhPhan8803 Dec 1, 2022
50a5344
Fixed login and register, moved auth.py
MinhPhan8803 Dec 2, 2022
7eb14f6
Minor cleanup
MinhPhan8803 Dec 2, 2022
0ad58fe
Prettier fix
MinhPhan8803 Dec 2, 2022
ad461e4
Merge pull request #51 from CS222-UIUC/minh/userpage_frontend
MinhPhan8803 Dec 2, 2022
6850460
Bump loader-utils from 2.0.3 to 2.0.4 in /src/frontend
dependabot[bot] Dec 2, 2022
2866cff
Merge pull request #52 from CS222-UIUC/dependabot/npm_and_yarn/src/fr…
MinhPhan8803 Dec 2, 2022
0be1908
ran scraper and deleted html file
akrakman Dec 2, 2022
b60eb7f
Merge pull request #54 from CS222-UIUC/runscraper
akrakman Dec 2, 2022
ecb865b
added LICENSE.txt and most of the README
akrakman Dec 3, 2022
cc8546a
update license
akrakman Dec 3, 2022
394eba9
add pictures and finish readme
akrakman Dec 4, 2022
b2652fa
fix table of contents
akrakman Dec 4, 2022
cd529a4
Merge pull request #55 from CS222-UIUC/aden/README
akrakman Dec 4, 2022
93c43f1
remove inside readme and yarn lock
akrakman Dec 4, 2022
a722c16
coverage, image
akrakman Dec 4, 2022
2cb7f79
Merge pull request #56 from CS222-UIUC/aden/morereadmechanges
akrakman Dec 4, 2022
510bd06
move images
akrakman Dec 4, 2022
c51ead3
Merge pull request #57 from CS222-UIUC/aden/morereadmechanges
akrakman Dec 4, 2022
aa9f6b7
fix
akrakman Dec 4, 2022
e3b6f8b
Merge pull request #58 from CS222-UIUC/aden/fixreadme
akrakman Dec 4, 2022
252792f
Added deleting reviews
MinhPhan8803 Dec 4, 2022
f76bbae
Made submit and delete buttons a group
MinhPhan8803 Dec 4, 2022
e3acb4c
Made coverage badge slightly nicer
MinhPhan8803 Dec 4, 2022
7641a24
Added querying single apt in mainpage backend
MinhPhan8803 Dec 5, 2022
c7131d7
added google oauth
akrakman Dec 6, 2022
fb71c96
install Authlib for CI/CD
akrakman Dec 6, 2022
60d7100
install requetss
akrakman Dec 6, 2022
1fec6f4
Update README.md
sd-20 Dec 6, 2022
930ee9b
added technical architecture diagram
sd-20 Dec 6, 2022
79315f2
Added rerendering apartment on review submit and on search
MinhPhan8803 Dec 6, 2022
ccc0c41
Merge pull request #59 from CS222-UIUC/minh/finish_frontend
MinhPhan8803 Dec 6, 2022
96cac57
change diagram name
sd-20 Dec 6, 2022
cf9ac36
Merge branch 'main' of https://github.com/CS222-UIUC/course-project-g…
sd-20 Dec 6, 2022
9d01d15
Added new diagram
sd-20 Dec 6, 2022
b89f164
Conflict
akrakman Dec 6, 2022
225264d
improve comments in app.py
akrakman Dec 6, 2022
4e4d399
comments
akrakman Dec 6, 2022
08be118
format lol
akrakman Dec 6, 2022
f92e514
Merge pull request #60 from CS222-UIUC/aden/oauth
akrakman Dec 6, 2022
03c718e
Editted coverage badge lol
MinhPhan8803 Dec 6, 2022
0511ddf
fix oauth since I was setting the username to the email so you could …
akrakman Dec 6, 2022
187eb73
Merge pull request #61 from CS222-UIUC/aden/fix-oauth
akrakman Dec 6, 2022
2de1c86
Update install instructions
MinhPhan8803 Dec 8, 2022
cdddc06
readme fix typo
akrakman Dec 8, 2022
e3c39c2
Update README.md
akrakman Jul 10, 2023
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
20 changes: 20 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Black Styling

on: [push, pull_request]

jobs:
linter_name:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "--check ."
- name: Annotate diff changes using reviewdog
if: steps.action_black.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
with:
tool_name: blackfmt
21 changes: 21 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ESLint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Install dependencies
run: npm install --no-package-lock eslint eslint-plugin-react --legacy-peer-deps
working-directory: src/frontend/

- name: Run ESLint
run: npx eslint --max-warnings 0 $(git ls-files '*.js' '*.jsx' '*.ts' '*.tsx')
working-directory: src/frontend/
20 changes: 20 additions & 0 deletions .github/workflows/jest-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Jest Coverage Calculation
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: npm ci --legacy-peer-deps
working-directory: src/frontend

- name: Run tests
run: |
npx ts-jest config:init --coverage --coverageReporters json-summary
working-directory: src/frontend

- name: Jest coverage comment
uses: MishaKav/jest-coverage-comment@main
19 changes: 19 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Prettier Styling

on: [push, pull_request]

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Prettify code
run: |
npx prettier --check src/.
working-directory: src/frontend
31 changes: 31 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pylint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flask
pip install pylint
pip install pytest==7.1.3
pip install flask-cors
pip install BeautifulSoup4
pip install Flask-Session2
pip install Authlib
pip install requests
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
working-directory: src/backend
45 changes: 45 additions & 0 deletions .github/workflows/pytest-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Pytest Coverage Calculation
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3

- run: wget https://sqlite.org/2022/sqlite-autoconf-3380500.tar.gz
- run: tar -xvf sqlite-autoconf-3380500.tar.gz
- run: ./configure
working-directory: sqlite-autoconf-3380500
- run: make
working-directory: sqlite-autoconf-3380500
- run: sudo make install
working-directory: sqlite-autoconf-3380500
- run: export PATH="/usr/local/lib:$PATH"

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
working-directory: src/backend

- name: Build coverage file
run: |
pytest --junitxml=pytest.xml --cov-report=term-missing --cov=. | tee pytest-coverage.txt
env:
LD_LIBRARY_PATH: /usr/local/lib
working-directory: src/backend

- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: src/backend/pytest-coverage.txt
junitxml-path: src/backend/pytest.xml
55 changes: 55 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python Application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- run: wget https://sqlite.org/2022/sqlite-autoconf-3380500.tar.gz
- run: tar -xvf sqlite-autoconf-3380500.tar.gz
- run: ./configure
working-directory: sqlite-autoconf-3380500
- run: make
working-directory: sqlite-autoconf-3380500
- run: sudo make install
working-directory: sqlite-autoconf-3380500
- run: export PATH="/usr/local/lib:$PATH"

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
working-directory: src/backend
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
working-directory: src/backend
- name: Test with pytest
run: |
pytest
env:
LD_LIBRARY_PATH: /usr/local/lib
working-directory: src/backend
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
venv
__pycache__
.vscode
# dependencies
src/frontend/node_modules
/.pnp
.pnp.js
src/backend/.pytest_cache
.pytest_cache
src/backend/__pycache__
src/backend/flask_session

src/frontend/my-app/node_modules
# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# tests
/src/backend/.coverage
/src/backend/pytest-coverage.txt
/src/backend/pytest.xml
/src/backend/database/database.db-journal

21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Move Securely

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading