Skip to content

pysas UI is unintuitive and unnecessarily cumbersome #10

Open
@hamogu

Description

@hamogu
  • Why do I have to pass the arguments when I initialize the Wrapper
    object? From a user perspective, it would make more sense to pass them
    when I run a task, so something like this:

    from pysas.wrapper import Wrapper
    evselect = Wapper('evselect')
    evselect.run(my_arguments_here)
  • Why do I have to create the Wrapper objects in the first place? There is only a finite (small) number of SAS tasks that exist, so why don't we create watrtter objects for each task on init (or lazily on import) so that I can do:

    from pysas import evselect
  • In pysas, I pass in arguments to tasks as strings that look exactly
    like they would on the SAS command line. So, as a Python user, I need to
    construct those argument strings first, often from a dictionary. Then,
    the task internally breaks those up into dictionaries, performs some
    checks on those dictionaries, and then transforms it back into strings.
    Why can't I pass in a dictionary in the first place?

  • Most of the classes have only one method ("run"), e.g.
    runtask.Runtask, sastask.MyTask. What's the point of making that a
    class? (see the classic talk https://www.youtube.com/watch?v=o9pEzgHorH0).

Note that all this could be done in a way that's backwards compatible, for example from poses import evselect could be added to the namespace today with our breaking existing code. Those new imports could then also be more Pythonic - accept individual arguments in the usual key=value form instead of the long list of strings.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions