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

Add more concise documentation of arguments for the attributes #148

Open
liebermeister opened this issue Jul 23, 2020 · 5 comments
Open

Comments

@liebermeister
Copy link

Hi Jonathan,

In the list of datatypes on the website, it could be helpful to give an example string for each datatype (or at least those where strings are not lengthy). In most cases the sytax is obvious, but with Boolean values, lists, or dates, for example, the syntax may be less clear. If this makes the website to crowded (which I think it may do), maybe there could be an extra dataset file that contains one item for each datatype, just for the sake of an example?

Best,
Wolf

@jonrkarr jonrkarr self-assigned this Jul 23, 2020
@jonrkarr
Copy link
Member

There a quite a bit of optional arguments. There is already a link to more detailed documentation at http://docs.karrlab.org/obj_tables/master/1.0.8/source/obj_tables.html.

@jonrkarr
Copy link
Member

I realized that the constructor arguments weren't displayed in the documentation. This is now fixed.

@jonrkarr jonrkarr changed the title Examples in "Data types" section on website Add more concise documentation of arguments for the attributes Jul 24, 2020
@jonrkarr
Copy link
Member

In addition to the API documentation, it would be helpful to have more concise documentation of the arguments to the constructors for the attributes.

This could be assembled by parsing the docstrings of the constructors and compiling the docstrings to HTML with sphinx.

@liebermeister
Copy link
Author

Hi Jonathan,

that's a good change, but originally I meant something much simpler. For example, with "Boolean", users may not know what's the required format, eg "True", "true", or "1", or whether several of these are allowed. Similar for lists, the user may not know whether brackets are needed, which separator to use, etc. Of for numbers, whether an exponential notation is allowed, etc. So my idea was to put some examples, for those cases that are not self-evident. But I think it will make the webpage too crowded, so I don't really know where this could be put.

Best,
Wolf

@jonrkarr
Copy link
Member

I see. I could examples to the compiled documentation and then extract that into a separate document.

I've tried to make ObjTables flexible. For example:

  • Boolean -- XLSX booleans or strings that encode any of the above
  • Numbers -- can be XLSX numbers or XLSX strings that encode numbers (exponential notation is supported)
  • Lists: essentially this supports the Excel dialect of CSV with , as the default separator. Values that includes the separator can be encoded with " delimiters. Example: "val-1", "val-2", val3 would be parsed to ["val-1", "val-2", "val-3"]. The separator can be specified in the argument to the attribute, e.g. List(separator=','). White spaces before and after the separator are ignored.

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