Skip to content

Commit

Permalink
Merge branch 'release/0.18.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mulholland committed Jun 20, 2018
2 parents 9492a66 + 2a9c618 commit 955b775
Show file tree
Hide file tree
Showing 28 changed files with 1,399 additions and 837 deletions.
2 changes: 1 addition & 1 deletion .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"exclude" : [
"node_modules"
],
"lines": 75,
"lines": 30,
"include" : [
"src/**/*.js",
"test/features"
Expand Down
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "DataCurator",
"version": "0.18.3",
"version": "0.18.4",
"author": " <matt@redboxresearchdata.com.au>",
"description": "Data Curator is a simple desktop CSV editor to help describe, validate and share usable open data",
"license": "MIT",
Expand All @@ -23,9 +23,9 @@
"postinstall": "electron-builder install-app-deps",
"test-main": "mocha-webpack --webpack-config .electron-vue/webpack.test.config.js --glob *_spec.js test/main/specs",
"test": "(yarn run unit || yarn -v) && yarn run e2e",
"unit": "karma start test/unit/karma.conf.js",
"e2e": "yarn run pack && (yarn run cucumber:postpack:impl || yarn -v) && yarn run cucumber:report",
"e2e:dev": "(yarn run cucumber:postpack:dev || yarn -v) && yarn run cucumber:report",
"unit": "yarn run clean && karma start test/unit/karma.conf.js",
"e2e": "yarn run clean && yarn run pack && yarn run cucumber:postpack",
"e2e:dev": "yarn run cucumber:postpack:dev && yarn run cucumber:report",
"cucumber:postpack": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register test/features -f json:test/cucumber_report.json",
"cucumber:postpack:dev": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register --tags @dev test/features -f json:test/cucumber_report.json",
"cucumber:postpack:impl": "cross-env BABEL_ENV=test nyc cucumber-js --require-module babel-core/register --tags @impl test/features -f json:test/cucumber_report.json",
Expand Down Expand Up @@ -81,7 +81,7 @@
"bootstrap": "3.3.7",
"components-font-awesome": "^5.0.6",
"csv": "^2.0.0",
"datapackage": "^1.0.6",
"datapackage": "^1.1.0",
"electron-settings": "^3.2.0",
"escape-regexp": "^0.0.1",
"etl": "^0.5.12",
Expand Down Expand Up @@ -133,6 +133,7 @@
"chai-as-promised": "^7.1.1",
"chalk": "^2.3.1",
"copy-webpack-plugin": "^4.2.0",
"coveralls": "^3.0.1",
"cross-env": "^5.0.0",
"css-loader": "^0.28.10",
"cucumber": "^4.1.0",
Expand All @@ -159,15 +160,18 @@
"html-webpack-include-assets-plugin": "^0.0.5",
"html-webpack-plugin": "^2.16.1",
"json-loader": "^0.5.4",
"karma": "^2.0.0",
"jsonfile": "^4.0.0",
"karma": "^2.0.3",
"karma-coverage": "^1.1.1",
"karma-coveralls": "^1.2.1",
"karma-electron": "^5.3.0",
"karma-mocha": "^1.2.0",
"karma-sinon-chai": "^1.3.3",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.32",
"karma-webpack": "^3.0.0",
"mocha": "^5.0.5",
"mocha-lcov-reporter": "^1.3.0",
"mocha-webpack": "^1.0.1",
"multispinner": "^0.2.1",
"node-gyp": "^3.6.2",
Expand Down
25 changes: 13 additions & 12 deletions src/renderer/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</li>
</ul>
</li>
<li class="tab-add" @click="addTab()" v-tooltip.right="tooltip('tooltip-add-tab')">
<li class="add-tab" @click="addTab()" v-tooltip.right="tooltip('tooltip-add-tab')">
<a>&nbsp;<button type="button" class="btn btn-sm"><i class="fa fa-plus"></i></button></a>
</li>
<component is="tooltipAddTab" />
Expand All @@ -78,17 +78,19 @@
<div id="main-bottom-panel" class="panel-footer" :class="mainBottomPanelStatus">
<div id="message-panel" class="panel-default">
<!-- tidy up messages view with components -->
<div v-show="toggleMessageView()">
<ul class="nav navbar-right closebtn">
<li>
<a href="#" @click="closeMessages()">
<span class="btn-default fa fa-times" />
</a>
</li>
</ul>
<h3 class="message-title">{{messagesTitle}}</h3>
<div class="message-view" v-show="toggleMessageView()">
<div class="message-title-container affix">
<ul class="nav navbar-right closebtn">
<li>
<a href="#" @click="closeMessages()">
<span class="btn-default fa fa-times"/>
</a>
</li>
</ul>
<h3 class="message-title">{{messagesTitle}}</h3>
</div>
<template v-if="messagesType === 'error'">
<nav class="navbar errors">
<nav class="navbar errors-meta affix">
<div class="container-fluid">
<i class="navbar-text">{{messages.length}} Error(s)</i>
<ul class="nav navbar-nav navbar-left" >
Expand All @@ -101,7 +103,6 @@
<li>
<a href="#" v-tooltip.top="tooltip('tooltip-write-errors-provenance')" @click.prevent="writeErrorsToProvenance()">
<object data="static/img/validation-results.svg" type="image/svg+xml" />
<!-- <span class="btn-default fas fa-file-alt" /> -->
</a>
</li>
<component is="tooltipWriteErrorsProvenance" />
Expand Down
15 changes: 8 additions & 7 deletions src/renderer/partials/Licenses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default {
props: ['getPropertyGivenHotId', 'setProperty', 'waitForHotIdFromTabId'],
data() {
return {
// sourced from: https://licenses.opendefinition.org/licenses
licenses: [{
'name': 'CC-BY-4.0',
'title': 'Creative Commons Attribution 4.0',
Expand All @@ -35,28 +36,28 @@ export default {
},
{
'name': 'CC0-1.0',
'title': 'Creative Commons CCZero 1.0',
'title': 'CC0 1.0',
'path': 'https://creativecommons.org/publicdomain/zero/1.0/'
},
{
'name': 'ODC-BY-1.0',
'title': 'Open Data Commons Attribution License 1.0',
'path': 'http://www.opendefinition.org/licenses/odc-by'
'path': 'https://opendefinition.org/licenses/odc-by'
},
{
'name': 'ODbL-1.0',
'title': 'Open Data Commons Open Database License 1.0',
'path': 'http://www.opendefinition.org/licenses/odc-odbl'
'path': 'https://opendefinition.org/licenses/odc-odbl'
},
{
'name': 'ODC-PDDL-1.0',
'name': 'PDDL-1.0',
'title': 'Open Data Commons Public Domain Dedication and Licence 1.0',
'path': 'http://www.opendefinition.org/licenses/odc-pddl'
'path': 'https://opendefinition.org/licenses/odc-pddl'
},
{
'name': 'OGL-Canada-2.0',
'title': 'Open Government License 2.0 (Canada)',
'path': 'http://data.gc.ca/eng/open-government-licence-canada'
'path': 'https://open.canada.ca/en/open-government-licence-canada'
},
{
'name': 'OGL-UK-3.0',
Expand All @@ -69,7 +70,7 @@ export default {
'path': 'https://data.gov.tw/license/'
},
{
'title': 'Public Domain Mark',
'title': 'Public Domain Mark 1.0',
'path': 'http://creativecommons.org/publicdomain/mark/1.0/'
}],
selectedLicenses: []
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/provenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function compileAndStringifyProvenance() {
let stringified = ''
_.forEach(allHotErrors, function(errors, hotId) {
let hotErrors = compileHotErrors(errors, hotId)
stringified += `${hotErrors}\n`
stringified += `${hotErrors}${os.EOL}`
})
return `${mainText}${os.EOL}${stringified}`
}
Expand All @@ -27,7 +27,7 @@ export function compileHotErrors(errors, hotId) {
export function stringifyProvenance(mainText, allHotErrors) {
let stringified = ''
_.forEach(allHotErrors, function(errors, hotId) {
stringified += `${errors}\n`
stringified += `${errors}${os.EOL}`
})
return `${mainText}${os.EOL}${stringified}`
}
Expand Down
4 changes: 1 addition & 3 deletions src/renderer/ragged-rows.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Fills undefined cells with an empty string, keeping the table in a
// rectangular format
//
// Fills undefined cells with an empty string, keeping the table in a rectangular format
export function fixRaggedRows(arrays) {
const maxRowLength = getMaxRowLength(arrays)
_.forEach(arrays, (row) => {
Expand Down
40 changes: 16 additions & 24 deletions static/css/panel.styl
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ sideNavFooterHeight = 70px
left 0
z-index 200 !important
transition: 0.5s
padding-top: 0px
&.closed
margin-left 0
padding-right 5px
Expand All @@ -229,39 +230,27 @@ sideNavFooterHeight = 70px
margin-left sideNavMargin
padding-right sideNavMargin
&.right
// width 80%
margin-right sideNavMargin
margin-left 0
#message-panel
// position absolute
// width 100%
// height 100%
// overflow-y visible
.affix
background-color #f5f5f5
width 95%
.closebtn
transform translate(10px,-15px)
position relative
right 0
.btn-default
color #000
// overflow-y hidden
.message-title
margin-top 5px
margin-bottom 0px
// position relative
// display block
// overflow-y hidden
// top 0
.navbar.errors
.navbar.errors-meta
margin-bottom 0px
// position relative
// display block
// top 0
// overflow-y hidden
// .errors-content
// height 100%
// position relative
// display block
// overflow-y scroll !important
display block
margin-top 32px
padding-top 0px
.errors-content
padding-top 90px
&.left #message-panel
padding-right 0px
&.right #message-panel
Expand Down Expand Up @@ -358,6 +347,9 @@ span.tabclose.btn-default:hover
#tableProperties .form-control
width auto !important

#packageProperties .form-control
width auto !important

#columnProperties option
width auto

Expand All @@ -367,14 +359,14 @@ span.tabclose.btn-default:hover
.nav-tabs>li.tab-heading a
margin 0

.tab-add a
.add-tab a
position relative

.tab-add a:hover
.add-tab a:hover
background-color initial !important
border-color transparent !important
margin 0

.tab-add a button
.add-tab a button
position absolute
bottom 0
4 changes: 4 additions & 0 deletions static/css/panels.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@
.col-sm-9 {
width: 100%;
}

#sidenav label {
width: 100%;
}
14 changes: 7 additions & 7 deletions test/features/data_curator/set-preferences.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: Set Preferences
As a Data Packager
I want to set default values and behaviours
So that I can work efficiently and avoid re-keying values or repeating common actions
As a Data Packager
I want to set default values and behaviours
So that I can work efficiently and avoid re-keying values or repeating common actions

RULES
=====
Expand All @@ -23,17 +23,17 @@ Feature: Set Preferences
- `email`
- `path`
- `role` - one of the standard values in a drop down list

LATER
=====

- Default Publishing platform (doesn't make sense to add until Publish is implemented)

Scenario: Set Preferences
Given Data Curator is open
When "Set Preferences" is invoked
Then the preferences panel should be displayed
And preference values should be accepted and validated
And preference values should be accepted and validated
And values should be stored so they are reapplied next time Data Curator is opened

Scenario: Use Preferences
Expand Down
4 changes: 2 additions & 2 deletions test/features/find/find.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Feature: Find data
| Find | application menu selection | Find->Find |

@impl
Scenario Outline: Find next is available from invoking Find
Scenario Outline: Find submenu item is available from invoking Find
Given Data Curator is open
When "<name1>" is invoked using the "<type>": "<sequence1>"
Then "<name2>" is invoked using the "application menu selection": "<sequence2>"
Expand All @@ -65,7 +65,7 @@ Feature: Find data
@impl
Scenario Outline: Find next
Given Data Curator is open
And the active table has "<data>"
And the active table has data: "<data>"
And "Find" is invoked
When "<search value>" has been entered
# And a search constraint has been entered
Expand Down
13 changes: 9 additions & 4 deletions test/features/other/add-tab.feature
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
Feature: Add Tab
As a Data Curator User
I want to add another data table
I want to add another data table
So that I can package related data tables together

RULES
=====
- The "Add Tab" command can be invoked using a button

USER INTERFACE
==============

![Add tab user interface](https://raw.githubusercontent.com/ODIQueensland/data-curator/develop/static/img/ui/add-tab.png)

@impl
Scenario: Add Tab
Given Data Curator is open
When "Add Tab" is invoked
Then a empty table should open in a separate tab
And the window has 1 tab
When the "Add Tab" button is invoked
Then the window should have 2 tabs
And the new tab should have 1 table
And the new table should have 1 row by 3 columns
And the new table should be empty
Loading

0 comments on commit 955b775

Please sign in to comment.