Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
f8b5389
GitHub Classroom Feedback
github-classroom[bot] Sep 5, 2024
1ca94ef
Setting up GitHub Classroom Feedback
github-classroom[bot] Sep 5, 2024
684bb0a
Created Lab1 branch
acflinch Sep 6, 2024
256deae
Create team.md
acflinch Sep 6, 2024
d4b6d73
dev: making about me change
bucketking657 Sep 7, 2024
b31626c
Added my description.
rzheng2019 Sep 8, 2024
2cc8a75
Update team.md
jamzheng109 Sep 9, 2024
63ff908
Updated README.md
rzheng2019 Sep 9, 2024
f5cd179
Added section for Liz to team.md file.
BlueGreenDragon Sep 10, 2024
4ed1d59
Created Lab1 commit guide document and revised README.md
rzheng2019 Sep 10, 2024
f4cee43
Added input data csv files
rzheng2019 Sep 10, 2024
5621959
Update team.md
Rekik27 Sep 10, 2024
e0a1b70
Merge remote-tracking branch 'origin/Lab1' into add-input-data
rzheng2019 Sep 10, 2024
92fcc41
dev: removing dir adding gitignore
jshilts657 Sep 10, 2024
2e62c6c
dev: including slash
jshilts657 Sep 10, 2024
d67d1aa
Merge pull request #2 from BUMETCS673/Lab1
rzheng2019 Sep 10, 2024
c028ac4
dev: pushing up demo python with working Dockerfile
jshilts657 Sep 11, 2024
2b482ef
Modified README.md and added new sections.
rzheng2019 Sep 11, 2024
e433215
Added Python Flask installation instructions.
rzheng2019 Sep 11, 2024
17ee370
Update README.md
BlueGreenDragon Sep 12, 2024
7e9fdee
Update README.md
BlueGreenDragon Sep 12, 2024
17714a9
Update README.md
BlueGreenDragon Sep 12, 2024
d1a97b2
Update README.md
BlueGreenDragon Sep 12, 2024
418983a
Merge pull request #4 from BUMETCS673/add-iteration0-documents
jamzheng109 Sep 12, 2024
9ed468e
Added Iteration 0 documents and presentation video
rzheng2019 Sep 12, 2024
114043b
Merge pull request #6 from BUMETCS673/add-iteration0-documents
rzheng2019 Sep 12, 2024
e4cd30d
Merge branch 'main' into add-input-data
rzheng2019 Sep 14, 2024
6f2e2d4
Removed unused data sets.
rzheng2019 Sep 14, 2024
7661d9e
Merge pull request #7 from BUMETCS673/feature/pythonBackend
jshilts657 Sep 17, 2024
b30e7bb
Merge pull request #8 from BUMETCS673/add-input-data
rzheng2019 Sep 17, 2024
dd0ee1b
dev: Pushing up MVP for frontend; minor changes to backend as well
jshilts657 Sep 17, 2024
5416b94
dev: updating .gitignore; removing file; addming comment
jshilts657 Sep 18, 2024
83a17f2
Database Information
acflinch Sep 19, 2024
ea2bf4a
dev: resolving merge conflicts
jshilts657 Sep 19, 2024
d20db26
Merge pull request #9 from BUMETCS673/feature/frontendMVP
jshilts657 Sep 19, 2024
b2f2323
Created current-workflow.yml to establish initial workflow foundation
rzheng2019 Sep 21, 2024
e6a92eb
Updated current-workflow.yml to add branches
rzheng2019 Sep 21, 2024
36b90d6
Updated current-workflow.yml to change run name
rzheng2019 Sep 21, 2024
fcbe372
Updated current-workflow.yml to update job names
rzheng2019 Sep 21, 2024
7cf8c15
Updated current-workflow.yml to modify step messages
rzheng2019 Sep 21, 2024
91ea55f
Updated current-workflow.yml to change name and run name
rzheng2019 Sep 21, 2024
71f9656
Update README.md
jshilts657 Sep 22, 2024
489dbc9
Updated current-workflow.yml to remove redundancies.
rzheng2019 Sep 22, 2024
feb6689
Updated current-workflow.yml to change to correct install path
rzheng2019 Sep 22, 2024
d6c7aca
Updated current-workflow.yml to test if npm install is necessary
rzheng2019 Sep 22, 2024
f4cfc15
Updated current-workflow.yml to uncomment npm install
rzheng2019 Sep 22, 2024
ed5850b
Modified documentation structure
rzheng2019 Sep 22, 2024
16357f9
adding updated database png file
BlueGreenDragon Sep 22, 2024
666bfb4
Updated current-workflow.yml to test Docker and frontend
rzheng2019 Sep 22, 2024
0f62e3c
Removed package-lock.json from .gitignore and added back to frontend
rzheng2019 Sep 22, 2024
96a96c7
Updated current-workflow.yml to use npm ci and renamed job
rzheng2019 Sep 22, 2024
736006e
dev: modify .gitignore, push package-lock file
jshilts657 Sep 22, 2024
5fb70c5
Updated current-workflow.yml to run npm ci for 3rd job
rzheng2019 Sep 22, 2024
3a5384c
Updated current-workflow.yml to correct log message.
rzheng2019 Sep 22, 2024
4a270e2
typo: correcting typos, changing to md format
jshilts657 Sep 22, 2024
6684c5c
Added fixed database requirements
acflinch Sep 23, 2024
3619dd8
Minor changes
acflinch Sep 23, 2024
fdaffb6
Merge pull request #10 from BUMETCS673/database_doc
acflinch Sep 23, 2024
8d5f76b
Merge pull request #13 from BUMETCS673/feature/ReadmeUpdate
jshilts657 Sep 23, 2024
8dc503e
Merge pull request #12 from BUMETCS673/feature/initial-pipeline-workflow
rzheng2019 Sep 23, 2024
7f0d424
adding database files
BlueGreenDragon Sep 24, 2024
371f232
Merge pull request #14 from BUMETCS673/feature/movies-db
rzheng2019 Sep 24, 2024
45bc39e
Create iteration1 folder in doc folder
rzheng2019 Sep 24, 2024
edc6668
iteration1 presentation
jamzheng109 Sep 24, 2024
7bdebd8
Removed extra file
rzheng2019 Sep 24, 2024
504ba5c
Adding iteration 1 documentation
rzheng2019 Sep 24, 2024
ea1d123
Merge pull request #15 from BUMETCS673/feature/iteration1-document-su…
jshilts657 Sep 24, 2024
33051ea
fix: adding port functionality to dockerfiles
jshilts657 Sep 24, 2024
68d4589
dev: updating readme
jshilts657 Sep 24, 2024
943062d
fix: corrected readme command; modified readme to be within coding gu…
jshilts657 Sep 26, 2024
8f8f800
Updated current-workflow.yml to publish container images to Docker Hub
rzheng2019 Sep 26, 2024
48ce2db
Merge pull request #16 from BUMETCS673/hotfix/DockerfilePortFix
jshilts657 Sep 26, 2024
3a12506
Merge in dev latest changes
rzheng2019 Sep 27, 2024
261e8bc
Updated current-workflow.yml to generate a new image in Docker Hub af…
rzheng2019 Sep 27, 2024
cc24caa
Updated current-workflow.yml to modify tag name for each image
rzheng2019 Sep 27, 2024
073a694
Updated current-workflow.yml to use tokens
rzheng2019 Sep 27, 2024
1cae3f7
Updated current-workflow.yml to use individual Docker Hub repos.
rzheng2019 Sep 27, 2024
2ff2ef0
Updated current-workflow.yml to change Docker secrets to use actors name
rzheng2019 Sep 28, 2024
122df23
Updated current-workflow.yml to add missing symbol
rzheng2019 Sep 28, 2024
9bd5983
Updated current-workflow.yml to correct syntax
rzheng2019 Sep 28, 2024
5941030
Updated current-workflow.yml to modify Docker login
rzheng2019 Sep 28, 2024
31b90c0
Updated current-workflow.yml to revert changes
rzheng2019 Sep 28, 2024
199c7ec
Jest Set Up
acflinch Sep 28, 2024
216ba2e
Update dirc
acflinch Sep 28, 2024
3f48ba5
Updated current-workflow.yml to publish to GitHub Packages registry
rzheng2019 Sep 28, 2024
bcc2cee
Updated current-workflow.yml to add commit ID to tags
rzheng2019 Sep 28, 2024
5041360
Updated current-workflow.yml to revert tag changes
rzheng2019 Sep 28, 2024
79c30d2
Updated current-workflow.yml to add commit ID to tag again
rzheng2019 Sep 28, 2024
8d18e65
Updated current-workflow.yml to update job names
rzheng2019 Sep 28, 2024
43b7c3b
Updated current-workflow.yml to remove Docker Hub from names
rzheng2019 Sep 28, 2024
1c59a4c
dev: testing pipeline change for different user
jshilts657 Sep 28, 2024
2ef888d
dev: testing change suggestion for Ricky
jshilts657 Sep 28, 2024
2c1fe20
dev: trying something else
jshilts657 Sep 28, 2024
11bf14d
typo: removing trailing /
jshilts657 Sep 28, 2024
8810c77
dev: trying to create image name for backend
jshilts657 Sep 28, 2024
b6b10de
dev: trying change for ricky
jshilts657 Sep 28, 2024
12a42bd
dev: testing change
jshilts657 Sep 28, 2024
6f7ec2d
Updated Submit Form
acflinch Sep 28, 2024
095a7e5
MovieQuerryFormComponent Addition
acflinch Sep 29, 2024
ad6f9b9
Adding database files for loading data.
BlueGreenDragon Sep 29, 2024
d08dcf3
Adding database files for loading data.
BlueGreenDragon Sep 29, 2024
305d2d9
Added unit test
acflinch Sep 30, 2024
b33d146
Removed test file
acflinch Sep 30, 2024
7a989c0
Delete code/frontend/node_modules/.cache/default-development directory
acflinch Sep 30, 2024
258324c
Delete code/frontend/node_modules/.cache/default-development directory
acflinch Sep 30, 2024
69360dc
Update submitform.test.js
acflinch Sep 30, 2024
2d613a9
Merge branch 'data_input_fields-' of https://github.com/BUMETCS673/se…
acflinch Sep 30, 2024
def7954
updated link
acflinch Sep 30, 2024
0609bac
Update submitform.test.js
acflinch Sep 30, 2024
83894c4
Update current-workflow.yml
acflinch Sep 30, 2024
308c76e
Merge pull request #18 from BUMETCS673/jest_set_up
acflinch Oct 1, 2024
5c00c77
Merge branch 'dev' into data_input_fields-
acflinch Oct 1, 2024
05bbcab
Update MovieQueryFormComponent.js
acflinch Oct 1, 2024
1e04361
dev: updating container; updating api calls for ui creating unit test.
jshilts657 Oct 1, 2024
ccf087d
Updated current-workflow.yml to clean up package info
rzheng2019 Oct 1, 2024
9039d35
Update current-workflow.yml
jshilts657 Oct 1, 2024
512552f
Update MovieQueryFormComponent.js
acflinch Oct 1, 2024
d7dcf3a
Update current-workflow.yml
jshilts657 Oct 1, 2024
6da1141
Update MovieQueryFormComponent.js
acflinch Oct 2, 2024
09e5e07
Updated current-workflow.yml to remove artifact attestation generation
rzheng2019 Oct 2, 2024
ff93661
Updated current-workflow.yml to tag name of branch that ran workflow
rzheng2019 Oct 2, 2024
7ddf82c
Updated current-workflow.yml to modify package tags
rzheng2019 Oct 2, 2024
abbf6ea
Updated current-workflow.yml to just use branch name as tag
rzheng2019 Oct 2, 2024
150d871
Update current-workflow.yml
rzheng2019 Oct 2, 2024
1755161
Update current-workflow.yml
rzheng2019 Oct 2, 2024
5ca88ec
Updated current-workflow.yml to revert tag name changes
rzheng2019 Oct 2, 2024
275bb3a
dev: adding branch name
jshilts657 Oct 2, 2024
7d888fd
dev: adding cmd to replace / in branch name causing error
jshilts657 Oct 2, 2024
b7c44c0
dev: trying to resolve failing build stage
jshilts657 Oct 2, 2024
f3d143b
Updating env names to make env
jshilts657 Oct 2, 2024
2d84438
dev: updating Node stage
jshilts657 Oct 2, 2024
6219b21
dev: adding sed command to each stage
jshilts657 Oct 2, 2024
41b9b92
dev: removing stage to see if it is needed
jshilts657 Oct 2, 2024
5bcf1a1
Database docker file
BlueGreenDragon Oct 3, 2024
1a7c667
TestMatch Update
acflinch Oct 3, 2024
c8cb40c
Merge pull request #28 from BUMETCS673/feature/publish-workflow-image…
rzheng2019 Oct 3, 2024
7c4533c
Merge pull request #26 from BUMETCS673/data_input_fields-
rzheng2019 Oct 3, 2024
79f92c7
test: updating reading with backend test instructions
jshilts657 Oct 3, 2024
762bc13
Merging Dev
jshilts657 Oct 3, 2024
47774bd
Fixing Database dockerfile
BlueGreenDragon Oct 3, 2024
3cecfe3
Merge pull request #23 from BUMETCS673/feature/UpdateBackendApi
jshilts657 Oct 3, 2024
73848e2
Create test.txt
BlueGreenDragon Oct 3, 2024
e0ee2ae
deleteing epmty test.txt
BlueGreenDragon Oct 3, 2024
f1f09e0
adding movies folder
BlueGreenDragon Oct 3, 2024
5b5f706
dockerfile
BlueGreenDragon Oct 3, 2024
58160ce
Updating dockerfile and uploading unit test file.
BlueGreenDragon Oct 3, 2024
46efb35
Merge branch 'dev' into feature/movies-db
jshilts657 Oct 3, 2024
85e8688
Updated current-workflow.yml to test job dependency
rzheng2019 Oct 3, 2024
671cec5
Updated current-workflow.yml to integrate backend process query reque…
rzheng2019 Oct 3, 2024
f9aa195
Updated current-workflow.yml to update container name
rzheng2019 Oct 3, 2024
9a30af2
Updated current-workflow.yml to modify docker execute option
rzheng2019 Oct 3, 2024
58463dc
Updated current-workflow.yml to add commands to list current directory
rzheng2019 Oct 3, 2024
d7c4f78
Updated current-workflow.yml to change test directory path
rzheng2019 Oct 3, 2024
7a26fae
Updated current-workflow.yml to show list structure of current directory
rzheng2019 Oct 3, 2024
7bb32f2
Updated current-workflow.yml to look at directory structure
rzheng2019 Oct 3, 2024
caab30c
Updated current-workflow.yml to remove line
rzheng2019 Oct 3, 2024
55fa6d9
Updated current-workflow.yml to add new steps to change directory
rzheng2019 Oct 3, 2024
c7740f5
Updated current-workflow.yml to change to correct test directory
rzheng2019 Oct 3, 2024
ee86e5e
Updated current-workflow.yml to list test folder structure
rzheng2019 Oct 3, 2024
0a07779
Updated current-workflow.yml combined run commands
rzheng2019 Oct 3, 2024
e97dcb9
Updated current-workflow.yml to change path to one level above
rzheng2019 Oct 3, 2024
91ddc00
Updated current-workflow.yml to add a new job that pushes docker imag…
rzheng2019 Oct 3, 2024
6fb38e1
Updated current-workflow.yml to use specific container link for testi…
rzheng2019 Oct 3, 2024
ce04fb1
Updated current-workflow.yml to provide working directory for docker …
rzheng2019 Oct 3, 2024
7cff0b7
Updated current-workflow.yml to remove some steps
rzheng2019 Oct 3, 2024
fd0d01a
Updated current-workflow.yml to list current directory structure
rzheng2019 Oct 3, 2024
7af4670
dev: refactored code
jshilts657 Oct 3, 2024
1c6f421
Updated current-workflow.yml to change to correct path
rzheng2019 Oct 3, 2024
f97baac
Updated current-workflow.yml to remove repo cloning
rzheng2019 Oct 3, 2024
2ec239e
dev: testing naming var at begining of pipeline
jshilts657 Oct 4, 2024
741b72d
dev: correcting needs stage name
jshilts657 Oct 4, 2024
2ee2e0b
Updating var name, removing depeciated function call
jshilts657 Oct 4, 2024
cd45d84
fixed movies_unit_test.py code
BlueGreenDragon Oct 4, 2024
4f2bb60
Trying a another approach
jshilts657 Oct 4, 2024
2243269
Trying a another approach
jshilts657 Oct 4, 2024
16cfde2
dev: applying fix to rest of pipeline
jshilts657 Oct 4, 2024
ef25084
dev: clean up
jshilts657 Oct 4, 2024
3430e42
dev: addding job to needs section
jshilts657 Oct 4, 2024
def7e84
dev: adding fix to unit tests and other stages
jshilts657 Oct 4, 2024
2a5bf73
dev: fixing failing unit test
jshilts657 Oct 4, 2024
2a14207
dev: Removing file
jshilts657 Oct 4, 2024
79e79cb
dev: Updating file
jshilts657 Oct 4, 2024
020f91c
dev: Another test
jshilts657 Oct 4, 2024
a7d5a86
typo:removing extra char
jshilts657 Oct 4, 2024
fc35864
dev: Verifying image is being build correctly
jshilts657 Oct 4, 2024
ccfd509
typo: verifying image built correctly
jshilts657 Oct 4, 2024
03f34da
dev: checking unit test stage for files
jshilts657 Oct 4, 2024
f4916a1
dev: switching back path
jshilts657 Oct 4, 2024
560b0cb
dev: changing file permissions
jshilts657 Oct 4, 2024
c0739bf
dev: adding cd command back in now that file location and permissions…
jshilts657 Oct 4, 2024
c9c1d02
dev: changeing working directory
jshilts657 Oct 4, 2024
570485e
dev: changeing working directory
jshilts657 Oct 4, 2024
092563b
dev: clean up
jshilts657 Oct 4, 2024
32b4ff3
dev: testing changes for Liz
jshilts657 Oct 4, 2024
5416cfd
Merge pull request #30 from BUMETCS673/hotfix/CreateBranchNameHigherUp
rzheng2019 Oct 5, 2024
e0da5b1
Updated current-workflow.yml to show directory structure of frontend …
rzheng2019 Oct 5, 2024
43e22a1
Updated current-workflow.yml to run frontend unit tests locally for w…
rzheng2019 Oct 5, 2024
176a0e9
Updated current-workflow.yml to remove a line causing error
rzheng2019 Oct 5, 2024
a8219bb
Submit form input/style merge
acflinch Oct 5, 2024
3af6101
Updated current-workflow.yml to remove a step causing error
rzheng2019 Oct 5, 2024
081da29
Updated current-workflow.yml to modify paths
rzheng2019 Oct 5, 2024
25dba9b
Updated current-workflow.yml to install node and npm for unit test job
rzheng2019 Oct 5, 2024
6bee7ef
Updated current-workflow.yml to remove local image building and inste…
rzheng2019 Oct 5, 2024
fd8ec6c
Jest test
acflinch Oct 5, 2024
49867b8
Updated current-workflow.yml to show current path and directory struc…
rzheng2019 Oct 5, 2024
39e3100
Updated current-workflow.yml remove build steps in frontend unit test
rzheng2019 Oct 5, 2024
84ca045
Updated current-workflow.yml to remove unnecessary dependency
rzheng2019 Oct 5, 2024
32fa6fd
Updated current-workflow.yml to show parent directory structure
rzheng2019 Oct 5, 2024
38df6d4
Updated current-workflow.yml to change working directory path for fro…
rzheng2019 Oct 5, 2024
495109e
Updated current-workflow.yml to correct frontend unit test working di…
rzheng2019 Oct 5, 2024
4e749ff
dev: testing node version
jshilts657 Oct 5, 2024
957bc56
Delete code/frontend/node_modules/.cache/default-development directory
acflinch Oct 6, 2024
3c09283
Update submitform.test.js
acflinch Oct 6, 2024
814a7b6
Merge branch 'Merge_Form' of https://github.com/BUMETCS673/seprojects…
acflinch Oct 6, 2024
2e02f57
CSS file Created
acflinch Oct 6, 2024
4d61811
Merge pull request #32 from BUMETCS673/feature/integrate-unit-tests-i…
rzheng2019 Oct 6, 2024
e2b0b7c
styles link
acflinch Oct 6, 2024
83e14da
updating readme with new instructions
jshilts657 Oct 7, 2024
fcf2232
Merge branch 'dev' into feature/movies-db
jshilts657 Oct 7, 2024
e339584
dev: cleaning up code commenting out WIP functions
jshilts657 Oct 7, 2024
63699a8
Merge pull request #31 from BUMETCS673/Merge_Form
rzheng2019 Oct 7, 2024
89f6f59
dev: using absolute path to reduce complexity
jshilts657 Oct 7, 2024
7d18106
dev: correcting pathways
jshilts657 Oct 7, 2024
9a6386f
dev: correcting another pathway
jshilts657 Oct 7, 2024
41ac2dd
dev: clean and for PR review
jshilts657 Oct 7, 2024
2832be6
Merge branch 'dev' into feature/movies-db
jshilts657 Oct 7, 2024
b8556c1
dev: creating first stage for database
jshilts657 Oct 7, 2024
f776739
typo: correcting pathway
jshilts657 Oct 7, 2024
250c915
dev: adding another stage for DB
jshilts657 Oct 7, 2024
1fa59c9
dev: adding unit test stage to pipeline
jshilts657 Oct 7, 2024
6c4fdc0
dev: testing to see if file permission work
jshilts657 Oct 7, 2024
fd038b2
dev: testing to see if file permission work
jshilts657 Oct 7, 2024
3334227
dev: trying something
jshilts657 Oct 7, 2024
6c3d0bd
dev: trying something else
jshilts657 Oct 7, 2024
9c812d1
dev: trying something else
jshilts657 Oct 7, 2024
c99864f
dev: adding step to genereate data
jshilts657 Oct 7, 2024
32a8aac
typo: adding s
jshilts657 Oct 7, 2024
f953ef0
dev: adding run stcommand so database is built before pushed to reg
jshilts657 Oct 7, 2024
2b93593
removing other command in unit test stage
jshilts657 Oct 7, 2024
9d85489
Commit database to container
jshilts657 Oct 7, 2024
d4ae240
dev: renamed and moved things around
jshilts657 Oct 7, 2024
32a9a43
dev: adding different way to build
jshilts657 Oct 7, 2024
2793624
dev: ../Dockerfile
jshilts657 Oct 7, 2024
f7c54c7
dev: changing docker file remvoing step from pipeline
jshilts657 Oct 7, 2024
461b6df
dev: clean up
jshilts657 Oct 7, 2024
cf8f389
dev: added publish stage, more clean-up and refactoring
jshilts657 Oct 7, 2024
0178f78
typo: correct id value
jshilts657 Oct 7, 2024
e4735d4
typo: workflowname
jshilts657 Oct 7, 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
Empty file added .github/.keep
Empty file.
510 changes: 510 additions & 0 deletions .github/workflows/current-workflow.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
182 changes: 180 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,180 @@
# GroupProjectTemplate
Please make sure to modify this readme file as well as the "about" property of the project!
# Team Blockbuster - Top Movies API

#### BU MET CS673 O1: Software Engineering, Fall 2024 - Team 6

## Project Description

Team Blockbuster is creating a microservice Data Science application which will provide the ability to query and display
movie data based on various user inputs using the Kaggle IMDB Top 250 Movies dataset:
<https://www.kaggle.com/datasets/rajugc/imdb-top-250-movies-dataset>

## Motivation

This application provides information for people who are curious about movie trends such as movies ratings across
different countries, movie durations, or specific movie genres and categories, etc. This information can help people
working in the film industry or similar industries in making important movie development choices.

## Framework

This microservice based application is built using a **Python Flask** framework where **ReactJS** will be used to create
a frontend web-page where the user can input data points and **Python** will be used to manage backend operations that
generate the movie data based on the input data received. **SQLite** will be used as the application's database.

Overview:

- **Frontend:** ReactJS
- **Backend:** Python
- **Database:** SQLite

## Tools Used

The following technologies will be used for our project:

- PyCharm Community (**2024.2.2**)
- GitHub Actions
- Python (**v3.12**)
- pip (**v24.2**)
* Python Flask
* PyLint
* Pandas
- Docker (**v27.2.0**)
* Docker Compose (**v2.29.2-desktop.2**)
- Podman (**5.2.2**)
- nodeJS (**v20.17.0**)
- SQLite (**v3**)

## Installation and Set Up

##### Please install the specific versions mentioned in the **Tools Used** section above.

**PyCharm Community**

Please follow download and installation instructions from the link:
https://www.jetbrains.com/pycharm/download/ depending on OS.

**Docker**

Please follow download and installation instructions from the link: https://www.docker.com/ depending on OS.

**Docker Compose**

Docker Compose is part of the Docker installation process.

**nodeJS**

Please follow download and installation instructions from the link: https://nodejs.org/en depending on OS.

**Python**

Please follow download and installation instructions from the link: https://www.python.org/ depending on OS.

**pip**

pip should be installed with the Python downloaded from https://www.python.org/.

**Python Flask**

Using the Python version installed along with pip, please follow the instructions at the link:
https://flask.palletsprojects.com/en/3.0.x/installation/.

**Pandas**
Using the Python version that is installed along with, please use pip to install: Pandas pip3 install pandas

**SQLite**

sqlite3 is part of the Python library when Python was downloaded and installed.

For more information please refer to this link: https://docs.python.org/3/library/sqlite3.html

## How to Run Software

1. Open a command line console and clone the main branch of this repository (SSH approach) in location of choice using
the command below:

`git clone git@github.com:BUMETCS673/seprojects-cs673olf24team6.git`

Note: SSH approach was used for the command above. Please follow the appropriate GitHub guidelines to set up SSH
keys before cloning this repository.

2. Using either file manager or a terminal window navigate to the code directory.

3. To run this application the services must be started in the correct order or an error may occur. The first service to
start is Python Flask
- `cd backend` or navigate to backend directory
- To run the application using Python use `python3 backend.py`
- To run the application using Docker or Podman run the commands below
- docker build -t flask_backend .
- docker run -p 5000:5000 -t flask_backend

4. To Run the frontend application you need be in the /code/frontend directory.
- To run the application using Node use `npm start`
- To run the application using Docker or Podman run the commands below
- docker build -t node-frontend .
- docker run -p 3000:3000 -t node-frontend

5. At this stage in the project you will need to allow a web-browser to open or open web-browser and navigate to
localhost:3000 where you will be able to view the frontend application

## How to Run Tests

### Frontend
1. From frontend directory
2. Podman/Docker build -t node_frontend .
3. Podman/Docker run -idt --name node_frontend node_frontend
4. Podman/Docker exec -it node_frontend /bin/bash
5. ` npm test`


### Backend
1. From backend directory
2. Podman/Docker build -t flask_backend .
3. Podman/Docker run -idt --name flask_backend flask_backend
4. Podman/Docker exec -it flask_backend /bin/bash
5. `cd tests`
6. `pytest process_query_request_test.py`

### Database
1. From database directory
2. Podman/Docker build -t database .
3. Podman/Docker run -idt --name database database
4. Podman/Docker exec -it database /bin/bash
5. `cd tests`
6. `pytest movies_unit_test.py`

## Credits

**Course Instructor:** Yuting Zhang

**Facilitators:** Steve Chin, Trevor Michelson

**Tools Installation Information**
* Docker: https://www.docker.com/
- Docker Compose
* Podman
* nodeJS: https://nodejs.org/en
* Python: https://www.python.org/
- pip
- flask
- pandas
- pylint
* SQLite: https://docs.python.org/3/library/sqlite3.html

**Dataset Information**
* Kaggle IMDB Top 250 Movies dataset: <https://www.kaggle.com/datasets/rajugc/imdb-top-250-movies-dataset>,
* By Chidambara Raju G (2022)

## Meet the Team

**Team Leader:** Joshua Shilts

**Requirements Leader:** Elizabeth Tyree

**Design and Implementation Leader:** Elizabeth Tyree

**Configuration Leader:** Ricky Zheng

**QA Leader:** Alex Flinchum

**Security Leader:** James Zheng

[Contributors Information](./team.md)
4 changes: 4 additions & 0 deletions code/backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.pytestcache
.idea
src/__pycache__
tests/__pycache__
19 changes: 19 additions & 0 deletions code/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3.11-slim

WORKDIR /app

COPY . /app

# Copy requirements file first to leverage Docker cache if requirements haven't changed
COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

# Set PYTHONPATH environment variable
ENV PYTHONPATH=/app

RUN pip install -r requirements.txt

EXPOSE 5000

CMD ["python", "src/backend.py"]
3 changes: 3 additions & 0 deletions code/backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Flask~=3.0.3
flask-cors~=5.0.0
pytest~=7.4.0
55 changes: 55 additions & 0 deletions code/backend/src/backend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from flask_cors import CORS
from flask import Flask, request, jsonify
import json

app = Flask(__name__)
CORS(app)

# TODO Remove when Alex changes have merged
@app.route('/api/getData', methods=['POST'])
def get_data():
data = request.json
input1 = data.get('input1')
input2 = data.get('input2')

# Example logic using the inputs
response_message = f"Received input1: {input1}, input2: {input2}"

return jsonify({'message': response_message})


@app.route('/processQueryRequest', methods=['POST'])
def process_data_request():
data = request.json

# Add error handling for invalid or missing JSON
if not data:
return jsonify({"error": "Invalid or missing JSON data"}), 400

app.logger.info(f"Received: {json.dumps(data)})")

data_diction = db_query(data)

response_message = (f"Rank: {data.get('rank')}, \n"
f"Title: {data.get('title')}, \n"
f"Release start: {data.get('release_start')}, \n"
f"Release end: {data.get('release_end')}, \n"
f"Score: {data.get('score')}, \n"
f"Genre: {data.get('genre_select')}, \n"
f"Rating: {data.get('rating_select')}, \n"
f"Budget: {data.get('budget')}, \n"
f"Box Office: {data.get('box_office')}, \n"
f"Cast: {data.get('cast_select')}, \n"
f"Director: {data.get('director_select')}, \n"
f"Writer: {data.get('writer_select')}")

return jsonify({'Python Received': response_message}), 200

def db_query(data):
#conn(db)
return "Select * {data.get('rank')}"


if __name__ == '__main__':
# Run this application on local host on port 5000
app.run(host='0.0.0.0', port=5000, debug=True)
55 changes: 55 additions & 0 deletions code/backend/tests/process_query_request_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from src import backend
import pytest
import json


@pytest.fixture
def test_client():
with backend.app.test_client() as client:
yield client


def test_process_data_request(test_client):

incoming_request = {
'rank': 1,
'title': 'Monty Python',
'release_start': '1955-07-16',
'release_end': '1999-09-10',
'score': 10.0,
'genre_select': 'Legend',
'rating_select': 'R?',
'budget': 20,
'box_office': 829895144000,
'cast_select': 'All dead',
'director_select': 'Monty Python?',
'writer_select': 'Monty Python?'
}

response = test_client.post('/processQueryRequest',
data=json.dumps(incoming_request),
content_type='application/json')

# Verify that respose is ok type
assert response.status_code == 200

# Check if the response contains expected data
expected_message = (f"Rank: 1, \n"
f"Title: Monty Python, \n"
f"Release start: 1955-07-16, \n"
f"Release end: 1999-09-10, \n"
f"Score: 10.0, \n"
f"Genre: Legend, \n"
f"Rating: R?, \n"
f"Budget: 20, \n"
f"Box Office: 829895144000, \n"
f"Cast: All dead, \n"
f"Director: Monty Python?, \n"
f"Writer: Monty Python?")

response_data = json.loads(response.data)

# Test to ensure the response it correctly formatted
assert 'Python Received' in response_data
# Verify test has the expected data
assert response_data['Python Received'] == expected_message
20 changes: 20 additions & 0 deletions code/database/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.11-slim

# Allows use to access database from shell
RUN apt-get update && apt-get install -y sqlite3

WORKDIR /app

COPY . /app

# Copy requirements file first to leverage Docker cache if requirements haven't changed
COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

# Set PYTHONPATH environment variable
#ENV PYTHONPATH=/app

RUN python /app/src/start_movies.py

CMD [ "tail", "-f", "/dev/null"]
2 changes: 2 additions & 0 deletions code/database/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pandas==2.2.3
pytest==7.4.0
Loading