Code Monkey home page Code Monkey logo

4castinate's Introduction

4castinate

About

An automated, out-of-the-box solution to predict delivery dates in agile businesses. Useful for Project and Product Managers to forecast and report when a certain feature/project/milestone will be completed - and for Scrum Masters to understand when a team's backlog (or any set of issues determined from a JQL Query) will be done and how the team is progressing.

The forecasts are made via Monte Carlo Simulations to provide a more accurate accounting for risk. Accuracy and determinism of results is ensured by aggregating 1.000.000 simulations per forecast.

Built for Jira Integration, but it can be used without it.

Developed at FundingCircle. Inspired by FocusedObjective.

DEMO

Output sample

Install

0. Prerequisites:

   - Python 3.6

   - pip

   - virtualenv
   
   - virtualenvwrapper

   - awsebcli

1. Clone and cd into root (outer 'ebdjango' dir) - all shell commands below are executed from root

2. Create a new virtualenv by running:

   mkvirtualenv django-dev-env

3. Activate it:

   workon django-dev-env

4. Install requirements for your virtualenv:

   pip install -r requirements.txt

5. Run the application locally:

5.1 Set up OAuth authentication for Jira REST API - recommended for both Jira Cloud and Jira Server

(skip to 5.2 if you don't want to use Jira REST API)

(skip to 5.2 for Basic authentication - works only for Jira Cloud, but configuration is much easier)

5.1.1 Follow Step 1: Configure Jira, but put the created files in same directory as 'jira_oauth_script.py' (overwrite the existing files).
5.1.2 Run the script and follow instructions in the terminal. Remember the contents of 'oauth_token' and 'oauth_token_secret' printed in the terminal.
   python forecast/helperMethods/oauth/jira_oauth_script.py 

5.2 Set environment variables in your virtualenv

5.2.1 Open the environment file:
   open ~/.virtualenvs/django-dev-env/bin/activate
5.2.2 Edit the environment file with the needed variables (paste them at the end of the file, one per line). If you don't want to fetch data from Jira, just export the Jira Variables as given below. If you've opted for OAuth, edit the jira_oauth_token and jira_oauth_token_secret variables (5.1.2). If you've opted for Basic authentication, edit the jira_email and jira_api_token variables. In both cases, edit the jira_url variable and DON'T edit the variables for the other case. Note that you need the SECRET_KEY variable set up properly (it is used internally by Django):
   export SECRET_KEY='<your secret Django key>'

   export JIRA_URL='https://<your_jira_domain>.atlassian.net'

   export JIRA_EMAIL='<jira_user_email>'
   export JIRA_API_TOKEN='<jira_api_token>'

   export JIRA_OAUTH_TOKEN='<oauth_token>'
   export JIRA_OAUTH_TOKEN_SECRET='<oauth_token_secret>'
5.2.3 Deactivate environment:
   deactivate
5.2.4 Activate it back to reload the new changes:
   workon django-dev-env
5.2.5 To verify that the variables are set up, run this for each of them:
   echo $SECRET_KEY

5.3 Run the app on localhost:

     python manage.py runserver

5.4 Test the app:

     python manage.py test forecast

5.5 Test the app with code coverage:

     coverage run --source='./forecast' --omit='./forecast/helperMethods/oauth/jira_oauth_script.py' manage.py test forecast

Followed by:

     coverage report -m

6. Deploy the app with eb cli.

6.1 Follow steps 1-3. The EB CLI init steps you'll have to perform just at the time when you clone the repo:

6.2 Set EB environment variables. This has to be done for each new environment you make on AWS EB:

   eb setenv SECRET_KEY=$SECRET_KEY JIRA_API_TOKEN=$JIRA_API_TOKEN JIRA_URL=$JIRA_URL JIRA_EMAIL=$JIRA_EMAIL JIRA_OAUTH_TOKEN=$JIRA_OAUTH_TOKEN JIRA_OAUTH_TOKEN_SECRET=$JIRA_OAUTH_TOKEN_SECRET
   
   You can verify they were set in Elastic Beanstalk by running:
   eb printenv

6.3 Deploy your local repository:

   eb deploy

6.4 Access the website manually / from eb cli step 7:

   eb open

6.5 Cleanup.

7. Note: If you install other dependencies (i.e. pip install), before you commit, do:

   pip freeze > requirements.txt

4castinate's People

Contributors

msm416 avatar

Stargazers

 avatar  avatar

Watchers

 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.