{"action":"created","issue":{"url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/551","repository_url":"https://api.github.com/repos/NeuralEnsemble/python-neo","labels_url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/551/labels{/name}","comments_url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/551/comments","events_url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/551/events","html_url":"https://github.com/NeuralEnsemble/python-neo/pull/551","id":342348624,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMjY4ODUw","number":551,"title":"[nixio] Use Neo object names in NIX file","user":{"login":"achilleas-k","id":2369197,"node_id":"MDQ6VXNlcjIzNjkxOTc=","avatar_url":"https://avatars0.githubusercontent.com/u/2369197?v=4","gravatar_id":"","url":"https://api.github.com/users/achilleas-k","html_url":"https://github.com/achilleas-k","followers_url":"https://api.github.com/users/achilleas-k/followers","following_url":"https://api.github.com/users/achilleas-k/following{/other_user}","gists_url":"https://api.github.com/users/achilleas-k/gists{/gist_id}","starred_url":"https://api.github.com/users/achilleas-k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achilleas-k/subscriptions","organizations_url":"https://api.github.com/users/achilleas-k/orgs","repos_url":"https://api.github.com/users/achilleas-k/repos","events_url":"https://api.github.com/users/achilleas-k/events{/privacy}","received_events_url":"https://api.github.com/users/achilleas-k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-18T14:17:20Z","updated_at":"2018-07-18T14:23:52Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/NeuralEnsemble/python-neo/pulls/551","html_url":"https://github.com/NeuralEnsemble/python-neo/pull/551","diff_url":"https://github.com/NeuralEnsemble/python-neo/pull/551.diff","patch_url":"https://github.com/NeuralEnsemble/python-neo/pull/551.patch"},"body":"Last year I changed the NixIO to use UUIDs as names for objects as a way to get around a couple of issues. Issue #311 is where the discussion happened and #331 is the relevant PR where this was implemented.\r\n\r\nSome time later, there was a [discussion on the mailing list](https://groups.google.com/d/topic/neuralensemble/u0m79CbibA0/discussion) regarding the write performance but, as a side topic, the issue of the naming also came up. In short, with the current naming scheme, the NIX/HDF5 file that is generated has names that make it difficult to work with and can be a hindrance (and an annoyance) for people who purposefully name their objects in order to be able to navigate a file.\r\n\r\nThis PR adds a new feature which somewhat backtracks from the design decision of automatically naming objects. The `write_all_blocks()` and `write_block()` methods now accept an optional, boolean argument, `use_obj_names` (false, by default). If enabled, the objects in the NIX file will use the names of the corresponding Neo objects. Before writing, however, the whole Neo object tree is checked for conflicts, based on the requirements of NIX and HDF5. If a conflict is found, a ValueError is raised and no objects are written.\r\n\r\nI felt it was important to not check the names while writing and instead check names beforehand. This avoids potential issues with partially writing data with names that later turn out to have conflicts. It's also good for avoiding situations where a write will fail half way through the saving of a large file that could take minutes (or hours). I've clocked the name checking function and even with thousands of objects (the saving of which took over 20 mins), it only needs a few seconds to run.\r\n\r\nTests for the new functionality are also included.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/comments/405949054","html_url":"https://github.com/NeuralEnsemble/python-neo/pull/551#issuecomment-405949054","issue_url":"https://api.github.com/repos/NeuralEnsemble/python-neo/issues/551","id":405949054,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTk0OTA1NA==","user":{"login":"coveralls","id":2354108,"node_id":"MDQ6VXNlcjIzNTQxMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T14:23:52Z","updated_at":"2018-07-18T14:23:52Z","author_association":"NONE","body":"\n[![Coverage Status](https://coveralls.io/builds/18045071/badge)](https://coveralls.io/builds/18045071)\n\nCoverage decreased (-6.3%) to 49.623% when pulling **6e7f557868f81b8b11f629ef57863789c0c7779a on G-Node:nixio-use-neo-names** into **7753fb24ca7d103b97a9209217260b33edb55bbf on NeuralEnsemble:master**.\n"}}
{"actor":{"display_login":"coveralls"}}