feat(Scripts): support multi-level script groups via subfolders#2738
Draft
fubuloubu wants to merge 2 commits intoApeWorX:mainfrom
Draft
feat(Scripts): support multi-level script groups via subfolders#2738fubuloubu wants to merge 2 commits intoApeWorX:mainfrom
fubuloubu wants to merge 2 commits intoApeWorX:mainfrom
Conversation
8ae8dde to
85f9b1c
Compare
85f9b1c to
2378078
Compare
|
This pull request is considered stale because it has been open 30 days with no activity. Remove stale label, add a comment, or make a new commit, otherwise this PR will be closed in 5 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Refactored the discovery of ape scripts to make them slightly "lazier" and adding support for "subfolder groups", which composes a
click.Groupfrom script files (and/or further subfolder groups) for a non-module pathfixes: #2735
Also tried to fix this issue w/ using
--interactivewhere a successful script doesn't actually launch the terminalfixes: #2693
How I did it
By refactoring the discovery process, we add a lot more flexibility on how we handle the
scripts/folder, allowing the potential for other types of scripts (remote or dependency scripts, non-Python scripts, etc.)Also, in theory it should now support loading scripts from a Python module, as long as that module exposes either a
mainfunction orcliclick.Command|GroupHow to verify it
Run this branch on any Ape project and see if it works
Checklist