Skip to content

Commit

Permalink
Merge pull request #1825 from PiotrIw/develop
Browse files Browse the repository at this point in the history
v1.5.21
  • Loading branch information
PiotrIw authored Sep 19, 2024
2 parents 9963fe5 + 65d6caf commit 8931138
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 80 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ default_language_version:
minimum_pre_commit_version: "1.20.0"
repos:
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.20.0
rev: 1.21.0
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
Expand All @@ -28,7 +28,7 @@ repos:
- --skip-glob
- "**/migrations/*.py"
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.29.1
rev: 0.29.2
hooks:
- id: check-github-workflows
- id: check-readthedocs
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ services:
# mailbox secrets in imap-to-webhook-url.env
#
# imap-to-webhook-feder:
# image: quay.io/watchdogpolska/imap-to-webhook:latest
# image: siecobywatelska/imap-to-webhook:latest-prod
# environment:
# WEBHOOK_URL: "http://web:8000/listy/webhook?secret=dev_letter_rec_very_secret"
# SENTRY_DSN: ""
# SENTRY_ENVIRONMENT: "feder-dev"
# COMPRESS_EML: "True"
# env_file:
# - secrets_imap-to-webhook-url.env:optional
# - secrets_imap-to-webhook-url.env

volumes:
mysql-data:
Expand Down
2 changes: 1 addition & 1 deletion feder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PEP 396: The __version__ attribute's value SHOULD be a string.
__version__ = "1.5.20"
__version__ = "1.5.21"


# Compatibility to eg. django-rest-framework
Expand Down
7 changes: 4 additions & 3 deletions feder/letters/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def save(self, *args, **kwargs):
self.instance.body = html_to_text(self.cleaned_data["html_body"])
if (
not (
self.fields["html_body"].widget.attrs["readonly"]
or self.fields["title"].widget.attrs["readonly"]
self.fields["html_body"].widget.attrs.get("readonly", False)
or self.fields["title"].widget.attrs.get("readonly", False)
)
and ("title" in self.changed_data or "html_body" in self.changed_data)
and not self.instance.author_institution
Expand Down Expand Up @@ -128,8 +128,9 @@ def save(self, *args, **kwargs):
+ " categorization and upadte normalized answers created"
),
)
if not hasattr(self.instance, "record"):
self.instance.record = Record.objects.create(case=self.cleaned_data["case"])
self.instance.save()

return super().save(*args, **kwargs)


Expand Down
142 changes: 83 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"datatables.net-plugins": "^1.13.6",
"font-awesome": "^4.7.0",
"jquery": "^3.7.0",
"postcss": "8.4.41"
"postcss": "8.4.47"
},
"devDependencies": {
"gulp": "^4.0.0",
Expand All @@ -21,7 +21,7 @@
"gulp-concat": "^2.6.0",
"gulp-csslint": "^1.0.1",
"gulp-livereload": "^4.0.2",
"gulp-notify": "^4.0.0",
"gulp-notify": "^5.0.0",
"gulp-postcss": "^10.0.0",
"gulp-rename": "^2.0.0",
"gulp-sass": "^5.1.0",
Expand Down
16 changes: 8 additions & 8 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Production and staging Django
Django==4.2.15
Django==4.2.16

# Database adapter
mysqlclient==2.2.4
Expand All @@ -12,7 +12,7 @@ django-braces==1.15.0
django-crispy-forms==1.14.0

# Models
django-model-utils==4.5.1
django-model-utils==5.0.0

# Images
Pillow==10.4.0
Expand All @@ -28,14 +28,14 @@ unicode-slugify==0.1.5
django-autoslug==1.9.9

# Time zones support
pytz==2024.1
pytz==2024.2

# Commands
lxml==5.3.0


# Your custom requirements go here
cryptography==43.0.0
cryptography==43.0.1
django-filter==24.3
django-autocomplete-light==3.11.0
# django-ajax-datatable to be installed from github fork until
Expand Down Expand Up @@ -92,9 +92,9 @@ html2text==2024.2.26
openpyxl==3.1.5

# LLM exvaluation
langchain==0.2.14
langchain-community==0.2.12
langchain==0.2.16
langchain-community==0.2.17
#langchain[llms]==0.1.5
openai==1.42.0
langchain-openai==0.1.22
openai==1.46.0
langchain-openai==0.1.24
tiktoken==0.7.0
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-r base.txt
Sphinx==7.4.7
sphinx-rtd-theme==2.0.0
Werkzeug==3.0.3
Werkzeug==3.0.4
django-debug-toolbar==4.4.6
ipdb==0.13.13
factory-boy==3.3.1
Expand Down
2 changes: 1 addition & 1 deletion requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Django==3.2.23
gevent==24.2.1
gunicorn==23.0.0
sentry-sdk==2.13.0
sentry-sdk==2.14.0
2 changes: 1 addition & 1 deletion secrets_imap-to-webhook-url.env.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
IMAP_URL="imap+ssl://imap_mailbox_user:imap_mailbox_password@imap_mailbox_server"
IMAP_URL=imap://imap_mailbox_user:imap_mailbox_password@imap_mailbox_server

0 comments on commit 8931138

Please sign in to comment.