create a testing environment. create stubs. Check if inputs create outputs. create test for each unit test
Revamping the syllabus management system
I am using python 3.7.2. I think this is the most recent stable version. Make sure you are using the correct python command that is mapped to the correct python version.
Once you clone the git repository, you must do a couple things to get this working on your local machine.
$ python -m venv venv
$ venv/Source/activate
$ source venv/bin/activate
(venv) $ _
<-- you should see this if enviroment is activated
(venv) $ pip install -r requirements.txt
(venv) $ pip freeze > requirements.txt
$ flask run
You must set up your own mysql server on your local machines
do not push the config file until I fix the flaskenv file loading
We used the fillowing sql command to get the database info. Run this command from inside a mysql console.
mysql > select * from information_schema.processlist;
change the config variable SQLALCHEMY_DATABASE_URI
"dialect[+driver]://user:password@host/dbname" <-- this is the standard format. fill in the correct info for your local database
upgrade migration with:
(venv) $ flask db upgrade
downgrade migration with:
(venv) $ flask db downgrade
This project implements database migrations with flask-migrate.
Create a migration with:
(venv) $ flask db migrate -m "migration name"
We probably won't be using PUT, PATCH, and DELETE requests. But this is ideally how it should be done. This link also shows a good list of errors.
The Flask Mega Tutorial is a good start if anything here confuses you.
Explore Flask is the best resourse for the design patterns we will be using. Check it out.