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

Implement more validation checks #1

Open
2 of 7 tasks
iimog opened this issue Jul 20, 2016 · 1 comment
Open
2 of 7 tasks

Implement more validation checks #1

iimog opened this issue Jul 20, 2016 · 1 comment
Assignees
Milestone

Comments

@iimog
Copy link
Member

iimog commented Jul 20, 2016

The types of biom attributes are checked in the setter functions. TypeErrors are thrown if there is a mismatch. As the constructor uses the setters types are also checked in the constructor. But there are other possible inconsistencies that are not yet checked:

  • keep shape correct by calculating dynamically (read only)
  • keep matrix_type correct by updating data on set
  • all elements of rows and columns are objects containing (unique) id and metadata
  • keep data correct by updating when rows or columns are set
  • keep data correct by throwing an Error if it is set incorrectly
  • format_url is really an url and not only a string
  • date is really date time in ISO 8601 format
@iimog iimog added this to the v1.0.0 milestone Jul 20, 2016
@iimog iimog self-assigned this Jul 20, 2016
@iimog
Copy link
Member Author

iimog commented Aug 25, 2016

There are relationships between rows, columns, shape, data, matrix_type and matrix_element_type (and nnz). So updating one via a setter should either update the others or fail if the change is incompatible. Initialization is a special case because many values are set simultaneously so order of setting is important if there are incompatibilities.

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

1 participant