Package: pd-sprintstats
# Sprint StatsThis is a python script you can run after a completed sprint to gather some statistics about that sprint from JIRA.## License[Apache 2](http://www.apache.org/licenses/LICENSE-2.0)## ContributingFeel free to fork the repository and submit any useful changes back as via a pull request.## InstallationRun `sudo -H pip install pd-sprintstats`## Usage### PrerequisitesTo use the script, you need a few things.* The url for a valid JIRA instance (e.g. https://company.atlassian.net)* A user with access to that instance (e.g. jdiller)* That user's password.The easiest thing to do is make a config file and specify these things there using the following format:[default]user=YOUR_USERserver=https://pagerduty.atlassian.net/password=YOUR_PASSWORDThe script will look for the config file in the following locations (if found, the higher item on this list takes precedence):* In the location specified in the command line with the `--config` or `-c` option.* A file named `config.cfg` in the current working directory.* A file named `.sprintstats.cfg` in the current user's home directory *Recommended** `/usr/local/etc/sprintstats.cfg`* `/etc/sprintstats.cfg`Alternatively, you can specify the credentials on the command line. See the help-text.###Run your sprint statsOnce you've got your credentials set up, you can process some stats!$ sprintstats -b "My Board" -t "My Sprint" --project "AProject"Completed Issues================MB-2      As a user I can print my scheduleMB-3      As a user I can export my schedule as a PDF fileMB-4      As an admin I can give users permission to print or export schedulesIncomplete Issues=================MB-9      As a user I can export my schedule as a CSV fileMB-14     As a user I can import a schedule from a CSV FileCycle Time Statistics=====================cycle_time_stddev   :12.1537766029velocity            :44.0min_cycle_time      :4average_cycle_time  :16.0max_cycle_time      :38### Scripts and Options$./sprintstats -husage: sprintstats [-h] [--user USER] [--password PASSWORD] [-P][--list-boards] [--server SERVER] [--board [BOARD]][--sprint [SPRINT]] [--project PROJECT] [--config CONFIG][--json]Gather some statistics about a JIRA sprintoptional arguments:-h, --help            show this help message and exit--user USER, -u USER  The JIRA user name to used for auth. If omitted thecurrent user name will be used.--password PASSWORD, -p PASSWORDThe JIRA password to be used for auth. If omitted youwill be prompted.-P                    Prompt for password.--list-boards, -l     When supplied, a list of RapidBoards and theirassociated IDs are displayed--server SERVER, -s SERVER--board [BOARD], -b [BOARD]The name or id of the rapidboard that houses thesprint for which you want to gather stats.--sprint [SPRINT], -t [SPRINT]The name of the sprint on which to produce the stats--project PROJECT, -r PROJECTThe project for which to gather backlog stats--config CONFIG, -c CONFIGThe path to a config file containing jira serverand/or credentials (See README.md)--json, -j            Produce output in JSON format##Wiki-fy the resultsIf you want to create a sprint review wiki page, you can pipe the json output from the `sprintstats` script into the `wikifysprint` script.usage: wikifysprint [-h] [--user USER] [--password PASSWORD] [-P][--server SERVER] [--config CONFIG] [--space SPACE][--parent [PARENT]] [--title TITLE]Create a new Confluence page with sprint statsoptional arguments:-h, --help            show this help message and exit--user USER, -u USER  The Confluence user name to used for auth. If omittedthe current user name will be used.--password PASSWORD, -p PASSWORDThe Confluence password to be used for auth.-P                    Prompt for password.--server SERVER, -s SERVER--config CONFIG, -c CONFIGThe path to a config file containing Confluence serverand/or credentials (See README.md)--space SPACE, -e SPACEThe space that will contain the created/updated page--parent [PARENT], -r [PARENT]The parent of the created/updated page.--title TITLE, -t TITLEThe title of the created/updated pageThis script will use the same credentials files in the same precedence as the statistics gathering sscript.###Using the two togethersprintstats -b "My Board" -t "My Sprint" -r "AProject" --json | wikifysprint -e "Team Space" -t "My Sprint Review"##Wiki-fy Trello BoardsWe use Trello boards to conduct retros, but want to capture the state of the board in our wiki. An additional script can be used to take a snapshot of the state of the trello board and convert it into a wiki page. It uses many of the same options as the sprint review wiki script.usage: trello2wiki [-h] [--user USER] [--password PASSWORD] [--board BOARD][-P] [--server SERVER] [--config CONFIG] [--space SPACE][--parent [PARENT]] [--title TITLE][--trello-key TRELLO_KEY] [--trello-secret TRELLO_SECRET][--trello-token TRELLO_TOKEN][--trello-token-secret TRELLO_TOKEN_SECRET]Create a new Confluence page with the contents of a trello boardoptional arguments:-h, --help            show this help message and exit--user USER, -u USER  The Confluence user name to used for auth. If omittedthe current user name will be used.--password PASSWORD, -p PASSWORDThe Confluence password to be used for auth.--board BOARD, -b BOARDThe name or id of the trello board to convert to awiki page-P                    Prompt for confluence password.--server SERVER, -s SERVER--config CONFIG, -c CONFIGThe path to a config file containing Confluence serverand/or Trello credentials (See README.md)--space SPACE, -e SPACEThe space that will contain the created/updated page--parent [PARENT], -r [PARENT]The parent of the created page. (Ignored if the pagealready exists)--title TITLE, -t TITLEThe title of the created/updated page--trello-key TRELLO_KEYAPI Key for Trello Authentication--trello-secret TRELLO_SECRETAPI Secret for Trello Authentication--trello-token TRELLO_TOKENOAuth Token for Trello Authentication--trello-token-secret TRELLO_TOKEN_SECRETOAuth Token Secret for Trello Authentication## Trello AuthenticationYou will need trello authentication tokens to use this script. They can be specified on the command line or added to one of the config files above using the following key/value pairs:trello_key=REPLACE_WITH_YOUR_API_KEYtrello_secret=REPLACE_WITH_YOUR_API_SECRETtrello_token=RELPLACE_WITH_OAUTH_TOKENtrello_token_secret=REPLACE_WITH_OAUTH_TOKEN_SECRETYou can find the information for how to obtain the above tokens [in the Trello API documentation](https://trello.com/docs/gettingstarted/index.html#getting-an-application-key)