Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
P parabix-devel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bcw11
  • parabix-devel
  • Wiki
  • Home

Home · Changes

Page history
Update Home authored Oct 13, 2021 by hperera's avatar hperera
Show whitespace changes
Inline Side-by-side
Showing with 35 additions and 19 deletions
+35 -19
  • Home.md Home.md +35 -19
  • No files found.
Home.md
View page @ c426c03b
......@@ -16,9 +16,11 @@
4. As a data engineer I deal with a lot of different types of data types, like integers, floats, and booleans. It would be very convenient if the input data was automatically formatted to their respective data types in the JSON file.
5. As a
5. As a novice in CS I might forget to name a header field in my data set, I’d like the option to catch any simple errors and to fix them.
6. As a
6. As a data analyst I want to be able to format my output data in specific ways so that it’s easier to read and analyze.
7. As a data analyst, I would like a quick way to replace a data value that I entered multiple times with another value.
## TDD Examples
......@@ -38,7 +40,7 @@ The program can separate different objects into separate lines
The program will find occurrences of the misspelt value, replace with the correct value provided by the user, and return the number of values replaced,
## Executable Test Cases
_Outputs are from the Terminal._
#### Scenario 1
scenario1.csv:
......@@ -51,83 +53,97 @@ Command: `./csv2json scenario1.csv del “;”`
Output:
```
{"date":"2020-01-21";"county";"Snohomish";"state";"Washington";"fips";"53061";"cases";"1";"deaths";"0"}
{"date":"2020-01-21","county":"Snohomish","state":"Washington","fips":"53061","cases":"1","deaths","0"}
```
#### Scenario 2
scenario2.csv:
```
date,county,state,fips,cases,deaths
2020-01-21,Snohomish,Washington,53061,1,0
```
Command: `./idk scenario2.csv`
Output:
```
Number of fields do not match
```
#### Scenario 3
scenario3.csv:
```
date,county,state,fips,cases,deaths
3020-21-91,Snohomish,Washington,53061,1,0
```
Command: `./csv2json scenario3.csv -c [1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]`
Command: `./csv2json scenario3.csv -c date:[1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]`
Output:
```
Invalid “date” format
```
#### Scenario 4
scenario4.csv:
```
name, usernum, employed
“Bryan”, “1”, “true”
```
Command: `./csv2json scenario4.csv -f`
Output:
```
[{“name”: “Bryan”, usernum: 1, employed: true}]
```
#### Scenario 5
scenario5.csv:
```
name, usernum, employed,
“Bryan”, “1”, “true”, “Simon Fraser University”
```
Command: `./csv2json scenario5.csv -hf`
Output:
```
Data field is missing header name
Please name the data field:
```
#### Scenario 6
scenario6.csv:
```
date,county,state,fips,cases,deaths
2020-01-21,Snohomish,Washington,53061,1,0
```
Command: `./idk scenario6.csv`
Command: `./csv2json scenario6.csv -sl`
Output:
```
"Date":"2020-01-21"
"county":"Snohomish"
"state":"Washington"
"Fips":"53061"
"cases":"1"
"deaths":"0"
```
#### Scenario 7
scenario7.csv:
```
date,name,favourite food,
2020-01-21,Mike,suop
```
Command: `./idk scenario7.csv`
Command: `./csv2json scenario7.csv -r [“suop” “soup”]`
Output:
```
date,name,favourite food,
2020-01-21,Mike,soup,
“suop” replaced with “soup” 1 time(s)
```
\ No newline at end of file
Clone repository
  • Home