Skip to content

Table.read and Table.write should provide useful docstrings #1011

Closed

Description

@eteq

Right now, if I do Table.read? in ipython, I get:

Definition: Table.read(cls, *args, **kwargs)
Docstring:
Read in data

The arguments passed to this method depend on the format

Which doesn't really help a user at all. Ideally, there would be at least a list of formatters (perhaps auto-generate from the registry like what is done in #961 ?) that I can then import and look at the docstrings of to figure out what the valid arguments are.

(cc @taldcroft - maybe you're already thinking about this as part of #961?)

Activity

  1. eteq commented on Apr 23, 2013

    @eteq
    MemberAuthor

    I just saw #962 - so if that goes through, I guess it makes more sense to link to the reader/writer classes, rather than functions, but the idea is still the same.

  2. modified the milestones: v1.0.0, v0.4.0 on May 3, 2014
  3. self-assigned this
    on Jan 13, 2015
  4. modified the milestones: v1.0.0, on Jan 13, 2015
  5. astrofrog commented on Sep 29, 2015

    @astrofrog
    Member

    Removing milestone since not 1.1-critical (I will pick up the work I've been doing on this next week)

  6. removed this from the v1.1.0 milestone on Sep 29, 2015
  7. bsipocz commented on Feb 17, 2017

    @bsipocz
    Member

    This bite me again today, and looking at the chain of issues and PRs, it still seems to be unsolved (latest attempt was #3090)

    My current fastest solution is kind of unsustainable, going to the source code and figure out the kwargs from there.

  8. taldcroft commented on Mar 9, 2017

    @taldcroft
    Member

    Unless someone is ready to step up and take over #3090 then we should consider a short term solution to this issue (which I have just marked as priority-high because I think it really is a big problem).

    One thing we discussed which is not perfect but would work is to add a help keyword arg to read and write which, if True, prints a docstring for the specified format instead of performing the read or write. Then the I/O connector register_reader and writer funcs could take a docstring argument. An alternative is to pass an ordered dict of keyword/description pairs that would be auto-formatted and printed for a call with help=True.

    There may be better implementation ideas, but the basic idea is to manually have each class provide the I/O connector with appropriate docs. For io.ascii this won't be completely trivial, but do-able.

  9. bsipocz commented on Apr 5, 2018

    @bsipocz
    Member

    This came up again here (indirectly): #7352

  10. bsipocz commented on Apr 5, 2018

    @bsipocz
    Member

    Given that 3.1 is about performance and docs enhancements, can we have this as high priority for that release?

  11. pllim commented on Apr 17, 2018

    @pllim
    Member

    I thought, oh, maybe it will be fun distraction to take a crack at this, but then looking at #962, #3090, etc. There appears to have been plenty of effort but no solution. Now I am scared... I'll think about how to solve the doc problem without touching the io "enchilada".

  12. bsipocz commented on Jun 18, 2019

    @bsipocz
    Member

    #8255 has addressed this long standing issue, I'm closing it now.

    Feel free to reopen, or to open a new follow-up one if you think more is needed.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions