- Built in Flask
- Flask-Mongoengine and Mongoengine are used to interface with MongoDB
- Authentication is done with Google+ server-side flow
- Forms and validation are done through Flask-WTForms and WTForms
- CSS is generated from SCSS and managed with Flask-Assets
- Configurations are managed using envirnonment variables.
- Development is done using Vagrant.
- Deployment is done using Docker.
Eventum can be run locally on your machine, or in a virtual environment, using Vagrant. Default to use Vagrant, unless you have some reason to run Eventum locally.
-
Generate secrets files:
-
ADI: Download the ADI website secrets from GitHub. Unzip the folder, and copy its contents into the
config
directory.If the link gives a 404 error, ask someone within the ADI GitHub organization for access
-
non-ADI: Copy
config/settings.example
toconfig/settings.dev
, and fill in the four parameters that are set to empty strings. Then, either setup Google Auth yourself, or disable it.
-
-
Install Virtual box.
-
Once Vagrant is installed, install Vagrant.
Eventum runs natively on Linux and OSX. To get it up an running, follow these steps:
-
Generate secrets files:
-
ADI: Download the ADI website secrets from GitHub. Unzip the folder, and copy its contents into the
config
directory.If the link gives a 404 error, ask someone within the ADI GitHub organization for access
-
non-ADI: Copy
config/settings.example
toconfig/settings.dev
, and fill in the four parameters that are set to empty strings. Then, either setup Google Auth yourself, or disable it.
-
-
Install MongoDB (Ubuntu Linux, OSX).
On OSX, you may have to run
mkdir /data /data/db
before you can runmongod
without errors. -
Install VirtualEnv:
sudo pip install virtualenv
-
Install SASS gem
gem install sass
Otherwise, you will see an intermittent
OSError
vagrant up # Wait for installation
vagrant ssh # Enter your virtual machine
cd /vagrant # Enter your project directory
source config/settings.dev # Set environment variables
python run.py # Run the application
Finally, go to localhost:5000
in your web browser.
./develop.sh # MongoDB and Pip
source bin/activate # Enter the virtual environment
source config/settings.dev # Set environment variables
python run.py # Run the application
Finally, go to localhost:5000
in your web browser.
It is possible to run Eventum without logging in using Google+ or authenticating with Google Calendar. To do so, edit config/settings.dev
and change the line:
export GOOGLE_AUTH_ENABLED='FALSE'
to:
export GOOGLE_AUTH_ENABLED='TRUE'
Then, re-source that settings file
source config/settings.dev # Set environment variables
Eventum uses Sphinx to compile documentation to an HTML website. This documentation is generated from the source code.
First, enter your development environment. See "Developing" for more. Then, generate the docs:
cd docs
make html # Generate docs in /docs/_build/html
cd _build/html
python -m SimpleHTTPServer . # Host the docs on localhost:8000
Tests live in the test
directory, and can be run via nosetests
. We also use flake8
for linting .py
files.
First, enter your development environment. See "Developing" for more. Then, run the tests:
flake8 app config test script # Run the flake8 linter on our python files
nosetests --with-progressive # Run test scripts
.
├── .travis.yml # Configurations for Travis-CI continuous integration
├── eventum # All code related to the eventum
│ ├── config # Configuration files
│ ├── forms # Flask-WTForms models, used for generating forms in
│ │ # HTML and validating input
│ ├── lib # Misc helpers, tasks, and modular libraries
│ ├── models # Mongoengine Models
│ ├── routes # All Flask routes, using Blueprints
│ ├── script # Scripts run by `manage.py` outside of the app
│ ├── static # Static files. Note: All files in here are public
│ │ ├── css # CSS
│ │ │ ├── lib # CSS libraries
│ │ │ └── gen # CSS generated from SCSS
│ │ ├── img # Images
│ │ ├── js # JavaScript files
│ │ └── eventum_scss # Stylesheets
│ ├── templates # HTML templates
│ └── __init__.py # All eventum-wide setup. Includes the `Eventum` class.
├── app.py # Simple example app
├── authorize.py # Used for authorizing the app with Google Calendar
├── data # Backup data
├── deploy.sh # Run on our deployment server to deploy a new version
├── develop.sh # Used for non-Vagrant local Development
├── Dockerfile # Holds Docker configurations
├── docs # Eventum documentation, generated using Sphinx
├── manage.py # Various scripts. Run `python manage.py` to view usage
├── run.py # Runs the app!
├── test # Unit tests
└── Vagrantfile # Configurations for Vagrant