unum-cloud / uform

Pocket-Sized Multimodal AI for content understanding and generation across multilingual texts, images, and 🔜 video, up to 5x faster than OpenAI CLIP and LLaVA 🖼️ & 🖋️
https://unum-cloud.github.io/uform/
Apache License 2.0
982 stars 56 forks source link

chore: add pre-commit config and run linters #62

Closed lmmx closed 5 months ago

lmmx commented 6 months ago

Background: Follow-up to #58, which was cancelled as it combined the contribution of pre-commit config (to run linters) with a refactor (for code structure), and it transpired that only the former was desirable upon submission

I've re-done the changes (by copying over the pre-commit exactly as in the previous PR #58 and executing it on this fresh branch). The only edits that were required to achieve a successful linting were the removal of * imports (torchvision.transforms.* and uform.models.* specifically)

Other than that nothing was changed, then the linters ran.

Some of these are the built-in ones from the pre-commit tool's own hooks:

Additionally:

To run this on CI all you have to do is go to pre-commit.ci and give its GitHub Actions app permission to run on your CI (does not require a .github/workflows YAML config to run). The pre-commit config YAML file introduced in this PR is sufficient to configure the CI workflow to then run it.

ashvardanian commented 5 months ago

:tada: This PR is included in version 1.1.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: