Skip to content

Commit

Permalink
Maintenance update
Browse files Browse the repository at this point in the history
  • Loading branch information
MrThearMan committed Oct 30, 2023
1 parent 6bb0116 commit b0df24b
Show file tree
Hide file tree
Showing 31 changed files with 883 additions and 672 deletions.
File renamed without changes.
57 changes: 57 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Default behavior
# ============
* text=auto

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

# Plain text
# ============
*.js text diff=js
*.css text diff=css
*.html text diff=html
*.md text diff=markdown
*.json text diff=json eol=lf
*.toml text diff=toml eol=lf
*.yml text diff=yaml eol=lf
*.yaml text diff=yaml eol=lf

# Archives
# ============
*.7z filter=lfs diff=lfs merge=lfs -text
*.br filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text

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

# Unix specific
# ============
*.sh text eol=lf
*.bash text eol=lf
*.fish text eol=lf

# Windows specific
# ============
*.cmd text eol=crlf
*.bat text eol=crlf
*.ps1 text eol=crlf
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ body:
description: >-
Please note that python versions not available below are not supported.
options:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
validations:
required: true
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ on:

jobs:
docs:
uses: MrThearMan/CI/.github/workflows/docs.yml@v0.3.4
uses: MrThearMan/CI/.github/workflows/docs.yml@v0.4.0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
release:
uses: MrThearMan/CI/.github/workflows/release.yml@v0.3.4
uses: MrThearMan/CI/.github/workflows/release.yml@v0.4.0
secrets:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:

jobs:
test:
uses: MrThearMan/CI/.github/workflows/test.yml@v0.3.4
uses: MrThearMan/CI/.github/workflows/test.yml@v0.4.0
with:
python-version: '["3.8", "3.9", "3.10", "3.11"]'
exclude: '[{"os": "windows-latest", "python-version": "3.8"}]'
python-version: '["3.9", "3.10", "3.11", "3.12"]'
10 changes: 3 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-toml
- id: check-yaml
Expand All @@ -15,11 +15,7 @@ repos:
]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.278
rev: v0.1.3
hooks:
- id: ruff

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- id: ruff-format
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export DJANGO_SETTINGS_MODULE = tests.django.settings
export DJANGO_SETTINGS_MODULE = tests.project.settings

.PHONY: help
.PHONY: dev
Expand All @@ -7,8 +7,7 @@ export DJANGO_SETTINGS_MODULE = tests.django.settings
.PHONY: test
.PHONY: tox
.PHONY: hook
.PHONY: pre-commit
.PHONY: pre-commit-update
.PHONY: lint
.PHONY: mypy
.PHONY: Makefile

Expand All @@ -30,8 +29,7 @@ define helptext
test <name> Run all tests maching the given <name>
tox <args> Run all tests with tox.
hook Install pre-commit hook.
pre-commit <hook> Run pre-commit hooks on all files.
pre-commit-update Update all pre-commit hooks to latest versions.
lint Run pre-commit hooks on all files.
mypy Run mypy on all files.

Use quotes (" ") if command contains flags (-h / --help)
Expand Down Expand Up @@ -60,11 +58,8 @@ tox:
hook:
@poetry run pre-commit install

pre-commit:
@poetry run pre-commit run --all-files $(call args, "")

pre-commit-update:
@poetry run pre-commit autoupdate
lint:
@poetry run pre-commit run --all-files

mypy:
@poetry run mypy django_signal_webhooks/
11 changes: 4 additions & 7 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
import sys


def main():
def main() -> None:
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.django.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.project.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
msg = "Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?"
raise ImportError(msg) from exc
execute_from_command_line(sys.argv)


Expand Down
Loading

0 comments on commit b0df24b

Please sign in to comment.