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

Make suggested changes to looper init #514

Open
4 tasks done
donaldcampbelljr opened this issue Aug 20, 2024 · 4 comments
Open
4 tasks done

Make suggested changes to looper init #514

donaldcampbelljr opened this issue Aug 20, 2024 · 4 comments
Milestone

Comments

@donaldcampbelljr
Copy link
Contributor

donaldcampbelljr commented Aug 20, 2024

  • remove pause.
  • it currently erroneously complains if you give it a registry path.
  • remove asking if the user would wish to follow tutorial (assume looper init) wants the walkthrough.
  • rework asking if the user wants to restart the process if the output does not look good.
@donaldcampbelljr
Copy link
Contributor Author

added generic flag (--generic, -g), if user supplied, looper will give the default generic config file.

@nsheff
Copy link
Contributor

nsheff commented Aug 22, 2024

the new looper init made me add 2 pipeline interfaces, and then it created a broken init, because the second one was blank... it created this broken config file for me:

pep_config: metadata/sample_table.csv
output_dir: results
pipeline_interfaces:
- - pipeline/pipeline_interface.yaml

(notice two hyphens)

──────────────────────────  Looper initialization ──────────────────────────
This utility will walk you through creating a .looper.yaml file.
See `looper init --help` for details.
Use `looper run` afterwards to run the pipeline.
Press ^C at any time to quit.

Project name: (new_csv) >
Registry path or file path to PEP: (databio/example) >metadata/sample_table.csv
Path to output directory: (results) >
Add each path to a pipeline interface: (pipeline_interface.yaml) >pipeline/pipeline_interface.yaml
Add each path to a pipeline interface: (pipeline_interface.yaml) >


pep_config: metadata/sample_table.csv
output_dir: results
pipeline_interfaces:
  - ['pipeline/pipeline_interface.yaml']

Writing config file to .looper.yaml
nsheff@vole:~/code/hello_looper/new_csv$ cat .looper.yaml 
pep_config: metadata/sample_table.csv
output_dir: results
pipeline_interfaces:
- - pipeline/pipeline_interface.yaml

some other thoughts:

  • The "Add each path to a pipeline interface" is not intuitive to me. It needs to be clear that I can just cancel it, somehow. (and it's broken, since it adds a blank one)
  • I tried to tab-complete to get a path to a metadata file in a local folder, and it broke it for me. Can we enable tab-completion? I think without that it makes the tutorial a lot harder to use.

@donaldcampbelljr
Copy link
Contributor Author

donaldcampbelljr commented Aug 22, 2024

I fixed the additional dash when writing the interfaces. I was accidentally wrapping a list within a list.

(and it's broken, since it adds a blank one)

To run basic looper examples, you need a piface. This seemed reasonable to add the path to a generic one if the user does not provide any and then ask them if they'd like to initialize the file. Especially since this is targeted towards beginners/is a tutorial.

It needs to be clear that I can just cancel it, somehow.

I can make a note that pressing enter simply continues?

Can we enable tab-completion?

I seem to remember having a difficult time getting tab completion to work last time I investigated adding it to looper. I believe we had agreed to bail on that for the time being.

@donaldcampbelljr
Copy link
Contributor Author

Oh I think I misunderstood your initial comment. It was not adding a blank interface. I had wrapped the list of interfaces into another list and this causes yaml.dump to add another hyphen to the first entry.

To clarify: if you press enter to continue during the first piface entry, it will place a path to a generic piface there and then ask the user if they'd like to initialize it (if it does not already exist).

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