From 3d26c5c833f879e8e1e0ebfb481484e983d759c1 Mon Sep 17 00:00:00 2001 From: actlikewill Date: Mon, 29 Jul 2024 11:07:50 +0300 Subject: [PATCH 1/9] fix alphabet filter --- peachjam/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peachjam/forms.py b/peachjam/forms.py index 258e46656..a25eb8933 100644 --- a/peachjam/forms.py +++ b/peachjam/forms.py @@ -159,7 +159,7 @@ def filter_queryset(self, queryset, exclude=None, filter_q=False): queryset = queryset.filter(date__year__in=years) if alphabet and exclude != "alphabet": - queryset = queryset.filter(title__istartswith=alphabet) + queryset = queryset.filter(title__istartswith=alphabet[0]) if authors and exclude != "authors": queryset = queryset.filter(authors__name__in=authors) From c08dfac8ebbd1a866068962080a1c30247927d97 Mon Sep 17 00:00:00 2001 From: actlikewill Date: Mon, 29 Jul 2024 13:52:50 +0300 Subject: [PATCH 2/9] pins setup tools to lower than 72.0.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 67e3ddd71..ae6570980 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "setuptools_scm[toml]>=6.2", "wheel"] +requires = ["setuptools<72.0.0", "setuptools_scm[toml]>=6.2", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] From cc09be03586ee512c2f2267fbdf225f8c39352c3 Mon Sep 17 00:00:00 2001 From: actlikewill Date: Mon, 29 Jul 2024 14:04:01 +0300 Subject: [PATCH 3/9] pins setup tool to lower than 72.0.0 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f0e063609..cfd401581 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: run: | sudo apt-get -y update sudo apt-get install -y libreoffice poppler-utils - python -m pip install --upgrade setuptools wheel + python -m pip install --upgrade setuptools<72.0.0 wheel pip install . pip install psycopg2-binary==2.9.3 npm ci --no-audit --ignore-scripts --only=prod From 1ac10126c09c1ed700e6eed12a5272d4d9c112f9 Mon Sep 17 00:00:00 2001 From: actlikewill Date: Mon, 29 Jul 2024 14:17:04 +0300 Subject: [PATCH 4/9] changes setuptools --- .github/workflows/test.yml | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cfd401581..52d6ff872 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,8 @@ jobs: run: | sudo apt-get -y update sudo apt-get install -y libreoffice poppler-utils - python -m pip install --upgrade setuptools<72.0.0 wheel + python -m pip install setuptools==71.1.0 + python -m pip install --upgrade wheel pip install . pip install psycopg2-binary==2.9.3 npm ci --no-audit --ignore-scripts --only=prod diff --git a/pyproject.toml b/pyproject.toml index ae6570980..ec6b92ebe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools<72.0.0", "setuptools_scm[toml]>=6.2", "wheel"] +requires = ["setuptools==71.1.0", "setuptools_scm[toml]>=6.2", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] From 7c64a5ea9f5b3fdfae292dc7c5c5e683565976b4 Mon Sep 17 00:00:00 2001 From: actlikewill Date: Mon, 29 Jul 2024 14:36:09 +0300 Subject: [PATCH 5/9] fixes setup tools --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ec6b92ebe..90f748905 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools==71.1.0", "setuptools_scm[toml]>=6.2", "wheel"] +requires = ["setuptools==68.2.0", "setuptools_scm[toml]>=6.2", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] From 04c094bcbb7bde5398873b47918a341209a4ac93 Mon Sep 17 00:00:00 2001 From: actlikewill Date: Mon, 29 Jul 2024 14:39:46 +0300 Subject: [PATCH 6/9] fixes setup tools --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52d6ff872..d4bc2a74d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,8 +42,7 @@ jobs: run: | sudo apt-get -y update sudo apt-get install -y libreoffice poppler-utils - python -m pip install setuptools==71.1.0 - python -m pip install --upgrade wheel + python -m pip install setuptools==68.2.0 wheel pip install . pip install psycopg2-binary==2.9.3 npm ci --no-audit --ignore-scripts --only=prod From ca86db3caae37c334640b602cf91e612e471811f Mon Sep 17 00:00:00 2001 From: actlikewill Date: Mon, 29 Jul 2024 14:54:09 +0300 Subject: [PATCH 7/9] fixes alphabet filtering --- peachjam/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/peachjam/forms.py b/peachjam/forms.py index a25eb8933..9195320ed 100644 --- a/peachjam/forms.py +++ b/peachjam/forms.py @@ -108,7 +108,7 @@ class BaseDocumentFilterForm(forms.Form): """ years = PermissiveTypedListField(coerce=int, required=False) - alphabet = PermissiveTypedListField(required=False) + alphabet = forms.CharField(required=False) authors = PermissiveTypedListField(coerce=remove_nulls, required=False) doc_type = PermissiveTypedListField(coerce=remove_nulls, required=False) judges = PermissiveTypedListField(coerce=remove_nulls, required=False) @@ -140,7 +140,7 @@ def __init__(self, defaults, data, *args, **kwargs): def filter_queryset(self, queryset, exclude=None, filter_q=False): years = self.cleaned_data.get("years", []) - alphabet = self.cleaned_data.get("alphabet", []) + alphabet = self.cleaned_data.get("alphabet") authors = self.cleaned_data.get("authors", []) courts = self.cleaned_data.get("courts", []) doc_type = self.cleaned_data.get("doc_type", []) @@ -159,7 +159,7 @@ def filter_queryset(self, queryset, exclude=None, filter_q=False): queryset = queryset.filter(date__year__in=years) if alphabet and exclude != "alphabet": - queryset = queryset.filter(title__istartswith=alphabet[0]) + queryset = queryset.filter(title__istartswith=alphabet) if authors and exclude != "authors": queryset = queryset.filter(authors__name__in=authors) From f0bddefccdb19e1c28ecb57d980661167fdb700f Mon Sep 17 00:00:00 2001 From: actlikewill Date: Tue, 30 Jul 2024 09:07:20 +0300 Subject: [PATCH 8/9] revert setuptools --- .github/workflows/test.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d4bc2a74d..f0e063609 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: run: | sudo apt-get -y update sudo apt-get install -y libreoffice poppler-utils - python -m pip install setuptools==68.2.0 wheel + python -m pip install --upgrade setuptools wheel pip install . pip install psycopg2-binary==2.9.3 npm ci --no-audit --ignore-scripts --only=prod diff --git a/pyproject.toml b/pyproject.toml index 90f748905..cae5b0707 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools==68.2.0", "setuptools_scm[toml]>=6.2", "wheel"] +requires = [setuptools, "setuptools_scm[toml]>=6.2", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] From 28f64b1711e4ef84b1d62ad9d7085fde16bdf7fc Mon Sep 17 00:00:00 2001 From: actlikewill Date: Tue, 30 Jul 2024 09:12:04 +0300 Subject: [PATCH 9/9] fixes pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cae5b0707..67e3ddd71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = [setuptools, "setuptools_scm[toml]>=6.2", "wheel"] +requires = ["setuptools", "setuptools_scm[toml]>=6.2", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find]