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

Textual create #2404

Merged
merged 129 commits into from May 14, 2024
Merged

Textual create #2404

merged 129 commits into from May 14, 2024

Conversation

ewels
Copy link
Member

@ewels ewels commented Aug 20, 2023

First stab at using Textual to create a TUI (text user interface) for creating nf-core pipelines. The idea is that this could replace the Questionary interactive prompts, for a nicer user experience with more space for in-depth documentation.

Command line flags would remain in place, but if some but not all are used then an error would be thrown. The idea being that non-interactive usage is still possible via the CLI, but that all interactive usage should be via the TUI.

Not much done yet. I got as far as the third screen. Main aim was to prototype how this could look and feel, plus playing with using Pydantic to hold the config generated by the wizard and apply input validations in a scalable manner.

To try this out:

pip install -e .  # Updated requirements.txt file in PR
nf-core pipelines create

To run in dev mode (CSS changes hot-reload):

pip install -r requirements-dev.txt   # one time
textual run --dev -c  nf-core pipelines create

Whilst in the app, d switches dark mode on and off and q quits. Ctrl+c also quits.

Shout if any of the code doesn't make sense! Feedback welcome 🙏🏻

Demo:

CleanShot.2023-08-21.at.00.20.15.mp4

@ewels ewels added WIP Work in progress command line tools Anything to do with the cli interfaces labels Aug 20, 2023
@ewels ewels changed the base branch from master to dev August 20, 2023 22:22
@nf-core nf-core deleted a comment from github-actions bot Aug 20, 2023
@ewels
Copy link
Member Author

ewels commented Aug 20, 2023

Proposed as an alternative to the UI improvements started in #2398

@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Attention: Patch coverage is 82.54649% with 122 lines in your changes are missing coverage. Please review.

Project coverage is 76.11%. Comparing base (1ef694d) to head (9d6838c).
Report is 23 commits behind head on dev.

Files Patch % Lines
nf_core/pipelines/create/githubrepo.py 44.02% 75 Missing ⚠️
nf_core/pipelines/create/create.py 83.80% 17 Missing ⚠️
nf_core/pipelines/create/utils.py 91.59% 10 Missing ⚠️
nf_core/pipelines/create/custompipeline.py 76.00% 6 Missing ⚠️
nf_core/__main__.py 89.36% 5 Missing ⚠️
nf_core/pipelines/create/finaldetails.py 92.72% 4 Missing ⚠️
nf_core/pipelines/create/__init__.py 94.23% 3 Missing ⚠️
nf_core/pipelines/create/basicdetails.py 98.18% 1 Missing ⚠️
nf_core/pipelines/create/nfcorepipeline.py 95.45% 1 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mirpedrol
Copy link
Member

mirpedrol commented Aug 31, 2023

From @ewels during Slack discussion:

  • Pre-populate author name from git config --global user.name if possible
  • Add options at the end to "finish" the git config
    • Ask if a remote repo already exists
    • Offer to create one on github.com via the API, with appropriate fields
    • If we have either of the two above, configure the remote origin
    • If we can configure the remote, do the git push --all
  • Include more boilerplate docs about developing with the community, #new-pipelines etc
  • Form fields for other CLI flags, such as target output directly. Pre-populate with defaults.

@mirpedrol
Copy link
Member

I created issues to track what is missing from the TUI
#2963
#2964
#2965

If there aren't major concerns, I would merge this PR and continue the development in smaller PRs.

@mirpedrol mirpedrol merged commit 942ce49 into nf-core:dev May 14, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command line tools Anything to do with the cli interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants