In the previous milestone, we implemented the services required for your use cases and implemented interaction with a bot. In this milestone, we will be demonstrating a fully deployed version of our bot for use in a Mattermost environment.
sudo apt update
sudo apt install -y python3
sudo apt install -y python3-pip
sudo apt install -y ansible
pip3 install ansible
cd AnsibleScripts
sudo ansible-playbook -i inventory provision.yaml --ask-vault-pass
- Enter: plotbot (key to unlock the ansible vault)
Screencast Link running deployment scripts.
For your DevBots, create a test team and a TA user account, which TAs will be using for testing your deployed bot. For github bots, grant the necessary permissions for performing tasks on a demo repository.
Provide login credentials for TA.
- Log-in to mattermost client
- Enter the username as evaluator and password as evaluator.
- After successfully logging in, navigate to "evaluation" channel and execute the testcases given in the acceptance test plan below.
Usage:
@plotbot hi
Note:
The trigger word is @plotbot for greeting the bot. It can be followed by intents like "hi", "hey" etc. Expected output will be a greeting from the bot.
Usecase 1: Give the user with code snippet for reuired type of graph In the first use case, the user can request to provide sample of code snippet and a sample of plot for a particular plot type.
Usage:
sample <plot-type>
Note:
The trigger word 'sample' has to be in lowercase only.
plot-type supported : scatterplot, boxplot and barplot
- The user requests for a sample of scatterplot
Input:
sample scatterplot
Expected output
:
- The user requests for a sample of barplot
Input:
sample barplot
Expected output
:
- The user requests for a sample of boxplot
Input:
sample boxplot
Expected output
:
- When user requests for a plot which is not supported (example countplot)
Input:
sample countplot
Expected output:
Requested plot sample not available
Usecase 2: Plot the graph for the user with their custom data. In this use case, the user can request for a plot to be generated by either uploading the dataset or using the pre uplodaed datasets and providing the axis information (i.e. X axis and Y axis labels). The bot reponds with the plot generated.
Usage:
Text: plot <plot-type> <dataset-name> <x-axis_label> <y-axis_label>
Attached file: CSV of dataset
Note the following:
1. x-axis and y-axis labels are column names in the dataset, so they should match.
2. The plot-type supports only for 'scatterplot', 'boxplot' and 'barplot'.
3. You can download the test datasets from location given below.
4. The trigger word 'plot' has to be in lowercase only.
5. For scatterplot and barplot there has to be <x-axis_label> <y-axis_label> mandatorily.
6. For boxplot input of <x-axis_label> only will result in running a outlier analysis on that column.
Test Datasets: petals Column names : weather
- The user requests to plot barplot by uploading dataset
Input:
Expected Output:
- The user requests to plot boxplot, with the dataset already uploaded with outlier analysis on any one column (x-axis-label)
Input:
plot boxplot weather x1
Expected Output:
- The user requests to plot boxplot, with the dataset already uploaded with outlier analysis with X and Y axis information
Input:
plot boxplot dataset sepal.length sepal.width
Expected Output:
- The user requests to plot scatterplot with existing dataset with 1 input variable (x-axis-label) and 1 output variable (y-axis-label)
Input:
plot scatterplot weather x1 y
Expected Output:
- The user requests to plot barplot mentioning a dataset which was not previously uploaded.
Input:
plot barplot iris month y
Expected Output:
Please request by uploading the dataset. The mentioned dataset doesn't exist in our database.
Usecase 3: Provide user the ability to retrieve their plots. In this usecase, the user has the ability to retrieve his previous plot(s), either fetching one by one by giving the specific plot-ID or they can get all their previous graphs or graphs which were plotted between a timestamp to other timestamp.
Usage:
retrieve <plotID.png>
retrieve all
retrieve from:<start_time> to:<stop_time>
Note:
<start_time> and <stop_time> should be of format : Y-m-d H:M:S.f' or 'Y-m-d'
When giving only date and not time, the time is considered as 0:0:0.0 of that day
When more than 5 files are to be sent by the bot, they would be put in a zip and returned.
All timestamps should be in UTC.
- User requests to retrieve all his plots (gets indivisual file because number of returned plots <= 5).
Input:
retrieve all
Expected Output:
- User requests to retrieve a particular plot using the plot-ID.
Input:
retrieve hpzwecnhip.png
Expected Output:
- User requests to retrieve plots from a timestamp to a timestamp (gets zipped file containing all plots during the time range becuase number of returned plots > 5).
Input:
retrieve from:2019-11-19 13:0:0.0 to:2019-12-30 14:0:0.0
Expected Output:
- User requests plot(s), but no plots were generated till date.
Input:
retrieve abc.png
Expected Output:
No plots available
We are running Jenkins server on hosted VM. We have enabled git polling for every 2 minutes. For every build, a new instance for testing gets created with the latest code from github and integration tests will run on that instance. When all the integration tests pass, the BUILD will be SUCCESS. For every build, this shell script will be executed.
Screencast: The screencast of the Jenkins server running a build job can be found here.
In your repository, create a new markdown file, DEPLOY.md, with descriptions about the following:
- Deployment scripts
- Acceptance tests
- Final code
- Optional bonus: Code and screencast for continuous integration server.
Due Sunday, December 1st, before midnight.
- Deployment scripts and screencast (25%)
- Acceptance testing (40%)
- Exploratory Testing and Code Inspection (30%)
- Bonus: Continuous Integration Service (20%)