Skip to content

Commit

Permalink
Merge pull request #51 from roboflow/dev/formatting
Browse files Browse the repository at this point in the history
formatting: 🧹 -> 📦 project formatting,ruff,bandit,mypy configurations are added
  • Loading branch information
SkalskiP committed Sep 18, 2024
2 parents 41d98d3 + fe1b3e7 commit 01265e7
Show file tree
Hide file tree
Showing 39 changed files with 5,380 additions and 5,527 deletions.
43 changes: 42 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
*.ipynb linguist-vendored
# Basic .gitattributes for a python repo.

# Source files
# ============
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.pyz text diff=python
*.pyi text diff=python

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pickle binary
*.pyc binary export-ignore
*.pyo binary export-ignore
*.pyd binary

# Jupyter notebook
# *.ipynb text eol=lf
*.ipynb linguist-vendored

# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).

# md files
# ========
*.md linguist-vendored

# ini files
# =========
*.ini linguist-vendored

# yaml files
# ==========
*.yaml linguist-vendored
59 changes: 40 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@

ci:
autofix_prs: true
autoupdate_schedule: weekly
autofix_commit_msg: "fix(pre_commit): 🎨 auto format pre-commit hooks"
autoupdate_commit_msg: "chore(pre_commit): ⬆ pre_commit autoupdate"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
args: [--line-length=120]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
args: [--max-line-length=120]
- id: trailing-whitespace
exclude: test/.*\.py
- id: check-executables-have-shebangs
- id: check-toml
- id: check-case-conflict
- id: check-added-large-files
- id: detect-private-key
- id: pretty-format-json
args: ['--autofix', '--no-sort-keys', '--indent=4']
- id: end-of-file-fixer
- id: mixed-line-ending

- repo: https://github.com/PyCQA/bandit
rev: '1.7.9'
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
types_or: [ python, pyi, jupyter ]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.11.2'
hooks:
- id: mypy
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ keywords:
- computer vision
- large multimodal models
- lmms
license: MIT
license: MIT
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ You can learn more about mkdocs on the [mkdocs website](https://www.mkdocs.org/)

## 📄 license

By contributing, you agree that your contributions will be licensed under an [MIT license](https://github.com/roboflow/multimodal-maestro/blob/develop/LICENSE.md).
By contributing, you agree that your contributions will be licensed under an [MIT license](https://github.com/roboflow/multimodal-maestro/blob/develop/LICENSE.md).
Loading

0 comments on commit 01265e7

Please sign in to comment.