tensorflow/tfx-addons

[Discussion] How should we use CI for repo?

casassg opened this issue · 2 comments

AS a followup conversation with @TheMichaelHu in #43 (comment) How should we set up CI?

For now here's what I added on pre-submit for anything under tfx_addons:

  • YAPF autoformatter (2 spaces + pep8) - This is similar to other repos and helps solve a lot of formatting issues/discussions.
  • isort - Helps maintain import orders nicely which helps on merge conflicts.
  • pylint - Used the TFX configuration here to make sure we have some nice python code.
  • Add-license - This is probs one that can be removed. I like it as it makes it easier to contribute code and you can kinda forget to add license as this adds it for you if you have pre-submitt activated. But we can skip it on CI?

Reasoning to not add to folders under examples:

  • Each example may use separate requirements and separate structures since we have not consolidated on one. We could standarize, but then we may add too much friction.
  • Each example can add their own CI job easily using GitHub Actions.

Also, added pytest automatic run for jobs added to tfx_addons. I didnt add examples to pytest to avoid issues on different configurations.

What are people thoughts on wether all those tests are enough/too much? Wether we should enable pre-submit-hook for examples folders?

Overall, took a fast opinionated stance to get something working for now, but would be interested on feedback or on wether we should change things here.

I think the formatters you added are pretty standard, so we could have the same pre-submit hook for folders under examples too, with opt-out option (rather than opt-in).

Sure. We would need buy-in from @TheMichaelHu to see if we can apply the same formatters in sklearn project