Skip to content

Commit

Permalink
Merge branch 'release/1.2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattRedBox committed Oct 8, 2020
2 parents 11f9622 + aba15c4 commit abf3275
Show file tree
Hide file tree
Showing 15 changed files with 20,976 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .electron-vue/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ if (process.env.BUILD_TARGET === 'clean') {
}

function clean () {
del.sync(['build/*', '!build/icons', '!build/icons/icon.*'])
del.sync(['build/*', '!build/icons', '!build/icons/icon.*', '!build/appx', '!build/appx/*.png'])
console.log(`\n${doneLog}\n`)
process.exit()
}

function cleanAll () {
del.sync(['dist/electron/*', 'build/*', '!build/icons', '!build/icons/icon.*'])
del.sync(['dist/electron/*', 'build/*', '!build/icons', '!build/icons/icon.*', '!build/appx', '!build/appx/*.png'])
console.log(`\n${doneLog}\n`)
process.exit()
}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ yarn-error.log
.tmp/
.idea/
*.iml
*.csv
!help-tags.csv
.nyc_output/
webdriver.log/
Expand Down
1 change: 1 addition & 0 deletions Untitled0.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
,,
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "DataCurator",
"version": "1.2.5-beta",
"author": " <matt@redboxresearchdata.com.au>",
"version": "1.2.5",
"author": "Matt Mulholland <matt@redboxresearchdata.com.au>",
"description": "Data Curator is a simple desktop CSV editor to help describe, validate and share usable open data",
"license": "MIT",
"main": "./dist/electron/main.js",
Expand Down Expand Up @@ -67,14 +67,19 @@
"icon": "build/icons/icon.ico",
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
]
},
"appx": {
"publisherDisplayName": "Queensland Cyber Infrastructure Foundation Ltd",
"publisher": "CN=...",
"identityName": "DataCurator"
},
"nsis": {
"runAfterFinish": false
},
Expand Down Expand Up @@ -230,4 +235,4 @@
"webpack-node-externals": "^1.7.2",
"webpack-shell-plugin": "^0.5.0"
}
}
}
62 changes: 62 additions & 0 deletions test/features/file/custom-properties.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Feature: Custom Properties
As a User
I want to create and use custom properties
So that I can add custom property key-value pairs to my Package, Table and/or Column Properties

RULES
=====

- Custom properties can be entered against any combination of column, table and/or package properties
- Custom properties are metadata keys only, with no effect on table data or other property metadata.
- Because custom properties are created in Data Curator's Preferences/Settings, any key names are persisted on Data Curator closing,
making the keys (not the values) available on next run of Data Curator
- When importing properties or data packages into Data Curator, any custom keys in the imported metadata must already exist in Data-Curator
if those custom key-value pairs are to be imported correctly.
- Custom properties which have a value entered against its key in the relevant Column, Table or Package Property, will be part of the exported metadata.

Scenario: Add Custom Column Metadata
Given Data Curator is open
When I invoke "Preferences"
And I click "Add custom" button
And I enter "test1" at name label
And I select "column" at the types label
And I invoke "Column Properties"
Then I should see "test1" label with an empty property value

Scenario: Add an identical Custom Column and a Table Column Metadata key
Given Data Curator is open
And I invoke "Preferences"
And I click "Add custom" button
And I enter "test1" at name label
And I select "column" at the types label
And I select "table" at the types label
When I invoke "Column Properties" or I invoke "Table Properties"
Then I should see "test1" label with an empty property value

Scenario: Add Custom Column Metadata value
Given Data Curator is open
And a Custom Column Property, "test1" exists
And I invoke "Column" Properties
When I enter "value1" against the "test1" label
And I complete the checks in order to export a datapackage
And I invoke "Export Package Properties"
Then I should see a .json file with a resource schema field key named "test1" with the value: "value1"

Scenario: Add Custom Table Metadata value
Given Data Curator is open
And a Custom Table Property, "test1" exists
And I invoke "Table" Properties
When I enter "value1" against the "test1" label
And I complete the checks in order to export a datapackage
And I invoke "Export Package Properties"
Then I should see a .json file with a resource key named "test1" with the value: "value1"

Scenario: Add Custom Package Metadata value
Given Data Curator is open
And a Custom Package Property, "test1" exists
And I invoke "Package" Properties
When I enter "value1" against the "test1" label
And I complete the checks in order to export a datapackage
And I invoke "Export Package Properties"
Then I should see a .json file with a top-level key named "test1" with the value: "value1"

34 changes: 34 additions & 0 deletions test/features/file/import-column-properties.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Feature: Import Column Properties
As a User
I want to import column properties
So that I can view the columns metadata in a data package table
And use my existing table data

Scenario: Open a valid column-properties json file where number of fields does not equal the current Data Curator table header length
Given Data Curator is open
And the current table has a header length of 3
When "Import Column Properties" is invoked
And a valid json file at a local file is selected with 5 fields
Then an error message should be displayed


Scenario: Open a valid column-properties json file
Given Data Curator is open
And the current table has a header length of 5
When "Import Column Properties" is invoked
And a valid json file at a local file is selected with 5 fields
Then each column should have metadata matching the fields type.
And the "Tools->Lock Table Schema" Menu should be selected
And Column Properties should be locked
And "Guess" menu should be locked

Scenario: Open a valid column-properties json URL
Given Data Curator is open
And the current table has a header length of 5
When "Import Column Properties->json from URL..." is invoked
And a valid json URL source is selected
Then each column should have metadata matching the fields type.
And the "Tools->Lock Table Schema" Menu should be selected
And Column Properties should be locked
And "Guess" menu should be locked

19 changes: 19 additions & 0 deletions test/features/file/import-package-properties.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Feature: Import Package Properties
As a User
I want to import package properties
So that I can view or edit the metadata and provenance information in the data package
And use my existing table(s) data

RULES
=====

- [Tabular data packages](https://frictionlessdata.io/specs/tabular-data-package/) can be opened from a URL or local path
- A tabular data package json file must be in `.json` format
- The datapackage.json file describes the data package and contains a [table schema](http://frictionlessdata.io/specs/table-schema/) and may contain a [CSV dialect](http://frictionlessdata.io/specs/csv-dialect/) for each resource), either inline or referenced via a url
- the `schema` and `dialect` for each resource may be in-line or referenced via a url

Scenario: Open a valid datapackage.json URL
Given Data Curator is open
When "Import Package Properties" is invoked
And a valid json datapackage.json URL is used
Then an error message should be displayed
1 change: 1 addition & 0 deletions test/fixtures/Untitled1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
,,
2 changes: 2 additions & 0 deletions test/fixtures/Untitled2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Country Name,Country Code,Year,Value
,,,
2 changes: 2 additions & 0 deletions test/fixtures/data/valid-custom.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
h1,h2,h3
a,b,c
Loading

0 comments on commit abf3275

Please sign in to comment.