Skip to content

Commit

Permalink
Merge pull request #2267 from anehx/update
Browse files Browse the repository at this point in the history
fix(deps): update dependencies
  • Loading branch information
anehx authored Aug 9, 2024
2 parents 5d20e82 + 322dc23 commit 532efca
Show file tree
Hide file tree
Showing 15 changed files with 769 additions and 794 deletions.
4 changes: 2 additions & 2 deletions caluma/caluma_analytics/tests/__snapshots__/test_table.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@
}),
})
# ---
# name: test_add_field_validations[meta.foobar-existing-duplicate key value violates unique constraint "unique_alias"-alias]
# name: test_add_field_validations[meta.foobar-existing-must make a unique set-alias]
dict({
'saveAnalyticsField': None,
})
# ---
# name: test_add_field_validations[meta.foobar-foobar-duplicate key value violates unique constraint "unique_data_source"-dataSource]
# name: test_add_field_validations[meta.foobar-foobar-must make a unique set-dataSource]
dict({
'saveAnalyticsField': None,
})
Expand Down
2 changes: 1 addition & 1 deletion caluma/caluma_analytics/tests/test_migrate_form_slugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_migrate_rename_form_slugs(post_migrate_to_current_state):
# `form_id` data source anymore.
runner.get_records()
assert exc_info.value.args == ("form_id",)
assert type(exc_info.value) == KeyError
assert isinstance(exc_info.value, KeyError)

# Migrate forwards.
executor.loader.build_graph() # reload.
Expand Down
2 changes: 1 addition & 1 deletion caluma/caluma_analytics/tests/test_pivot_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ def test_run_analytics_gql(
"status": "0",
"last_created": "0",
"quarter": "0",
"sub_question_sumsumsum": "17085.0",
"sub_question_sumsumsum": "17448.0",
}
4 changes: 2 additions & 2 deletions caluma/caluma_analytics/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ def test_validate_function(
(
"meta.foobar",
"foobar",
'duplicate key value violates unique constraint "unique_data_source"',
"must make a unique set",
"dataSource",
),
(
"meta.foobar",
"existing",
'duplicate key value violates unique constraint "unique_alias"',
"must make a unique set",
"alias",
),
(
Expand Down
2 changes: 1 addition & 1 deletion caluma/caluma_core/tests/test_mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Meta:
serializer_class = MySerializer

result = NoModelMutation.mutate_and_get_payload(None, info, name="test")
assert type(result) == NoModelMutation
assert isinstance(result, NoModelMutation)


def test_mutation_mutate_and_get_payload_without_permission(db, info):
Expand Down
2 changes: 2 additions & 0 deletions caluma/caluma_form/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,11 @@ def files(self, create, extracted, **kwargs):
self.files.set(
FileFactory.create_batch(num_files, **kwargs, answer=self)
)
self.save()

class Meta:
model = models.Answer
skip_postgeneration_save = True

class Params:
is_date = LazyAttribute(lambda a: a.question.type == models.Question.TYPE_DATE)
Expand Down
1 change: 1 addition & 0 deletions caluma/caluma_form/structure.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Hierarchical representation of a document / form."""

import weakref
from functools import singledispatch
from typing import List, Optional
Expand Down
6 changes: 3 additions & 3 deletions caluma/caluma_form/tests/__snapshots__/test_history.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
'edges': list([
dict({
'node': dict({
'historyType': '~',
'historyType': '+',
'value': 'first row value',
}),
}),
Expand All @@ -85,7 +85,7 @@
'edges': list([
dict({
'node': dict({
'historyType': '~',
'historyType': '+',
'value': 'second row value',
}),
}),
Expand All @@ -110,7 +110,7 @@
'edges': list([
dict({
'node': dict({
'historyType': '~',
'historyType': '+',
'value': 'first row value',
}),
}),
Expand Down
2 changes: 1 addition & 1 deletion caluma/caluma_form/tests/test_answer.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def test_delete_question_with_default(db, question, answer):
with pytest.raises(models.Answer.DoesNotExist):
answer.refresh_from_db()

assert models.Answer.history.count() == 3
assert models.Answer.history.count() == 2
assert all(
h.history_question_type == question.type for h in models.Answer.history.all()
)
Expand Down
1 change: 0 additions & 1 deletion caluma/settings/caluma.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
applications integrating Caluma.
"""


import os

import environ
Expand Down
1 change: 0 additions & 1 deletion caluma/tests/__snapshots__/test_schema.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -3612,6 +3612,5 @@
attribute: SortableWorkflowAttributes
direction: AscDesc
}

'''
# ---
1 change: 0 additions & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.4"
services:
db:
environment:
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.4"
services:
db:
image: postgres:14-alpine
Expand Down
1,479 changes: 730 additions & 749 deletions poetry.lock

Large diffs are not rendered by default.

55 changes: 25 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,53 +20,53 @@ exclude = ["caluma/**/tests"]
[tool.poetry.dependencies]
python = "^3.9.13"
dateparser = "^1.2.0"
Django = "^4.2.9"
Django = "^4.2.15"
django-cors-headers = "^4.3.1"
django-environ = "^0.11.2"
django-filter = "^23.5"
django-localized-fields = "^6.7"
django-filter = ">=23.5,<25.0"
django-localized-fields = "^6.8b5"
django-postgres-extra = "^2.0.8"
django-watchman = "^1.3.0"
djangorestframework = "^3.14.0"
django-simple-history = "^3.4.0"
graphene-django = "3.2.0"
graphql-relay = "^3.1.5"
django-watchman = "^1.3.0"
djangorestframework = "^3.15.2"
graphene-django = "^3.2.2"
graphql-core = "^3.2.3"
graphql-relay = "^3.2.0"
idna = "^3.6"
minio = "^7.2.3"
minio = "^7.2.7"
psycopg = { extras = ["binary"], version = "^3.1.17" }
psycopg-binary = "^3.1.17"
pyjexl = "^0.3.0"
python-memcached = "^1.62"
requests = "^2.31.0"
urllib3 = ">=1.26.8,<3.0.0"
uWSGI = "^2.0.20"
graphql-core = "~3.1.7"
psycopg = {extras = ["binary"], version = "^3.1.17"}
psycopg-binary = "^3.1.17"
uWSGI = "^2.0.26"

[tool.poetry.group.dev.dependencies]
# Dev dependencies are always pinned to an exact version (No caret or tilde
# matching) to ensure everyone uses the same version of the tools, especially
# linters & formatters
django-extensions = "3.2.3"
factory-boy = "3.2.1"
Faker = "24.3.0"
factory-boy = "3.3.0"
Faker = "26.3.0"
gitlint = "0.19.1"
pdbpp = "0.10.3"
pre-commit = "3.6.0"
pre-commit = "3.8.0"
pydocstyle = "6.3.0"
pytest = "8.2.2"
pytest = "8.3.2"
pytest-cov = "5.0.0"
pytest-django = "4.8.0"
pytest-env = "1.1.3"
pytest-factoryboy = "2.7.0"
pytest-freezegun = "0.4.2"
pytest-freezer= "0.4.8"
pytest-mock = "3.14.0"
pytest-randomly = "3.15.0"
pytest-xdist = "3.5.0"
pytest-xdist = "3.6.1"
python-semantic-release = "8.7.0"
requests-mock = "1.11.0"
reuse = "3.0.1"
requests-mock = "1.12.1"
reuse = "4.0.3"
ruff = "0.5.7"
syrupy = "4.6.1"
ruff = ">=0.1.15,<0.3.0"


[tool.isort]
Expand Down Expand Up @@ -96,13 +96,6 @@ filterwarnings = [
"error::PendingDeprecationWarning",
# warning in python 3.12 about deprecation coming in 3.14. issue is with graphene
"ignore:.*typing.ByteString.*deprecated and slated for removal in Python 3.14",
"ignore:The 'arrayconnection' module is deprecated:DeprecationWarning", # deprecation in graphene
"ignore:'cgi' is deprecated:DeprecationWarning",
"ignore:distutils Version classes are deprecated:DeprecationWarning", # deprecation in pytest-freezegun
"ignore:'django_extensions' defines default_app_config:PendingDeprecationWarning", # deprecation in django_extensions
"ignore::requests.packages.urllib3.exceptions.InsecureRequestWarning", # MinIO tests do "insecure" requests - that's ok
"ignore:invalid escape sequence",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning", # deprecation in django-simple-history
]

[tool.ruff]
Expand All @@ -111,6 +104,9 @@ exclude = [
"snapshots",
".venv",
]
line-length = 88

[tool.ruff.lint]
ignore = [
"D100",
"D101",
Expand All @@ -128,7 +124,6 @@ ignore = [
"D406", # Section name should end with a newline
"D203", # one-blank-line-before-class (docstring)
]
line-length = 88
select = [
"C9",
"D",
Expand All @@ -138,7 +133,7 @@ select = [
"I",
]

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 11

[tool.ruff.lint.isort]
Expand Down

0 comments on commit 532efca

Please sign in to comment.