Resolve "Create match failures as data checks" #197

Merged
hansegucker merged 16 commits from 41-create-match-failures-as-data-checks into master 2022-03-31 21:14:09 +02:00
Owner

Closes #41

Closes #41
Author
Owner

assigned to @hansegucker

assigned to @hansegucker
Author
Owner

added 1 commit

  • 77054aa0 - Introduce option for configuring the creating of course groups

Compare with previous version

added 1 commit <ul><li>77054aa0 - Introduce option for configuring the creating of course groups</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=17981&start_sha=15d4152441d3dc0f170834f4149c193e42aa8900)
Author
Owner

added 1 commit

  • 23cb5092 - Introduce option for configuring the creating of course groups

Compare with previous version

added 1 commit <ul><li>23cb5092 - Introduce option for configuring the creating of course groups</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=17985&start_sha=77054aa081373e3e250cf8a5476d2e97e708ce6b)
Author
Owner

added 3 commits

  • 23cb5092...7519ac31 - 2 commits from branch master
  • 54aa0bf6 - Merge branch 'master' into 41-create-match-failures-as-data-checks

Compare with previous version

added 3 commits <ul><li>23cb5092...7519ac31 - 2 commits from branch <code>master</code></li><li>54aa0bf6 - Merge branch &#39;master&#39; into 41-create-match-failures-as-data-checks</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=17997&start_sha=23cb50927e9292eb1afb8547a0664d9145716242)
Author
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>d12186a1 - Fix wrong import</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18001&start_sha=54aa0bf6421a876f1339045cb76e2aaad37fd29a)
Author
Owner

added 1 commit

  • c64ac004 - Fix preference name

Compare with previous version

added 1 commit <ul><li>c64ac004 - Fix preference name</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18004&start_sha=d12186a1276c4b2d0f54d18a95c50eb0d4be6950)
Author
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>c4220f31 - Fix preference name</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18006&start_sha=c64ac0047de1ad3559be721fc72f07c6d6972652)
Author
Owner

added 1 commit

  • 240db7e2 - Fix is_untis_primary_source helper method

Compare with previous version

added 1 commit <ul><li>240db7e2 - Fix is_untis_primary_source helper method</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18011&start_sha=c4220f311bf7c6355c4822ff165fcfd8a54bdaa6)
Author
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>27b2390f - Fix preference name</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18015&start_sha=240db7e2c24d5c2f2aa348fbf890d1eecc0cd531)
Author
Owner

added 1 commit

  • c5938c38 - Add missing preference registration

Compare with previous version

added 1 commit <ul><li>c5938c38 - Add missing preference registration</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18017&start_sha=27b2390fd795d6009293e847fbef349be72832f5)
Owner

The import does not create new groups, but there are also no data check results.

The import does not create new groups, but there are also no data check results.
Owner

Don't forget to document the preference in the manual.

Don't forget to document the preference in the manual.
Author
Owner

added 1 commit

  • 893420bc - Limit match configuration and data check result creation to course groups

Compare with previous version

added 1 commit <ul><li>893420bc - Limit match configuration and data check result creation to course groups</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18038&start_sha=c5938c3873c8b45ff7afa15eafa2dc7df58f4a33)
Author
Owner

added 1 commit

  • 8f1d864e - [Docs] Update information on usage for preferences

Compare with previous version

added 1 commit <ul><li>8f1d864e - [Docs] Update information on usage for preferences</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18062&start_sha=893420bc5b5f01a1f0ee3beb5d3907b660cb106e)
Author
Owner

Done.

Done.
Author
Owner

resolved all threads

resolved all threads
Author
Owner

Please test again with current changes.

Please test again with current changes.
Owner

added 11 commits

  • 8f1d864e...97f3c2da - 10 commits from branch master
  • 0c5c088d - Merge branch 'master' into 41-create-match-failures-as-data-checks

Compare with previous version

added 11 commits <ul><li>8f1d864e...97f3c2da - 10 commits from branch <code>master</code></li><li>0c5c088d - Merge branch &#39;master&#39; into 41-create-match-failures-as-data-checks</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18198&start_sha=8f1d864e362388f88fbd1ba73cb4cce50b37905e)
Owner
    s = str(s)
  File "/usr/local/lib/python3.9/dist-packages/aleksis/core/models.py", line 1131, in __str__
    return f"{self.related_object}: {self.related_check.problem_name}"
  File "/usr/local/lib/python3.9/dist-packages/aleksis/core/models.py", line 1125, in related_check
    return DataCheckRegistry.data_checks_by_name[self.check]
KeyError: 'untis_not_created_not_primary_source'

@hansegucker

```plain s = str(s) File "/usr/local/lib/python3.9/dist-packages/aleksis/core/models.py", line 1131, in __str__ return f"{self.related_object}: {self.related_check.problem_name}" File "/usr/local/lib/python3.9/dist-packages/aleksis/core/models.py", line 1125, in related_check return DataCheckRegistry.data_checks_by_name[self.check] KeyError: 'untis_not_created_not_primary_source' ``` @hansegucker
Author
Owner

added 3 commits

  • 0c5c088d...5ce243b5 - 2 commits from branch master
  • 56c7e46e - Merge branch 'master' into 41-create-match-failures-as-data-checks

Compare with previous version

added 3 commits <ul><li>0c5c088d...5ce243b5 - 2 commits from branch <code>master</code></li><li>56c7e46e - Merge branch &#39;master&#39; into 41-create-match-failures-as-data-checks</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18202&start_sha=0c5c088d82caa0af65b3066ecbb9173388803e8d)
Author
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>c917e415 - Register data checks</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=18205&start_sha=56c7e46e7e2df15a63c7077c59d8c625fcc45a45)
Owner
    Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/sentry_sdk/integrations/celery.py", line 200, in _inner
    reraise(*exc_info)
  File "/usr/local/lib/python3.9/dist-packages/sentry_sdk/_compat.py", line 54, in reraise
    raise value
  File "/usr/local/lib/python3.9/dist-packages/sentry_sdk/integrations/celery.py", line 195, in _inner
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/tasks.py", line 11, in _task
    import_command.run(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/commands.py", line 38, in run
    _untis_import_mysql(cls.get_terms(), version=version)
  File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/util/mysql/main.py", line 60, in untis_import_mysql
    import_lessons(
  File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/util/mysql/importers/lessons.py", line 248, in import_lessons
    CourseGroupNotFoundAndNotCreated.register_result(lesson)
  File "/usr/local/lib/python3.9/dist-packages/aleksis/core/data_checks.py", line 201, in register_result
    result, __ = DataCheckResult.objects.get_or_create(
  File "/usr/local/lib/python3.9/dist-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/django/db/models/query.py", line 581, in get_or_create
    return self.get(**kwargs), False
  File "/usr/local/lib/python3.9/dist-packages/django/db/models/query.py", line 439, in get
    raise self.model.MultipleObjectsReturned(
aleksis.core.models.DataCheckResult.MultipleObjectsReturned: get() returned more than one DataCheckResult -- it returned 2!

``` Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/celery/app/trace.py", line 451, in trace_task R = retval = fun(*args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/sentry_sdk/integrations/celery.py", line 200, in _inner reraise(*exc_info) File "/usr/local/lib/python3.9/dist-packages/sentry_sdk/_compat.py", line 54, in reraise raise value File "/usr/local/lib/python3.9/dist-packages/sentry_sdk/integrations/celery.py", line 195, in _inner return f(*args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/celery/app/trace.py", line 734, in __protected_call__ return self.run(*args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/tasks.py", line 11, in _task import_command.run(*args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/commands.py", line 38, in run _untis_import_mysql(cls.get_terms(), version=version) File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/util/mysql/main.py", line 60, in untis_import_mysql import_lessons( File "/usr/local/lib/python3.9/dist-packages/aleksis/apps/untis/util/mysql/importers/lessons.py", line 248, in import_lessons CourseGroupNotFoundAndNotCreated.register_result(lesson) File "/usr/local/lib/python3.9/dist-packages/aleksis/core/data_checks.py", line 201, in register_result result, __ = DataCheckResult.objects.get_or_create( File "/usr/local/lib/python3.9/dist-packages/django/db/models/manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/usr/local/lib/python3.9/dist-packages/django/db/models/query.py", line 581, in get_or_create return self.get(**kwargs), False File "/usr/local/lib/python3.9/dist-packages/django/db/models/query.py", line 439, in get raise self.model.MultipleObjectsReturned( aleksis.core.models.DataCheckResult.MultipleObjectsReturned: get() returned more than one DataCheckResult -- it returned 2! ```
Author
Owner

added 20 commits

  • c917e415...40a2a7b8 - 18 commits from branch master
  • 2f4d6f55 - Merge branch 'master' into 41-create-match-failures-as-data-checks
  • 3e4c0f97 - Don't run delete logic on manual created data checks

Compare with previous version

added 20 commits <ul><li>c917e415...40a2a7b8 - 18 commits from branch <code>master</code></li><li>2f4d6f55 - Merge branch &#39;master&#39; into 41-create-match-failures-as-data-checks</li><li>3e4c0f97 - Don&#39;t run delete logic on manual created data checks</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=19875&start_sha=c917e415a89550a4ceeb7cd0f1c5db9f4953fdb6)
Author
Owner

resolved all threads

resolved all threads
Author
Owner

added 5 commits

  • 3e4c0f97...c57a5129 - 4 commits from branch master
  • a0cb5fd9 - Merge branch 'master' into 41-create-match-failures-as-data-checks

Compare with previous version

added 5 commits <ul><li>3e4c0f97...c57a5129 - 4 commits from branch <code>master</code></li><li>a0cb5fd9 - Merge branch &#39;master&#39; into 41-create-match-failures-as-data-checks</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=20177&start_sha=3e4c0f97846748f42002fdf60daf8cf50e6a7dcf)
Author
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>39363a96 - Update changelog</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Untis/-/merge_requests/120/diffs?diff_id=20178&start_sha=a0cb5fd9f766271a2f9dfe70e630e77f3b5b17d5)
Author
Owner

marked this merge request as ready

marked this merge request as **ready**
Author
Owner

mentioned in commit 0de901045f

mentioned in commit 0de901045f7cce067ea1a688669040f51209ca39
Author
Owner

added 10m of time spent

added 10m of time spent
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
aleksis/AlekSIS-App-Untis!197
No description provided.