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 or try running:
./script/ets_download_pdfs
- Move them to db/raw/ets and name them accordingly for easy debugging.
- Run
bundle exec thor ets_pdf:etl
with the appropriate file patterns (ending with.pdf
). For example:
bundle exec thor ets_pdf:etl -d $(find db/raw/ets -iname "2022-*.pdf")
or
bundle exec thor ets_pdf:etl
to run it on all PDFs.
- 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 thor ets_pdf:etl
(again with the appropriate appropriate file patterns, if needed) 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!
See LICENSE