GithubHelp home page GithubHelp logo

oraki23 / rubik Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krystosterone/rubik

4.0 1.0 0.0 44.4 MB

A tool for students to easily and intuitively generate schedule combinations for different school trimesters

Home Page: http://ets.rubik.co

Ruby 11.00% HTML 84.83% JavaScript 0.21% Gherkin 0.57% Shell 0.01% Sass 0.47% SCSS 2.07% Haml 0.80% Dockerfile 0.04% Procfile 0.01%

rubik's Introduction

Rubik Circle CI Code Climate codecov

Rubik is a tool for students to easily and intuitively generate schedule combinations for different school trimesters.

For now, Rubik is only used for l'École de Technologie Supérieure at ets.rubik.co. The hopes is to eventually expand the platform to other schools and/or organizations. As such, the code is written in a way that it does not do make assumptions on a specific domain language. Apart for some hardcoding of banners and translations, the software should be re-usable for other schools fairly easily.

Dependencies

  • Airbrake
  • Chromium
  • MySQL
  • Node and Yarn
  • The pdftotext command line utility
  • PhantomJS 2.1.1
  • Redis
  • Sendgrid

Getting it up and running

  1. Clone the repository
  2. bundle install
  3. yarn install
  4. bundle exec rails db:create db:migrate db:test:prepare db:seed

Useful commands

  • Run all specs: bundle exec rspec
  • Run all feature tests: bundle exec cucumber
  • Run the ruby linter: bundle exec rubocop
  • Run the javascript linter: yarn run eslint app/assets/javascripts/**/*

Adding a new trimester

For ets.rubik.co, there exists an ETL to parse PDFs provided by the school and transform it into a dataset useable by the website. The process looks like this:

  1. Download all PDFs you want to include on the website here: Horaires et planification des cours : baccalauréats
  2. Move them to https://github.com/Krystosterone/rubik/tree/ff7dec33e0ad6263cedc488b811bdea7c238b42e/db/raw/ets and create the appropriate folder structure
  3. Run bundle exec rails ets_pdf:etl with the appropriate folder pattern. For example:
PDF_FOLDER=db/raw/ets/2017/ete/**/* bundle exec rails ets_pdf:etl
  1. This will create *.txt files along side the PDFs; if the rake task fails, explore the error that occured while parsing a particular *.txt and manually fix it
  2. Repeat steps 4 and 5 until done
  3. Commit the *.pdfs and *.txt to git

Once all of this is done and pushed to production, run one last time bundle exec rails ets_pdf:etl (again with the appropriate PDF_FOLDER) to import the data to the production database.

Issues

Feel free to submit issues and enhancement requests.

Please note though that a good issue is often an issue accompagnied with a pull request.

Contributing

To contribute:

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

Copyright and Licensing

There is no licensing by choice: you can contribute to the project, open issues and pull requests but hosting it as your own is strictly forbidden. If you want to do so, please contact me first.

rubik's People

Contributors

krystosterone avatar oraki23 avatar dependabot[bot] avatar hyftar avatar brianquirion avatar tqueri avatar wilomgfx avatar

Stargazers

JP avatar Samuel Montambault avatar Camille Brulotte avatar Wylliam 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.