Skip to content

Commit

Permalink
Merge pull request #225 from ODIQueensland/fix-licence-properties
Browse files Browse the repository at this point in the history
fix #224
  • Loading branch information
Stephen-Gates authored Nov 17, 2017
2 parents 843c0ec + 47c1412 commit dd1739c
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 70 deletions.
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
> Use this section for new feature requests. If you're reporting a problem, delete this section.
> if relevant include images or hyperlinks to other resources that clarify the feature you're seeking
### Expected Behaviour (for problems)
> When reporting a problem, describe what should happen
### Current Behaviour
### Current Behaviour (for problems)
> When reporting a problem, describe what happens that isn't expected behaviour?
### Expected Behaviour
> When reporting a problem, describe what should happen
### Steps to Reproduce
> When reporting a problem, provide a set of steps so others can reproduce the problem.
Expand All @@ -22,5 +22,5 @@
### Your Environment
> Include details about the environment you experienced the problem - this will help us fix the bug quicker.
* Data Curator version 0.Y.Z
* Operating System and version e.g. macOS High Sierra 10.13.1 or Windows 7
* Data Curator version: 0.Y.Z
* Operating System and version: e.g. macOS High Sierra 10.13.1
40 changes: 20 additions & 20 deletions src/renderer/partials/Licenses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,54 @@ export default {
data() {
return {
licenses: [{
'id': 'CC-BY-4.0',
'name': 'CC-BY-4.0',
'title': 'Creative Commons Attribution 4.0',
'url': 'https://creativecommons.org/licenses/by/4.0/'
'path': 'https://creativecommons.org/licenses/by/4.0/'
},
{
'id': 'CC-BY-SA-4.0',
'name': 'CC-BY-SA-4.0',
'title': 'Creative Commons Attribution Share-Alike 4.0',
'url': 'https://creativecommons.org/licenses/by-sa/4.0/'
'path': 'https://creativecommons.org/licenses/by-sa/4.0/'
},
{
'id': 'CC0-1.0',
'name': 'CC0-1.0',
'title': 'Creative Commons CCZero 1.0',
'url': 'https://creativecommons.org/publicdomain/zero/1.0/'
'path': 'https://creativecommons.org/publicdomain/zero/1.0/'
},
{
'id': 'ODC-BY-1.0',
'name': 'ODC-BY-1.0',
'title': 'Open Data Commons Attribution License 1.0',
'url': 'http://www.opendefinition.org/licenses/odc-by'
'path': 'http://www.opendefinition.org/licenses/odc-by'
},
{
'id': 'ODbL-1.0',
'name': 'ODbL-1.0',
'title': 'Open Data Commons Open Database License 1.0',
'url': 'http://www.opendefinition.org/licenses/odc-odbl'
'path': 'http://www.opendefinition.org/licenses/odc-odbl'
},
{
'id': 'ODC-PDDL-1.0',
'name': 'ODC-PDDL-1.0',
'title': 'Open Data Commons Public Domain Dedication and Licence 1.0',
'url': 'http://www.opendefinition.org/licenses/odc-pddl'
'path': 'http://www.opendefinition.org/licenses/odc-pddl'
},
{
'id': 'OGL-Canada-2.0',
'name': 'OGL-Canada-2.0',
'title': 'Open Government License 2.0 (Canada)',
'url': 'http://data.gc.ca/eng/open-government-licence-canada'
'path': 'http://data.gc.ca/eng/open-government-licence-canada'
},
{
'id': 'OGL-UK-3.0',
'name': 'OGL-UK-3.0',
'title': 'Open Government Licence 3.0 (United Kingdom)',
'url': 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'
'path': 'https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/'
},
{
'id': 'OGDL-TW-1.0',
'name': 'OGDL-TW-1.0',
'title': 'Open Government Data License Taiwan 1.0',
'url': 'https://data.gov.tw/license/'
'path': 'https://data.gov.tw/license/'
},
{
'id': 'pdm',
'name': 'pdm',
'title': 'Public Domain Mark',
'url': 'http://creativecommons.org/publicdomain/mark/1.0/'
'path': 'http://creativecommons.org/publicdomain/mark/1.0/'
}],
selectedLicenses: []
}
Expand Down
11 changes: 3 additions & 8 deletions test/features/file/open-datapackage.feature
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Feature: Open a Data Package
Feature: Open a Data Package Zip
As a User
I want to open a tabular data package
So that I can view or edit the data and metadata in the data package

A Data package is typically stored in a file called datapackage.zip
A [Data package](http://frictionlessdata.io/specs/data-package/) is typically stored in a file called datapackage.zip
The data resources in the package can be stored:
- at a URL
- locally within the package
Expand All @@ -17,14 +17,9 @@ Feature: Open a Data Package

Open Data Package can be invoked from the Menu

Data Curator sets 'header' in the CSV Dialect to 'true' and doesn't allow this to be changed. The data package being opened may have 'header' set to 'false'. This would create an inconsistently and would force the user to add a header row to resolve them.

Notes on opening data packages from CKAN:
- The current CKAN data package extension only exports a data package with data resources available at a URL i.e. the data is not inside the package

Frictionless Data specification:
- http://frictionlessdata.io/specs/data-package/
- http://frictionlessdata.io/specs/tabular-data-package/
- Data Packages may be provided as .json not .zip files depending on implementation

Scenario: Open a data package
Given I have opened Data Curator
Expand Down
5 changes: 2 additions & 3 deletions test/features/file/save-as-comma-separated-file.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ Feature: Save As Comma separated value file
I want to save the data changes in the active data tab as a comma separated value file
In order to save the data to a different filename, location or CSV dialect.

The file extension of the saved file must be .csv

The Save As Comma separated command can be invoked by a menu item or keyboard shortcut
- The file extension of the saved file must be .csv
- The Save As Comma separated command can be invoked by a menu item or keyboard shortcut

Scenario: Save As Comma separated value file
Given I have opened Data Curator
Expand Down
8 changes: 4 additions & 4 deletions test/features/file/save-as-semi-colon-separated-file.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Feature: Save As Semicolon separated value file
I want to save the data changes in the active data tab as a comma separated value file
In order to save the data to a different filename, location or CSV dialect.

The file extension of the saved file must be .csv

The Save As Semicolon separated command can be invoked by a menu item
- The file extension of the saved file must be .csv
- The Save As Semicolon separated command can be invoked by a menu item

Scenario: Save As Semicolon separated value file
Given I have opened Data Curator
And I have opened 1 data tab
When I invoke the "Save As Semicolon separated" command
Then a prompt, requesting the filename and location is displayed
And the data is saved at the filename.csv and location using the correct CSV Dialect
And the data is saved at the filename.csv and location
And set the 'delimiter' to ';' in the Table CSV Dialect
8 changes: 4 additions & 4 deletions test/features/file/save-as-tab-separated-file.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Feature: Save As Tab separated value file
I want to save the data changes in the active data tab as a comma separated value file
In order to save the data to a different filename, location or CSV dialect.

The file extension of the saved file must be .tsv

The Save As Tab separated command can be invoked by a menu item
- The file extension of the saved file must be .tsv
- The Save As Tab separated command can be invoked by a menu item

Scenario: Save As Comma separated value file
Given I have opened Data Curator
And I have opened 1 data tab
When I invoke the "Save As Tab separated" command
Then a prompt, requesting the filename and location is displayed
And the data is saved at the filename.tsv and location using the correct CSV Dialect
And the data is saved at the filename.tsv and location
And set the 'delimiter' to '\t' in the Table CSV Dialect
27 changes: 4 additions & 23 deletions test/features/file/save.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,12 @@ Feature: Save
I want to save the changes made to the data in the active data tab using the appropriate CSV dialect settings
So that I can progressively save my work

If available, use the CSV dialect settings in associated Table Properties.
- The "Save" command can be invoked from a menu item or a keyboard shortcut
- The "Save" command is only enabled after a file has been saved for the first time using "Save As"

If these are unavailable, then use the CSV dialect specified in Preferences.

By default the CSV dialect will be a comma separated file with defaults settings as documented in http://frictionlessdata.io/specs/csv-dialect/#specification

The CSV dialect selected may change the file extension e.g. tab separated values files use .tsv

If the data has never been saved, prompt the user for a file name and location

The "Save" command can be invoked from a menu item or a keyboard shortcut

Scenario: Save data that has never been saved
Given I have opened Data Curator
And I have opened 1 data tab
And I have changed the data in the active tab
And I have never saved the data
When I invoke the "Save" command
Then prompt for a location and name to save the filename
And save the data in the active tab at that location, using the filename, and using the CSV dialect settings

Scenario: Save data that has been saved at least once
Scenario: Save data
Given I have opened Data Curator
And I have opened 1 data tab
And I have changed the data in the active tab
And the data has been saved at least once
When I invoke the "Save" command
And save the data in the active tab at its current location, using the filename, and using the CSV dialect settings
Then save the data in the active tab at its current location and filename
10 changes: 8 additions & 2 deletions test/features/other/freeze-header-row.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ Feature: Toggle Header Row
By default the menu item is unchecked

Notes:
- 'header' = 'true' is set in the CSV Dialect by default
- 'name' properties are copied from the header row values by "Guess Column Properties"
- 'header' = 'true' or 'false' is set in the [CSV Dialect](http://frictionlessdata.io/specs/csv-dialect/#specification) by default
- 'name' properties are copied from the header row values by "Guess Column Properties" if header row is true
- 'name' property can be edited based on the header row setting
- regardless of settings the all the data in the data tab should be saved

Scenario: Freeze Header Row
Given I have opened Data Curator
When I invoke "Header Row"
Then check the menu item
And freeze the first row so that is does not scroll
And use each header row value to invoke "Sort Column"
And prevent the 'name' column properties from being edited
And set the 'header' in the CSV Dialect to 'true'

Scenario: Unfreeze Header Row
Given I have opened Data Curator
When I invoke "Header Row"
Then check the menu item
And freeze the first row so that is does not scroll
And use each header row value to invoke "Sort Column"
And allow the 'name' column properties to be edited
And set the 'header' in the CSV Dialect to 'false'

0 comments on commit dd1739c

Please sign in to comment.