sul-dlss / cocina-models

Cocina repository data model (implemented in Ruby)
https://sul-dlss.github.io/cocina-models/
3 stars 0 forks source link

Generate models en masse and run rubocop en masse #566

Closed mjgiarlo closed 1 year ago

mjgiarlo commented 1 year ago

Why was this change made? 🤔

This commit speeds up model generation notably by significantly reducing the number of times we have to run rubocop, which is now down to one time.

How was this change tested? 🤨

CI + repeated generation runs

mjgiarlo commented 1 year ago

@jcoyne 💬

Does this still work even if you're only generating a single schema (e.g. exe/generator generate_schema DRO)?

Yes, but that bit is jammed into another commit (pulling these small PRs out of another branch). I'll grab that. Good eye!

mjgiarlo commented 1 year ago

@ndushay 💬

this seems like an annoying weird hoop for using rubocop.

On one hand, yeah. On the other, it's also nice to generate models w/o caring too much about indentation and whitespace and then fix it all up in one fell swoop at the end.

justinlittman commented 1 year ago

Yeah, the motivation behind the rubocop cleanup is that it was nearly impossible to get the indentation and whitespace correct when generating.