datahubio / datahub-v2-pm

Project management (issues only)
8 stars 2 forks source link

URI or not URI #126

Closed AcckiyGerman closed 6 years ago

AcckiyGerman commented 6 years ago

The PY and JS versions of the tableschema lib are treating the raw IPv4 address in a different way:

Because of that, we have plenty of bugs, when JS version infers the schema, which is treated as incorrect while processing.

We had created issues in the frictionlessdata: https://github.com/frictionlessdata/tableschema-py/issues/204 https://github.com/frictionlessdata/tableschema-js/issues/135 But their developers seems too busy atm, so I'm gonna make a PR to solve this.

Tasks

Analysis

Dima German @AcckiyGerman 11:08 @anuveyatsu @zelima @akariv I could either

Anuar Ustayev @anuveyatsu 11:09 @AcckiyGerman From 19th February on FD channel:

Hi all, do you think IP addresses should be considered as URI or not? E.g., ”9.196.147.78” value is a string type and uri format. @anuveyatsu an IP address is not a URI.

Dima German @AcckiyGerman 11:10 I'd like to see if everybody is agree with that

Adam Kariv @akariv 11:10 @AcckiyGerman my opinion is that 8.8.8.8 is not a url. https://8.8.8.8/ is

Dima German @AcckiyGerman 11:11 Ok, cool, preparing a PR, if nobody objects

zelima commented 6 years ago

@AcckiyGerman very good question to answer, but unfortunately something that we cannot decide :)

First, let's decide, is 8.8.8.8 is URI, or not... lurking docs..

AcckiyGerman commented 6 years ago

@zelima The validator JS lib, has a method isURL() , which is used in tableschema-js

isURL() has an option {require_protocol: true} which will treat all usual IP as non-valid URL.

I think this could help. Let me check, how is this realised in tableschema-PY, may be there is an options to Allow validation of pure IP as URL

AcckiyGerman commented 6 years ago

FIXED URI type is now consistent in JS & PY versions of tableschema and some raw IP without schema address is not URI type for us any more :)