diff --git a/.travis.yml b/.travis.yml index 41e17cda..d4b269d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,8 @@ -language: node_js -node_js: - - 12.18.3 -cache: npm - +language: python +python: + - "3.6" + - "3.7" install: - - npm ci + - pip install -r requirements.txt script: - - npm test - - npm run build -deploy: - provider: pages - skip-cleanup: true - github-token: $GITHUB_TOKEN - local_dir: build - on: - branch: master \ No newline at end of file + - python -m pytest diff --git a/PLAN_OF_ACTION.md b/PLAN_OF_ACTION.md new file mode 100644 index 00000000..bf9a17d7 --- /dev/null +++ b/PLAN_OF_ACTION.md @@ -0,0 +1,13 @@ +1. Create an interface to run "TeamAssigner.py" after entering new member and project details. Currently, this needs to be done explicitly from the terminal. +2. Currently, "TeamAssigner.py" executes for all the members (new and old). Realistic scenario will be to run the algorithm for new members only. Therefore, update "TeamAssigner.py" for the same. +3. Provide State Management to ensure that the URLs will be accessed only after a particular action is executed. As for an example "/success" should be accessible only after form submit has been performed and not otherwise. +4. Use ORM instead of raw SQL queries for the backend. +5. Wrap the code and create a package so that the entire application can be downloaded from some standard package manager (eg. pip). +6. Dockerise the application. +7. Hosting the website on to AWS. +8. Improve error handling to display relevant error messages instead of generic error messages on the front end. +9. Include test cases for frontend and backend testing as well as end-to-end testing. +10. Continuous testing using TRAVIS +11. Create end-to-end flow by integrating separate code chunks of NodeJs, JavaScript and Flask. +12. Restructure the code to logically seperate different sections in the code base +13. Add syntax checkers, linters, code formatters, remove redundant files from gitignore, add more badges diff --git a/README.md b/README.md index 2e0969c6..45af8796 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/lokesh45/TeamFormationAssistant.svg?branch=master)](https://travis-ci.org/lokesh45/TeamFormationAssistant) +[![Build Status](https://travis-ci.org/AmitMandliya/TeamFormationAssistant.svg?branch=master)](https://travis-ci.org/AmitMandliya/TeamFormationAssistant) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8475.svg)](https://doi.org/10.5281/zenodo.8475) # Team Formation Assistant ## Problem Statement diff --git a/package.json b/package.json index a229c256..b72d5fbe 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,14 @@ "private": true, "dependencies": { "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.5.0", "@testing-library/user-event": "^7.2.1", "axios": "^0.20.0", + "body-parser": "^1.19.0", + "cors": "^2.8.5", "express": "^4.17.1", "faker": "^5.1.0", "lodash.samplesize": "^4.2.0", + "mysql": "^2.18.1", "mysql2": "^2.2.2", "react": "^16.13.1", "react-bootstrap": "^1.3.0", @@ -43,6 +45,7 @@ ] }, "devDependencies": { + "@testing-library/react": "^9.5.0", "gh-pages": "^3.1.0" } } diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..04c322ad --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +click==7.1.2 +Flask==1.1.2 +Flask-Cors==3.0.9 +itsdangerous==1.1.0 +Jinja2==2.11.2 +MarkupSafe==1.1.1 +six==1.15.0 +Werkzeug==1.0.1 +pandas diff --git a/src/frontend_tests/Signup.test.js b/src/frontend_tests/Signup.test.js new file mode 100644 index 00000000..a0e0b7b0 --- /dev/null +++ b/src/frontend_tests/Signup.test.js @@ -0,0 +1,24 @@ +import Signup from '../Signup.js'; +import React from 'react'; +import renderer from 'react-test-renderer'; +import { BrowserRouter } from 'react-router-dom'; + +test('snapshot headjs renders', () => { + const component = renderer.create(); + let tree = component.toJSON(); + expect(tree).toMatchSnapshot(); +}); + + +test('snapshot midpart renders', () => { + const component = renderer.create(); + let tree = component.toJSON(); + expect(tree).toMatchSnapshot(); +}); + +test('snapshot formblock renders', () => { + const component = renderer.create(); + let tree = component.toJSON(); + expect(tree).toMatchSnapshot(); +}); + diff --git a/tests/test_TeamAssigner.py b/tests/test_TeamAssigner.py new file mode 100644 index 00000000..aaa2a9cd --- /dev/null +++ b/tests/test_TeamAssigner.py @@ -0,0 +1,5 @@ +import warnings +import pytest + +def test(): + assert 1 == 1