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

'cy' property (Welsh names) always initialised to empty arrays in the downloadable JSON version #5

Open
giacecco opened this issue Dec 10, 2014 · 2 comments

Comments

@giacecco
Copy link
Contributor

Why do we have an empty array as the 'cy' property for every name, even when we don't know any Welsh names? Unless it is good practice or some pattern, I don't think it is useful. Is it a bug perhaps?

The only reason to do that would be that we know that at least one Welsh name exists and want to show that, but we don't know what it is. I don't think this is our case.

{
  "address" : {
    "url" : "http://alpha.openaddressesuk.org/addresses/7pW9D2",
    "sao" : "1ST FLOOR",
    "pao" : "36-40",
    "street" : {
      "name" : {
        "en" : [
          "THE STRAND"
        ],
        "cy" : []
      },
      "url" : "http://alpha.openaddressesuk.org/streets/no4MwN"
    },
    "nilclass" : {
      "name" : {
        "en" : [
          null
        ],
        "cy" : []
      },
      "url" : null
    },
    "locality" : {
      "name" : {
        "en" : [
          null
        ],
        "cy" : []
      },
      "url" : null
    },
    "town" : {
      "name" : {
        "en" : [
          "DERBY"
        ],
        "cy" : []
      },
      "url" : "http://alpha.openaddressesuk.org/towns/sGp6bi"
    },
    "postcode" : {
      "name" : {
        "en" : [
          "DE1 1BE"
        ],
        "cy" : []
      },
      "url" : "http://alpha.openaddressesuk.org/postcodes/Bty9pj"
    },
    "provenance" : {
      "activity" : {
        "executed_at" : "2014-12-01T15:26:12.720Z",
        "processing_scripts" : "https://github.com/OpenAddressesUK/distiller",
        "derived_from" : [
          {
            "type" : "Source",
            "urls" : [
              "http://ernest.openaddressesuk.org/addresses/689029"
            ],
            "downloaded_at" : "2014-12-01T15:26:12.720Z",
            "processing_script" : "https://github.com/OpenAddressesUK/distiller/tree/3de740587c878a18da85b1e95c957c575cde088a/lib/distil.rb"
          },
          {
            "type" : "Source",
            "urls" : [
              "http://alpha.openaddressesuk.org/postcodes/Bty9pj"
            ],
            "downloaded_at" : "2014-12-01T15:26:12.720Z",
            "processing_script" : "https://github.com/OpenAddressesUK/distiller/tree/3de740587c878a18da85b1e95c957c575cde088a/lib/distil.rb"
          },
          {
            "type" : "Source",
            "urls" : [
              "http://alpha.openaddressesuk.org/streets/no4MwN"
            ],
            "downloaded_at" : "2014-12-01T15:26:12.721Z",
            "processing_script" : "https://github.com/OpenAddressesUK/distiller/tree/3de740587c878a18da85b1e95c957c575cde088a/lib/distil.rb"
          },
          {
            "type" : "Source",
            "urls" : [
              "http://alpha.openaddressesuk.org/towns/sGp6bi"
            ],
            "downloaded_at" : "2014-12-01T15:26:12.721Z",
            "processing_script" : "https://github.com/OpenAddressesUK/distiller/tree/3de740587c878a18da85b1e95c957c575cde088a/lib/distil.rb"
          }
        ]
      }
    }
  }
}
@giacecco giacecco added the bug label Dec 10, 2014
@pezholio
Copy link
Member

As I mentioned in #4, this is to mirror the structure we have at http://alpha.openaddressesuk.org/.

With regard to this specific point, I think i we should have the same structure there regardless of whether we have Welsh names or not, to avoid any confusion.

@giacecco giacecco added enhancement and removed bug labels Dec 10, 2014
@giacecco
Copy link
Contributor Author

I wouldn't find it confusing, see also my note here about cutting off from serialisations the overhead of the internal data structures.

Downgraded to enhancement, but I'm not buying it for now :-) Don't take action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants