Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional URI reported as incorrect type #109

Closed
Stephen-Gates opened this issue Sep 6, 2016 · 4 comments · Fixed by frictionlessdata/tableschema-py#133
Closed

Optional URI reported as incorrect type #109

Stephen-Gates opened this issue Sep 6, 2016 · 4 comments · Fixed by frictionlessdata/tableschema-py#133
Assignees
Labels
bug Something isn't working

Comments

@Stephen-Gates
Copy link

Stephen-Gates commented Sep 6, 2016

I raised this issue in the Open Knowledge forum and was requested by @danfowler to add it here.

Using this JSON to describe an optional URI column,

{
  "name": "stop_url",
  "description": "Contains the URL of a web page about a particular stop.",
  "type": "string",
  "format": "uri",
  "constraints": {
     "required": false
  }
}

using GoodTables, I am returned,

Incorrect Type (stop_url):  The value "" in column "stop_url" is not a valid String.

I raised a similar validation error on frictionlessdata/goodtables-web#64, sorry if that was in the wrong place.

@roll roll added the bug Something isn't working label Sep 8, 2016
@roll roll added the priority label Oct 2, 2016
@roll roll self-assigned this Oct 2, 2016
@roll roll added this to the goodtables-v1 milestone Oct 3, 2016
@pwalsh
Copy link
Member

pwalsh commented Nov 2, 2016

@roll if this acts correctly in v1 I am happy to close this.

@roll
Copy link
Member

roll commented Nov 3, 2016

With schema:

{
    "fields": [
        {
          "name": "stop_url",
          "description": "Contains the URL of a web page about a particular stop.",
          "type": "string",
          "format": "uri",
          "constraints": {"required": false}

        }
    ]
}

New version of goodtables works FINE:

$ python -m goodtables.cli --order-fields table tmp/issue109.csv --
schema tmp/issue109.json
DATASET
=======
{'error-count': 10, 'table-count': 1, 'time': 1.304, 'valid': False}

TABLE [1]
=========
{'error-count': 10,
 'headers': ['stop_id',
             'stop_code',
             'stop_name',
             'stop_desc',
             'stop_lat',
             'stop_lon',
             'zone_id',
             'stop_url',
             'location_type',
             'parent_station',
             'platform_code'],
 'row-count': 1000,
 'time': 1.286,
 'valid': False}
---------
[-,1] [extra-header] There is an extra header in column 1
[-,2] [extra-header] There is an extra header in column 2
[-,3] [extra-header] There is an extra header in column 3
[-,4] [extra-header] There is an extra header in column 4
[-,5] [extra-header] There is an extra header in column 5
[-,6] [extra-header] There is an extra header in column 6
[-,7] [extra-header] There is an extra header in column 7
[-,9] [extra-header] There is an extra header in column 9
[-,10] [extra-header] There is an extra header in column 10
[-,11] [extra-header] There is an extra header in column 11

@pwalsh
Copy link
Member

pwalsh commented Nov 3, 2016

@roll excellent.

@Stephen-Gates I know you are not using command line, but the new goodtables is spectacular, and, we'll be exposing it via some web services from December onwards. Hang on tight, and also, follow the Labs blog for updates

@Stephen-Gates
Copy link
Author

Thanks @pwalsh. Seat belt fastened. Let me know if I can help test or write something.

@roll roll added duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists labels Nov 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants