Skip to content

Commit

Permalink
Merge pull request #46 from juntossomosmais/chore/update-dependencies
Browse files Browse the repository at this point in the history
chore(dependencies): update python version to 3.10 and django to 5
  • Loading branch information
MatheusGeiger committed Aug 8, 2024
2 parents e476e54 + 9f9d6be commit 15113a0
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 139 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pycqa/pylint
rev: v3.2.5
rev: v3.2.6
hooks:
- id: pylint
additional_dependencies: [ django, 'stomp.py' ]
exclude: migrations
- repo: https://github.com/pycqa/flake8
rev: 7.1.0
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
exclude: migrations/
Expand Down
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
FROM python:3.9-slim
FROM python:3.10-slim

WORKDIR /app
RUN apt update && apt install -y git && apt clean

# Git is required for pre-commit
RUN apt update
RUN apt install -y git
WORKDIR /app

RUN pip install poetry
RUN pip install --upgrade pip && \
pip install poetry && \
poetry config virtualenvs.create false --local

COPY . .
COPY poetry.lock pyproject.toml ./

RUN poetry config virtualenvs.create false && \
poetry install --no-dev --no-root
RUN poetry install --no-root

RUN poetry install --no-root --with dev
COPY . ./
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,4 @@ The `OUTBOX_PATTERN_CONSUMER_CACHE_KEY` variable controls the key name of the ca
**DEFAULT_PUBLISHED_CHUNK_SIZE**
The `DEFAULT_PUBLISHED_CHUNK_SIZE` variable controls chunk size for the `publish` command in get message to publish action. Default: 200
The `DEFAULT_PUBLISHED_CHUNK_SIZE` variable controls chunk size for the `publish` command in get message to publish action. Default: 200
253 changes: 138 additions & 115 deletions poetry.lock

Large diffs are not rendered by default.

36 changes: 27 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-outbox-pattern"
version = "1.1.0"
version = "2.0.0"
description = "A django application to make it easier to use the transactional outbox pattern"
license = "MIT"
authors = ["Hugo Brilhante <[email protected]>"]
Expand All @@ -12,12 +12,12 @@ keywords = ["transactional outbox patterns", "application events", "microservice
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
Expand All @@ -29,18 +29,35 @@ packages = [
]

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
django = ">=4.2"
python = ">=3.10,<4.0"
django = ">=5.0.8"
"stomp.py" = ">=8.0.1,<9"

[tool.poetry.group.dev.dependencies]
psycopg2-binary = "^2.9.6"
coverage = "^7.2.3"
pre-commit = "^3.7.1"
coverage = "*"
pre-commit = "*"

[tool.black]
line-length = 120

target_version = ["py310"]
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
)
'''
[tool.isort]
multi_line_output = 3
include_trailing_comma = 'True'
Expand All @@ -62,7 +79,8 @@ disable = [
"too-few-public-methods",
"logging-not-lazy",
"consider-using-f-string",
"logging-fstring-interpolation"
"logging-fstring-interpolation",
"too-many-ancestors"
]

[tool.pylint.format]
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sonar.cpd.exclusions=\
.venv/**/*,\
**/admin.py
sonar.python.coverage.reportPaths=coverage.xml
sonar.python.version=3.7
sonar.python.version=3.10

sonar.issue.ignore.multicriteria=e1

Expand Down
2 changes: 2 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@
}

DJANGO_OUTBOX_PATTERN = {"DEFAULT_STOMP_HOST_AND_PORTS": [("rabbitmq", 61613)]}

USE_TZ = False

0 comments on commit 15113a0

Please sign in to comment.