rewrite-gradle-plugin icon indicating copy to clipboard operation
rewrite-gradle-plugin copied to clipboard

Add support for datatables

Open rpau opened this issue 2 years ago • 4 comments

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.

rpau avatar May 12 '23 12:05 rpau

@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.

shanman190 avatar May 12 '23 13:05 shanman190

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.

rpau avatar May 12 '23 13:05 rpau

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 avatar Nov 29 '23 12:11 timtebeek

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

  • https://github.com/openrewrite/rewrite-maven-plugin/pull/751

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

  • https://github.com/openrewrite/rewrite/pull/4087

timtebeek avatar May 01 '24 16:05 timtebeek

I opened up a PR to implement data tables: https://github.com/openrewrite/rewrite-gradle-plugin/pull/310

ryanwalker avatar Jul 20 '24 00:07 ryanwalker