- Student 1. Aleksi Hytönen, hytonenaleksi@gmail.com
- Student 2. Markus Oja, markus.oja@student.oulu.fi
Remember to include all required documentation and HOWTOs, including how to create and populate the database, how to run and test the API, the url to the entrypoint and instructions on how to setup and run the client
LICENSE = License of the project
README.md. = THIS readmefile.
api_test.py = Test file for api-method testing.
apiary.apib. = Blueprint from Apiary
app.py = Main function(?).
db_test.py = Test file for database testing.
meetings.md = File containing meeting notes.
requirements.txt = Requirements file for installation.
db_test.py = Unit tests for the database.
db.py = Database models.
populate.py = Populate the database with initial values.
README.md = Instructions on how to use the database.
test.db = Populated database with initial values.
addedarticlebuilder.py = Builder for added article resource.
articlebuilder.py = Builder for article resource.
masonbuilder.py = Builder to create resources. Used in other builders as dependency.
userbuilder.py = Builder for user resource.
addedarticleresource.py = Resource for added article collection and item.
articleresource.py = Resource for article collection and item.
entrypoint.py = Application entrypoint.
userresource.py = Resource for user collection and item.
AddedArticle.jsx = One added article component.
api.js = Global configuration of API
Article.jsx = One initial article component
serviceWorker.js = Needed for React application
App.jsx = Landing page.
CheckInitialMemes.jsx = Page to search for the initial memes.
CheckUserMemes.jsx = Page to search, edit and delete user created articles. User can also create a new article for himself.
CreateNewArticle.jsx = Page to create a new user and a new article.
- (Install virtualenv) (virtualenv is not in requirements) (in case with problems on Windows, try first installing with)
python -m pip install virtualenv --user
- Activate python virtual environment in command line
virtualenv pwp
- Activate virtual environment
pwp\Scripts\activate.bat
- install dependencies
pip install -r requirements.txt
- start the API
flask run
Run apitest and db_test with pytest in the root folder. Configure it to check both app.py and src folder. To do this:
pytest --cov=app --cov=src
pytest db_test.py
This command will test CRUD operations in each model. In addition, uniqueness of the date will be tested. The tests will also check that the headline and the modification date are not null.
pytest api_test.py
This command will test the API methods for each resource. (At the moment it tests only user)