Giter VIP home page Giter VIP logo

bamboo-blossom's Introduction

bamboo-blossom

Build Status

A web application that publishes BambooHR employee hire dates to an iCal feed. Please be aware that this functionality already comes bundled as a feature in BambooHR.

Getting Started

First, ensure that the following environment variables are set inside of a local .env file at the root of the repository. Use .env.example as a guide.

  • BB_API_SECRET_KEY - User-defined secret key required for ?key= request authorization
  • BAMBOOHR_SUBDOMAIN - Subdomain name of your BambooHR organization
  • BAMBOOHR_API_KEY - BambooHR API key

Next, bring up the development environment (a Falcon WSGI application, and Redis) using Docker Compose.

$ docker-compose up

Then, populate the Redis cache with employee hire dates. This step isn't 100% necessary, but it helps to populate the cache outside the context of a request/response cycle to avoid timeouts if you have more than a handful of employees.

$ docker-compose run --rm app python populate.py

Lastly, interact with the API to retrieve employee hire dates as an iCal calendar.

$ http "localhost:8000?key=..."
HTTP/1.1 200 OK
Connection: close
Date: Sat, 17 Mar 2018 14:59:53 GMT
Server: gunicorn/19.7.1
content-length: 214
content-type: text/calendar

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Azavea//NONSGML bamboo-blossom//EN
BEGIN:VEVENT
DTSTART;VALUE=DATE:20180815
DTEND;VALUE=DATE:20180816
TITLE:John Doe (Started: 2013-03-03)
END:VEVENT
END:VCALENDAR

Testing

To execute the linter and test suite use pylint and pytest, respectively.

$ docker-compose run --rm app pylint bamboo_blossom
$ docker-compose run --rm -e BB_API_SECRET_KEY= app pytest tests

bamboo-blossom's People

Contributors

hectcastro avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bamboo-blossom's Issues

Make iCal feed extend to 4-5 years

Currently, the iCal feed is only populated with events for the current year. Modify the event creation logic to create events for 4-5 years out.

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.