Git Product home page Git Product logo

call-rota's Introduction

#Call Rota Generate on-call rotas given information about people.

##Purpose

Generates a collection of people who can be on call for second line for a week, following certain rules:

  • No more than 1 person from the same team
  • At least 1 person with production access (that isn't web operations)
  • Has 2 developers and 1 web operations person on it

##Nomenclature

  • rota_skill_group indicates whether a person has a development or a web operations skillset.
  • RotaWeek is the current output produced by a RotaWeekBuilder. This exposes three methods:
    • web_ops - the person with a web operations speciality. It is a requirement to have at least one web operations person on the rota each week.
    • dev - the person with a development speciality and production access. It is a requirement to have one developer with production access on the rota each week.
    • supplemental_dev - another person with a development speciality. This person may or may not have production access.

##Dependencies

No external services.

The input format has been designed to match the current data from the Google Spreadsheets used at GDS to manage on-call rotas.

##Running the application

require 'people_collection_factory'
require 'rota_week_builder'

#people_inputs and deploy_access_inputs in the format described below
people = PeopleCollectionFactory.new(people_inputs, deploy_access_inputs)

rota_week = RotaWeekBuilder.new(people).call

##Running the test suite

$ bundle exec rake

##Application structure A collection of people is generated by a PeopleCollectionFactory, which is then used by a RotaWeekBuilder to build a RotaWeek.

A PeopleCollectionFactory takes in two sets of input data.

###people_inputs An array where each element in the array describes a person that can be placed in the rota. Each element must follow the below format:

{
  full_name: "Tom Russell",
  use_name: "Tom R", # Unique shortened identifier for a person
  team: "User Formats", # Free text, uniquely identifies the team
  rota_skill_group: "developer", # Either 'developer' or 'webops'
}

###deploy_access_inputs An array where each element in the array gives the use_name of a user with production access. Each element must follow the below format:

{
  use_name: "Tom R", # Unique shortened identifier for a person.
}

##Future work

  • Add CSV parsing for input data.
  • Add CSV output.
  • Add bin script to run the application.
  • Add rule: no more than 1 tech lead at a time -- a canonical source of who is and is not a tech lead does not appear to be available yet.
  • Rotate people fairly: this requires historical knowledge of who has been on call, and whether they were webops, dev or supplemental_dev.
  • Generate more than one week at a time.

call-rota's People

Contributors

camillebaldock avatar kalleth avatar bradwright avatar

Watchers

Tom Holder avatar 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.