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.
- Airbrake
- Chromium
- MySQL
- Node and Yarn
- The
pdftotext
command line utility - PhantomJS 2.1.1
- Redis
- Sendgrid
- Clone the repository
bundle install
yarn install
bundle exec rails db:create db:migrate db:test:prepare db:seed
- 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/**/*
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:
- Download all PDFs you want to include on the website here: Horaires et planification des cours : baccalauréats
- Move them to https://github.com/Krystosterone/rubik/tree/ff7dec33e0ad6263cedc488b811bdea7c238b42e/db/raw/ets and create the appropriate folder structure
- 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
- 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 - Repeat steps 4 and 5 until done
- 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.
Feel free to submit issues and enhancement requests.
Please note though that a good issue is often an issue accompagnied with a pull request.
To contribute:
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- 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!
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.