Skip to content

Commit 8c3892e

Browse files
committed
Documentation and packaging
1 parent 2017257 commit 8c3892e

File tree

7 files changed

+1031
-0
lines changed

7 files changed

+1031
-0
lines changed

CSVLibrary/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VERSION = '0.0.1'

Examples/CSVExampleTest.robot

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
*** Settings ***
2+
Documentation CSV examples for Robot Framework.
3+
Library Collections
4+
Library CSVLibrary
5+
6+
*** Variables ***
7+
# Example data generated with: https://www.mockaroo.com/
8+
@{template_list}= 1 Douglas Morris [email protected] Male 205.4.212.229
9+
&{template_dict}= id=1 first_name=Douglas last_name=Morris [email protected] gender=Male ip_address=205.4.212.229
10+
11+
12+
*** Test Cases ***
13+
Read csv file to a list example test
14+
@{list}= read csv file to list ${CURDIR}${/}data.csv
15+
lists should be equal ${template_list} ${list[1]}
16+
17+
Read csv file to a dict example test
18+
@{dict}= read csv file to associative ${CURDIR}${/}data.csv
19+
dictionaries should be equal ${template_dict} ${dict[0]}

Examples/data.csv

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
id,first_name,last_name,email,gender,ip_address
2+
1,Douglas,Morris,[email protected],Male,205.4.212.229
3+
2,Stephanie,Oliver,[email protected],Female,18.101.154.106
4+
3,Russell,Castillo,[email protected],Male,255.52.95.46
5+
4,Helen,Reed,[email protected],Female,167.55.67.109
6+
5,Jesse,Wagner,[email protected],Male,252.37.62.215
7+
6,Ashley,Diaz,[email protected],Female,79.87.105.139
8+
7,Rachel,Robinson,[email protected],Female,132.66.117.101
9+
8,Phillip,Johnston,[email protected],Male,70.152.55.21
10+
9,Craig,Burton,[email protected],Male,73.117.157.82
11+
10,Patrick,Fisher,[email protected],Male,2.36.191.97

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Robot Framework CSVLibrary
2+
## Introduction
3+
CSVLibrary is a [Robot Framework](http://robotframework.org/) library for handling csv files.
4+
5+
More information about this library can be found in the [Keyword Documentation](https://rawgit.com/s4int/robotframework-CSVLibrary/master/doc/CSVLibrary.html).
6+
7+
## Installation
8+
### Using pip
9+
```bash
10+
pip install -U robotframework-csvlibrary
11+
```
12+
13+
### Manual installation
14+
1. Make sure you have [Robot Framework installed](http://code.google.com/p/robotframework/wiki/Installation).
15+
2. Download source distributions (`*.tar.gz`) for the library and its dependencies:
16+
- https://pypi.python.org/pypi/robotframework-csvlibrary
17+
3. Extract each source distribution to a temporary location.
18+
4. Go each created directory from the command line and install each project using:
19+
20+
```bash
21+
python setup.py install
22+
```
23+
24+
## Example
25+
26+
Basic example:
27+
```robotframework
28+
*** Settings ***
29+
Library Collections
30+
Library CSVLibrary
31+
32+
*** Test Cases ***
33+
Read csv file to a list example test
34+
@{list}= read csv file to list data.csv
35+
Log ${list[0]}
36+
Log ${list[1]}
37+
38+
Read csv file to a dict example test
39+
@{dict}= read csv file to associative data.csv
40+
Log &{dict[0]}[first_name] &{dict[0]}[last_name]
41+
```

0 commit comments

Comments
 (0)