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

pysas UI is unintuitive and unnecessarily cumbersome #10

Open
hamogu opened this issue Feb 28, 2025 · 0 comments
Open

pysas UI is unintuitive and unnecessarily cumbersome #10

hamogu opened this issue Feb 28, 2025 · 0 comments

Comments

@hamogu
Copy link

hamogu commented Feb 28, 2025

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant