Skip to content

Commit

Permalink
Merge branch 'v3' of https://github.com/bckohan/django-typer into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Dec 4, 2024
2 parents 1597b0f + 6647960 commit f87f2d3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: local
hooks:
- id: lint
name: Lint
entry: just lint
language: system
pass_filenames: false
- id: format
name: Format
entry: just format
language: system
pass_filenames: false
1 change: 1 addition & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Change Log
v3.0.0 (202X-XX-XX)
===================

* Implemented `Add precommit hook to fix safe lint and format issues <https://github.com/django-commons/django-typer/issues/153>`_
* BREAKING `Remove name parameter from initialize()/callback(). <https://github.com/django-commons/django-typer/issues/150>`_
* Implemented `Run full test suite on mac osx <https://github.com/django-commons/django-typer/issues/148>`_
* Implemented `Convert check.sh to justfile <https://github.com/django-commons/django-typer/issues/147>`_
Expand Down
9 changes: 7 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ init:
poetry config --local virtualenvs.in-project true
poetry run pip install --upgrade pip setuptools wheel

install-precommit:
poetry run pre-commit install

install *PACKAGES="Django":
poetry env use python
poetry lock
poetry install -E rich
poetry run pre-commit install
poetry run pip install -U {{ PACKAGES }}

install-colorama:
Expand Down Expand Up @@ -95,7 +99,7 @@ sort-imports:
lint: sort-imports
poetry run ruff check --fix

fix: format lint
fix: lint format

check: check-lint check-format check-types check-package check-docs check-docs-links check-readme

Expand All @@ -115,7 +119,8 @@ test: test-rich test-no-rich install-colorama
test-cases +TESTS:
poetry run pytest {{ TESTS }}

precommit: fix
precommit:
poetry run pre-commit

coverage:
poetry run coverage combine --keep *.coverage
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ graphviz = ">=0.20.3"
pluggy = ">=1.5.0"
pywinpty = { version = ">=2.0.14", markers = "sys_platform == 'win32'" }
pytest-timeout = ">=2.3.1"
pre-commit = ">=4.0.1"

[tool.poetry.extras]
rich = ["rich"]
Expand Down

0 comments on commit f87f2d3

Please sign in to comment.