Chung-Yi Chi's personal website
starsirius is Chung-Yi Chi's id on PTT (PTT Bulletin Board System, telnet://ptt.cc) as well as the permanent name of his personal website.
The following Quality Attributes and Tradeoffs hold:
Code follows the core practices of The Art of Readable Code
The architecture makes guarantees of:
TODO
On OSX Mountain Lion, get Homebrew and do:
brew install postgres
Run the script to create, start and stop the users database:
cd data && sh mk_db.sh
sh mk_env.sh
resource/ # Change the default template and static folder path, need to modify the app config.
templates/
partials/
static/
src/
star/
setup.py # For setuptools to make a package
development.ini
star/
__init__.py
server.py
views/
models/
lib/
controllers/
Create the mk_env.sh script that will make the virtualenv, install requirements and the project. It will run the following steps:
Install virtualenv
sudo pip install virtualenv
See the official Flask documentation for more information of virtual environment.
Create a virtual environment named starenv
virtualenv starenv
Activate the virtualenv and install requirements
source starenv/bin/activate
pip install -r requirements.txt
Install the project egg as a "develop egg"
We use setuptools to make a package. Make sure the setup.py is configured correctly. See an example.
cd src/star
python setup.py develop
Drop in HTML5 Boilerplate templates for HTML templates
See the official HTML5 Boilerplate website for more information.
Set up postgres database, Flask-SQLAlchemy, SQLAlchemy, and psycopg2 driver. Write SQLAlchemy model classes.
Set up database migrate environment with alembic
See the official alembic tutorial for more information.
TODO
TODO