Skip to content

Commit

Permalink
Maintenance/pip packages mars 2024 (#3820)
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo authored Mar 22, 2024
1 parent 8009905 commit 3b2e1de
Show file tree
Hide file tree
Showing 16 changed files with 94 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
rev: v0.3.3
hooks:
# Run the linter.
- id: ruff
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ build:
.PHONY: fmt
fmt:
@echo "run code formatters on all code."
python -m ruff --fix .
python -m ruff check --fix .
python -m ruff format .
npx prettier . --write
djhtml hypha/
Expand Down Expand Up @@ -62,7 +62,7 @@ lint:
.PHONY: lint-fix
lint-fix:
@echo "Try fixing plausible python linting issues."
ruff --fix .
ruff check --fix .

.PHONY: py-test
py-test:
Expand Down
6 changes: 3 additions & 3 deletions docs/scripts/doc_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def define_env(env):
env.variables.versions["python"]["version"] = ".".join(py_ver.split(".")[:-1])

if env.variables.versions["python"]["packages"]["macos"] is None:
env.variables.versions["python"]["packages"][
"macos"
] = f"python@{'.'.join(py_ver.split('.')[:-1])}"
env.variables.versions["python"]["packages"]["macos"] = (
f"python@{'.'.join(py_ver.split('.')[:-1])}"
)

if env.variables.versions["node"]["version"] is None:
node_ver = get_node_version()
Expand Down
6 changes: 3 additions & 3 deletions hypha/apply/funds/templatetags/submission_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def submission_links(value):
links = {}
if matches:
for submission in ApplicationSubmission.objects.filter(id__in=matches):
links[
rf"\#{submission.id}"
] = f'<a href="{submission.get_absolute_url()}">{submission.title} <span class="mid-grey-text">#{submission.id}</span></a>'
links[rf"\#{submission.id}"] = (
f'<a href="{submission.get_absolute_url()}">{submission.title} <span class="mid-grey-text">#{submission.id}</span></a>'
)

if links:
for sid, link in links.items():
Expand Down
6 changes: 3 additions & 3 deletions hypha/apply/funds/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def before_create_page(request, parent_page, page_class):
if issubclass(page_class, RoundBase) and request.POST:
if not hasattr(page_class, "parent_page"):
page_class.parent_page = {}
page_class.parent_page.setdefault(page_class, {})[
request.POST["title"]
] = parent_page
page_class.parent_page.setdefault(page_class, {})[request.POST["title"]] = (
parent_page
)
return page_class


Expand Down
18 changes: 9 additions & 9 deletions hypha/apply/projects/forms/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,15 +323,15 @@ def __init__(self, user=None, *args, **kwargs):
list(current_paf_reviewer_role.user_roles.all()), exact_match=True
)

self.fields[
slugify(current_paf_reviewer_role.label)
] = forms.ModelChoiceField(
queryset=users,
required=False,
blank=True,
label=current_paf_reviewer_role.label,
initial=paf_approval.user,
disabled=paf_approval.approved,
self.fields[slugify(current_paf_reviewer_role.label)] = (
forms.ModelChoiceField(
queryset=users,
required=False,
blank=True,
label=current_paf_reviewer_role.label,
initial=paf_approval.user,
disabled=paf_approval.approved,
)
)

def save(self, commit=True):
Expand Down
1 change: 1 addition & 0 deletions hypha/apply/projects/services/sageintacct/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Sage Intacct init
"""

from .exceptions import (
ExpiredTokenError,
InternalServerError,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Sage Intacct contract
"""

from .api_base import ApiBase


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Sage Intacct purchasing
"""

from .api_base import ApiBase


Expand Down
28 changes: 14 additions & 14 deletions hypha/apply/projects/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,13 +1234,13 @@ def get_context_data(self, **kwargs):
context["remaining_document_categories"] = DocumentCategory.objects.filter(
~Q(packet_files__project=self.object)
)
context[
"all_contract_document_categories"
] = ContractDocumentCategory.objects.all()
context[
"remaining_contract_document_categories"
] = ContractDocumentCategory.objects.filter(
~Q(contract_packet_files__project=self.object)
context["all_contract_document_categories"] = (
ContractDocumentCategory.objects.all()
)
context["remaining_contract_document_categories"] = (
ContractDocumentCategory.objects.filter(
~Q(contract_packet_files__project=self.object)
)
)

if (
Expand Down Expand Up @@ -1295,13 +1295,13 @@ def get_context_data(self, **kwargs):
context["current_status_index"] = [
status for status, _ in PROJECT_PUBLIC_STATUSES
].index(self.object.status)
context[
"all_contract_document_categories"
] = ContractDocumentCategory.objects.all()
context[
"remaining_contract_document_categories"
] = ContractDocumentCategory.objects.filter(
~Q(contract_packet_files__project=self.object)
context["all_contract_document_categories"] = (
ContractDocumentCategory.objects.all()
)
context["remaining_contract_document_categories"] = (
ContractDocumentCategory.objects.filter(
~Q(contract_packet_files__project=self.object)
)
)
return context

Expand Down
12 changes: 6 additions & 6 deletions hypha/apply/projects/views/vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ def get_form_initial(self, step):
}
iba_info = bank_info.iba_info
if iba_info:
initial_dict["other"][
"ib_account_routing_number"
] = iba_info.account_routing_number
initial_dict["other"]["ib_account_routing_number"] = (
iba_info.account_routing_number
)
initial_dict["other"]["ib_account_number"] = iba_info.account_number
initial_dict["other"][
"ib_account_currency"
] = iba_info.account_currency
initial_dict["other"]["ib_account_currency"] = (
iba_info.account_currency
)
initial_dict["other"]["ib_branch_address"] = iba_info.branch_address
return initial_dict.get(step, {})

Expand Down
6 changes: 3 additions & 3 deletions hypha/apply/stream_forms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def get_form_fields(self, draft=False, form_data=None, user=None):
if isinstance(block, MultiInputCharFieldBlock):
number_of_inputs = struct_value.get("number_of_inputs")
for index in range(number_of_inputs):
form_fields[
struct_child.id + "_" + str(index)
] = field_from_block
form_fields[struct_child.id + "_" + str(index)] = (
field_from_block
)
field_from_block.multi_input_id = struct_child.id
field_from_block.add_button_text = struct_value.get(
"add_button_text"
Expand Down
1 change: 1 addition & 0 deletions hypha/settings/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
access permissions exist to prevent access to the sub-directory of applicant
media.
"""

DEFAULT_FILE_STORAGE = "path.to.my.StorageClass"
PRIVATE_FILE_STORAGE = "path.to.my.PrivateStorageClass"
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ omit = [
]

# https://github.com/charliermarsh/ruff#ruff
[tool.ruff]
[tool.ruff.lint]
ignore = [
"E501", # line too long
"C901", # too complex
Expand All @@ -45,9 +45,9 @@ select = [
'W', # pycodestyle warnings
]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"hypha/settings/*.py" = ["F405"]
"*migrations/*.py" = ["I001"]

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["hypha", "addressfield"]
20 changes: 10 additions & 10 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
-r requirements.txt

coverage==7.3.2
coverage==7.4.4
django-browser-reload==1.12.1
django-coverage-plugin==3.1.0
django-debug-toolbar==4.2.0
django-debug-toolbar==4.3.0
django-dynamic-fixture==4.0.1
djhtml==3.0.6
dslr==0.4.0
factory_boy==3.2.1
Faker==19.13.0
model-bakery==1.10.1
pre-commit==3.5.0
model-bakery==1.17.0
pre-commit==3.6.2
pytest-cov==4.1.0
pytest-django==4.7.0
pytest-split==0.8.1
pytest-xdist[psutil]==3.3.1
responses==0.23.3
ruff==0.1.7
time-machine==2.13.0
pytest-django==4.8.0
pytest-split==0.8.2
pytest-xdist[psutil]==3.5.0
responses==0.25.0
ruff==0.3.3
time-machine==2.14.0
wagtail-factories==2.1.0
Werkzeug==3.0.1
66 changes: 33 additions & 33 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
# Monitor dependencies
scout-apm==2.26.1
sentry-sdk==1.16.0
scout-apm==3.1.0
sentry-sdk==1.42.0

# Production dependencies
Babel==2.13.1
boto3==1.28.82
celery==5.2.7
Babel==2.14.0
boto3==1.34.66
celery==5.3.6
click==8.1.7
dj-database-url==2.1.0
django-anymail==10.2
django-anymail==10.3
django-basic-auth-ip-whitelist==0.5
django-nh3==0.1.1
django-countries==7.5.1
django-elevate==2.0.3
django-extensions==3.2.3
django-file-form==3.4.3
django-filter==2.4.0
django-formtools==2.4.1
django-file-form==3.6.0
django-filter==23.5
django-formtools==2.5.1
django-fsm==2.8.1
django-heroku==0.3.1
django-hijack==3.4.2
django-htmx==1.17.0
django-hijack==3.4.5
django-htmx==1.17.3
django-pagedown==2.2.1
# django-pwned-passwords==4.1.0
https://github.com/slinkymanbyday/django-pwned-passwords/archive/58c7b832df7360a21fd8edeaaf9f897c7517baf1.zip
django-ratelimit==4.1.0
django-referrer-policy==1.0
django-select2==8.0.0
django-select2==8.1.2
django-slack==5.19.0
django-storages==1.13.2
django-tables2==2.5.1
django-tinymce==3.5.0
django-two-factor-auth==1.15.5
django-web-components==0.1.1
django-storages==1.14.2
django-tables2==2.7.0
django-tinymce==3.7.1
django-two-factor-auth==1.16.0
django-web-components==0.2.0
django==4.2.11
djangorestframework-api-key==2.3.0
djangorestframework==3.14.0
drf-nested-routers==0.93.4
drf-yasg==1.21.4
environs==9.5.0
djangorestframework-api-key==3.0.0
djangorestframework==3.15.0
drf-nested-routers==0.93.5
drf-yasg==1.21.7
environs==11.0.0
gunicorn==21.2.0
heroicons==2.6.0
python-docx<1.0.0
python-docx==1.1.0
htmldocx==0.0.6
lark==1.1.8
mistune==3.0.1
more-itertools==10.1.0
phonenumberslite==8.13.26
Pillow>=10.0.1
psycopg[binary]==3.1.14
lark==1.1.9
mistune==3.0.2
more-itertools==10.2.0
phonenumberslite==8.13.32
Pillow==10.2.0
psycopg[binary]==3.1.18
qrcode==7.4.2
reportlab==3.6.13
social_auth_app_django==5.0.0
reportlab==4.0.9
social_auth_app_django==5.4.0
tablib==3.5.0
tomd==0.1.3
wagtail-cache==2.3.0
wagtail-cache==2.4.0
wagtail-purge==0.3.0
wagtail==5.1.3
whitenoise==6.6.0
xhtml2pdf==0.2.11
xhtml2pdf==0.2.15
xmltodict==0.13.0

0 comments on commit 3b2e1de

Please sign in to comment.