looper
looper copied to clipboard
Make suggested changes to `looper init`
- [x] remove pause.
- [x] it currently erroneously complains if you give it a registry path.
- [x] remove asking if the user would wish to follow tutorial (assume looper init) wants the walkthrough.
- [x] rework asking if the user wants to restart the process if the output does not look good.
added generic flag (--generic, -g), if user supplied, looper will give the default generic config file.
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.
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.
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).