From 11a4092740016b5eaea67ef11618f4934ffbed1b Mon Sep 17 00:00:00 2001 From: csae8092 Date: Mon, 9 Sep 2024 11:41:15 +0200 Subject: [PATCH 1/3] fixes wrong death dates in person place realtions [skip ci] --- ...ue__206_fix_wrong_deathrelationdates.ipynb | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 notebooks/issue__206_fix_wrong_deathrelationdates.ipynb diff --git a/notebooks/issue__206_fix_wrong_deathrelationdates.ipynb b/notebooks/issue__206_fix_wrong_deathrelationdates.ipynb new file mode 100644 index 0000000..46f9a82 --- /dev/null +++ b/notebooks/issue__206_fix_wrong_deathrelationdates.ipynb @@ -0,0 +1,113 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "7a5ef163", + "metadata": {}, + "outputs": [], + "source": [ + "from tqdm import tqdm" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "219eac44", + "metadata": {}, + "outputs": [], + "source": [ + "col = Collection.objects.filter(name__icontains=\"neue fackel\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "5ede149f", + "metadata": {}, + "outputs": [], + "source": [ + "fackel_persons = Person.objects.filter(collection__in=col)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e9f97bf6", + "metadata": {}, + "outputs": [], + "source": [ + "for x in tqdm(fackel_persons, total=fackel_persons.count()):\n", + " birth = PersonPlace.objects.filter(related_person=x).filter(relation_type__name=\"geboren in\").first()\n", + " death = PersonPlace.objects.filter(related_person=x).filter(relation_type__name=\"gestorben in\").first()\n", + " if birth and death:\n", + " if death.start_date_written:\n", + " birth_rel_date = birth.start_date_written\n", + " death_rel_date = death.start_date_written\n", + " if birth_rel_date == death_rel_date:\n", + " death.start_date_written = x.end_date_written\n", + " death.save()\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "14f9254b", + "metadata": {}, + "outputs": [], + "source": [ + "x.start_date_written" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3782da04", + "metadata": {}, + "outputs": [], + "source": [ + "PersonPerson.objects.all().count()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a812cae8", + "metadata": {}, + "outputs": [], + "source": [ + "dir(PersonPerson)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3a5fb626", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Django Shell-Plus", + "language": "python", + "name": "django_extensions" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 1f8f3cb121185f72a37abc4f24e509d75079756a Mon Sep 17 00:00:00 2001 From: csae8092 Date: Mon, 9 Sep 2024 11:44:14 +0200 Subject: [PATCH 2/3] bigger gh-icon plus better accessibility [skip ci] --- templates/partials/footer.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/partials/footer.html b/templates/partials/footer.html index d1e322c..7c4fe0b 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -46,7 +46,8 @@
Lizenz der Inhalte: - + + GitHub repo From a31e1bb9102c383a7f9ace1ad992b1ac4fa238c0 Mon Sep 17 00:00:00 2001 From: Peter Andorfer Date: Mon, 9 Sep 2024 11:49:30 +0200 Subject: [PATCH 3/3] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f3fc24..219e887 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: POSTGRES_DB: github_actions services: postgres: - image: postgres:13 + image: postgres:16 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres @@ -45,4 +45,4 @@ jobs: with: token: ${{secrets.CODECOV_TOKEN}} file: ./coverage.xml - fail_ci_if_error: false \ No newline at end of file + fail_ci_if_error: false