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

Add regolith run [profile] --selcted-filters <pattern> (we need better name for the flag) #192

Open
Nusiq opened this issue Aug 29, 2022 · 3 comments
Labels
feature New feature or request

Comments

@Nusiq
Copy link
Member

Nusiq commented Aug 29, 2022

The --selected-filters flag would let you provide a pattern used for selecting which filters should be executed from the profile.

Examples:

  • 1 - first filter
  • ..3 - first 3 filters
  • 2..4 - filters 2,3,4
  • 2,4,1 - filters 2,4,1 (in that order (?))
@Nusiq Nusiq added the feature New feature or request label Aug 29, 2022
@SirLich
Copy link
Contributor

SirLich commented Aug 29, 2022

Looks like this one adds quite a bit of complexity. This would mostly be used for debugging I presume?

@Nusiq
Copy link
Member Author

Nusiq commented Sep 4, 2022

Yes. The most important feature is to implement ..n (run first n filters). This enables tracking what happens in regolith internally while it runs the filters. I think coma separated values are also important. SOmeone could have some kind of beautify filter which would format outputed files at the end. In this case someone might want to debug using command with ..<n>,<las_index> to have the code nicely formatted.

@stirante
Copy link
Member

Debugging which filter breaks something can be done with either commenting out a portion of used filters or adding a "disabled": true to the filter in a profile.
In case someone has some kind of beautify filter or minify filter, they can have a separate profile for development without those filters.

A possible solution could be to have a way to pass some data to when expression maybe like this:

regolith run --data "disableMinify=true,disableBeauitfy=true"

And then you would add a when field to the filter like this

{
  "when": "!disableMinify"
}

I think this feature is not worth the effort.

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

No branches or pull requests

3 participants