Coder Social home page Coder Social logo

erickarschner37 / conditional Goto Github PK

View Code? Open in Web Editor NEW

This project forked from computersciencehouse/conditional

0.0 1.0 0.0 1.25 MB

CSH Evals, the modern way.

Home Page: https://conditional.csh.rit.edu

License: MIT License

Python 35.80% HTML 32.15% JavaScript 22.07% Mako 0.10% Dockerfile 0.19% SCSS 9.70%

conditional's Introduction

Conditional

Build Status

A comprehensive membership evaluations solution for Computer Science House.

Development

To run the application, you must have the latest version of Python 3 and virtualenv installed. Once you have those installed, create a new virtualenv and install the Python dependencies:

virtualenv .conditionalenv -p `which python3`
source .conditionalenv/bin/activate
pip install -r requirements.txt
export FLASK_APP=app.py

In addition, you must have Node, NPM, and Gulp CLI installed to properly execute the asset pipeline. If you don't have Node installed, we recommending installing with NVM:

nvm install
nvm use
npm install -g gulp

Then, install the pipeline and frontend dependencies:

npm install

Config

You must create config.py in the top-level directory with the appropriate credentials for the application to run. See config.sample.py for an example.

Add OIDC Config

Reach out to an RTP to get OIDC credentials that will allow you to develop locally behind OIDC auth

# OIDC Config
OIDC_ISSUER = "https://sso.csh.rit.edu/auth/realms/csh"
OIDC_CLIENT_CONFIG = {
    'client_id': '',
    'client_secret': '',
    'post_logout_redirect_uris': ['http://0.0.0.0:6969/logout']
}

Run

Once you have all of the dependencies installed, simply run:

npm start

This will run the asset pipeline, start the Python server, and start BrowserSync. Your default web browser will open automatically. If it doesn't, navigate to http://127.0.0.1:3000. Any changes made to the frontend files in frontend or the Jinja templates in conditional/templates will cause the browser to reload automatically.

Database Migrations

If the database schema is changed after initializing the database, you must migrate it to the new schema by running:

flask db upgrade

At the same time, if you change the database schema, you must generate a new migration by running:

flask db migrate

The new migration script in migrations/versions should be verified before being committed, as Alembic may not detect every change you make to the models.

For more information, refer to the Flask-Migrate documentation.

Old Evals DB Migration

Conditional includes a utility to facilitate data migrations from the old Evals DB. This isn't necessary to run Conditional. To perform this migration, run the following commands before starting the application:

pip install pymysql
flask zoo

conditional's People

Contributors

mbillow avatar liam-middlebrook avatar devinmatte avatar stevenmirabito avatar csssuf avatar mxmeinhold avatar ramzallan avatar talcohen avatar brandonhudson avatar dependabot[bot] avatar com6056 avatar zthart avatar adamhb123 avatar galenguyer avatar audiolion avatar sethgower avatar sman591 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.