Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/dependencies #346

Merged
merged 4 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ jobs:
- name: Output Coverage
run: coverage report && coverage xml
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v3 # https://github.com/codecov/codecov-action
uses: codecov/codecov-action@v4 # https://github.com/codecov/codecov-action
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage/coverage.xml
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

A re-introduction of the web application for ESRG Knights of the Kitchen Table using Django 3.2.

![Testrun workflow](https://github.com/esrg-knights/Squire/actions/workflows/run_tests.yml/badge.svg)
[![codecov](https://codecov.io/gh/esrg-knights/Squire/graph/badge.svg?token=BRTHryxW4X)](https://codecov.io/gh/esrg-knights/Squire)
![Django Version](https://img.shields.io/badge/django%20versions-3.2-blue)
![Python Version](https://img.shields.io/badge/python-3.8-blue)
![License](https://img.shields.io/github/license/esrg-knights/Squire)

## Getting started with development

1. Install the latest version of Python 3. If you are on Windows, you can download Python from [python.org]. If you are not, check if you already have a recent version by running `python3 --version`. As of writing, Python 3.8 or higher is recent enough, but this may change in the future.
Expand Down
13 changes: 3 additions & 10 deletions activity_calendar/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
import activity_calendar.util as util


# Monkey-patch; Why is this not open for extension in the first place?
feedgenerator.ITEM_EVENT_FIELD_MAP = (
*(feedgenerator.ITEM_EVENT_FIELD_MAP),
("recurrenceid", "recurrence-id"),
)


def only_for(class_type, default=None):
def only_for_decorator(func):
def func_wrapper(self, item):
Expand Down Expand Up @@ -259,7 +252,7 @@ def item_exdate(self, item):

# RECURRENCE-ID
@only_for(ActivityMoment)
def item_recurrenceid(self, item):
def item_recurrence_id(self, item):
if item.is_part_of_recurrence:
return item.recurrence_id.astimezone(timezone.get_current_timezone())
return None
Expand All @@ -276,9 +269,9 @@ def feed_extra_kwargs(self, obj):
def item_extra_kwargs(self, item):
kwargs = super().item_extra_kwargs(item)

val = self._get_dynamic_attr("item_recurrenceid", item)
val = self._get_dynamic_attr("item_recurrence_id", item)
if val:
kwargs["recurrenceid"] = val
kwargs["recurrence_id"] = val
return kwargs


Expand Down
3 changes: 2 additions & 1 deletion membership_file/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from decimal import Decimal
from django.conf import settings
from django.core.validators import RegexValidator, MinValueValidator
from django.db import models
Expand Down Expand Up @@ -113,7 +114,7 @@ class Meta:

# External cards require a deposit, which has changed over the years
external_card_deposit = models.DecimalField(
validators=[MinValueValidator(0)],
validators=[MinValueValidator(Decimal(0))],
max_digits=5,
decimal_places=2,
null=True,
Expand Down
5 changes: 2 additions & 3 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@

-r prod.txt

codecov~=2.1.12 # CodeCov Integration
coverage~=6.4.4 # Code Coverage
django-test-migrations==1.2.0 # Testing migrations
coverage~=7.5.3 # Code Coverage
django-test-migrations~=1.3.0 # Testing migrations
24 changes: 12 additions & 12 deletions requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
# These are libraries that are needed for any environment

# Import the common-dependencies
Django~=3.2.15
Django~=3.2.23
django-bootstrap4~=22.2
django-cleanup~=6.0.0 # Removes old FileField files upon saving
djangorestframework~=3.12.4 # TODO: Deprecate
Pillow~=9.2.0 # ImageField support
django-ical~=1.8.3 # iCalendar export
django-cleanup~=8.1.0 # Removes old FileField files upon saving
djangorestframework~=3.15.1 # TODO: Deprecate
Pillow~=10.3.0 # ImageField support
django-ical~=1.9.2 # iCalendar export
django-recurrence~=1.11.1 # Recurring Dates
django-import-export~=2.8.0 # Import/Export models
django-dynamic-preferences~=1.14.0 # Global Preferences / User Preferences
django-object-actions~=4.1.0 # Dynamic admin panel actions
martor~=1.6.14, <=1.6.26; # Markdown Editor
pymdown-extensions~=9.5 # Extra markdown features
django-pwa~=1.0.10 # Progressive Webapp
requests~=2.28.1 # Requests (needed for Mailcow API)
django-import-export~=2.9.0 # Import/Export models
django-dynamic-preferences~=1.16.0 # Global Preferences / User Preferences
django-object-actions~=4.2.0 # Dynamic admin panel actions
martor==1.6.14, <=1.6.26; # Markdown Editor
pymdown-extensions~=9.11 # Extra markdown features
django-pwa~=1.1.0 # Progressive Webapp
requests~=2.32.3 # Requests (needed for Mailcow API)
django-tempus-dominus~=5.1.2.17 # DateTimePicker
easywebdav~=1.2.0 # For Nextcloud
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
# Import the dev-dependencies
coverage~=6.4.4 # Code Coverage
django-debug-toolbar~=3.6.0 # Debug Panel
django-test-migrations==1.2.0 # Testing migrations
django-test-migrations~=1.3.0 # Testing migrations
black # Linting
aiosmtpd # Email debugging
4 changes: 2 additions & 2 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
-r common.txt

# Import the prod-dependencies
gunicorn~=20.1.0
sentry-sdk~=1.9.8
gunicorn~=22.0.0
sentry-sdk~=2.3.1
Loading