Time Management & Stuff
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Fix incomplete sets of students on parallels/events Nov 4, 2018
config Fix default :umapi_privileged_roles to use new SUMA role Nov 20, 2017
db Add "name" to semester_periods table and representer Jul 12, 2017
docs Fix examples of schedule_exceptions in RAML, remove holidays Jul 12, 2017
lib Switch to original oauth2 gem Dec 2, 2017
log Strip Rails, use service-skeleton May 1, 2014
script Improve dump_seeds script to print absolute path of the dump Apr 12, 2017
spec Add "name" to semester_periods table and representer Jul 12, 2017
.editorconfig Add .editorconfig [ci skip] Mar 30, 2014
.env.sample Prepare chewy (ElasticSearch) Jul 6, 2015
.env.test Prepare chewy (ElasticSearch) Jul 6, 2015
.gitignore Ignore .envrc files for direnv Jun 24, 2015
.hound.yml
.rspec Rspec documentation format Jul 24, 2014
.simplecov Fix .simplecov, ::[] is deprecated, replaced by ::new May 20, 2016
.travis.yml Travis: Fix ElasticSearch installation Jul 12, 2017
.yardopts Prepare documentation tooling Jul 16, 2014
Gemfile Use role_playing from RubyGems Jan 21, 2018
Gemfile.lock Use role_playing from RubyGems Jan 21, 2018
Guardfile Guard: disable notifications for shotgun Sep 17, 2015
LICENSE Add LICENSE (MIT) Jun 16, 2017
Procfile Replace clockwork with rufus-scheduler Oct 13, 2014
README.md Update prerequisites in README May 12, 2017
Rakefile Separate raml:publish task to raml.rake Jul 8, 2015
config.ru Move config/routes to lib/routes Jul 8, 2015
vagga.yaml Vagga: generate locale for cs_CZ Mar 29, 2017

README.md

Sirius: CTU Time management API

Build Status Code Climate Coverage Status Inline docs Dependency Status

Sirius is a Timetable management API, which is used at CTU FIT to transform regular timetables into accurate calendars. Main Sirius output are calendar events and their collections (calendars). Same events can be viewed from different perspectives, creating different calendar types (personal, room or course calendar).

Main timetable data source is KOS IS, which is accessed via KOSapi. Timetables from KOS are then converted to events according to scheduling rules and exceptions stored in local Sirius database. Currently supported output data formats are JSON (for client apps) and iCalendar (for users).

API documentation

Documentation of resources which Sirius provides is currently available here.

Looking for help?

If you need help with adding you personal calendar to the calendar software you are using, check out our wiki tutorial page.

If you have an issue with your personal calendar or any other problems, feel free to use project issues on Github or you could just message us directly.

Suggestions, ideas and contributions

We are welcome to suggestions and ideas about this project. Please use project issues to discuss it if you have one.

If you feel you could improve project in some way, you can fork this repo and send a pull request with your change. If you consider adding a new feature or significantly changing behaviour of an existing one, it would be nice to discuss it with project maintainers beforehand, otherwise there is a possibility that your pull request might not get accepted.

Setup

After cloning this repo, run script/setup to bootstrap your configuration. This will create .env file in project root with reasonable defaults that you can change after that.

Prerequisites

  • Ruby/MRI 2.3+
  • PostgreSQL 9.5+
  • ElasticSearch 1.* (not mandatory, used only for /search resource)

Environment variables

Variables put into .env file will be automatically loaded by Foreman.

You will need an OAuth 2.0 credentials (for KOSapi and Usermap API) from the Apps Manager and local PostgreSQL database and ElasticSearch. If you don’t need the /search resource, then you can omit ElasticSearch (just put any URI into ELASTIC_URL to pass check).

DATABASE_URL=postgres://localhost:5432/sirius-development
ELASTIC_URL=http://localhost:9200
OAUTH_CLIENT_ID=xxx-xxxx-xxxx
OAUTH_CLIENT_SECRET=yyyyyyyyy

Running server and rake tasks

To start the API server, just run foreman start. If everything is configured properly, server should start and be accessible on port 5000 by default.

To load parallels from KOSapi and and schedule them, call foreman run rake sirius:events. Or you can call individual tasks:

  • sirius:events:import - fetches parallels from KOSapi to local database
  • sirius:events:import_students - fetches students assigned to stored parallels
  • sirius:events:plan - plans stored parallels
  • sirius:events:assign_people - assigns people (students and teachers) to planned events