openrewrite / rewrite-gradle-plugin

OpenRewrite's Gradle plugin.
Apache License 2.0
56 stars 34 forks source link

Add support for datatables #201

Open rpau opened 1 year ago

rpau commented 1 year ago

Background

Datatables is a new openrewrite structure to produce tabular content. However, this is not consumable outside of the Moderne SaaS. This creates confusion in the community when they try to run those recipes and no results are generated.

Acceptance Criteria

The plugin produces a CSV with the datatables content.

shanman190 commented 1 year ago

@rpau, I could see this being useful for the community as well.

I can kinda see two possible ways to go about this: export all data tables from any active recipe or allow the user to export a set that they define. For the second it could possibly look something like this:

rewrite {
    activeDatatables(String...)
}

I could see a few ways that we could even potentially support both all and some (ie. Glob match or a boolean switch), if that was so desired.

rpau commented 1 year ago

I agree. The way that I see it is to export all data tables into different CSVs without any extra configuration. Then, if activeDatatables or datatables(Datatable(name:String, path: Path)...) is defined, the behavior is restricted to that configuration.

timtebeek commented 7 months ago

Folks looking to export and analyze data tables are best off using the Moderne CLI. That then also allows running across multiple projects and aggregating the results, and producing reports with Jupyter through mod study. Have a look at the Moderne docs to get started there: https://docs.moderne.io/user-documentation/getting-started/data-tables

timtebeek commented 2 months ago

@ryan-hudson recently added data tables to the Maven plugin 🙏🏻

Might make sense to do the same for the Gradle plugin, based on the work Ryan had earlier done in