castellum merge requestshttps://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests2020-03-18T09:51:02Zhttps://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1245rm CASTELLUM_DOMAINS from settings2020-03-18T09:51:02ZBengfortrm CASTELLUM_DOMAINS from settingsFollowup for !1206Followup for !1206https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1270apply filter queries to Subject instead of AttributeSet2020-10-26T16:37:22ZBengfortapply filter queries to Subject instead of AttributeSetSplit from !1255
An interesting side-effect of this change is that subjects who do not have an attributeset can still be recruited (if no subjectfilters are set for the study). We were never really transparent about the (non-)existanc...Split from !1255
An interesting side-effect of this change is that subjects who do not have an attributeset can still be recruited (if no subjectfilters are set for the study). We were never really transparent about the (non-)existance of an attributeset, so I think this is fine -- maybe even less confusing.https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/12661515 split subject tab2020-04-21T12:10:32ZBengfort1515 split subject tabThis splits the subject update view into two separate views: One for information related to data protection and another one with "additional info".This splits the subject update view into two separate views: One for information related to data protection and another one with "additional info".https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1444Refactor: Rename ParticipationRequest to Participation2020-07-08T14:13:26ZBengfortRefactor: Rename ParticipationRequest to ParticipationParticipations were initially added in !82 and renamed to `ParticipationRequest` in !170. The idea was that we would distinguish between a *request for participation* (recruitment) and the actual *participation* itself (execution). We en...Participations were initially added in !82 and renamed to `ParticipationRequest` in !170. The idea was that we would distinguish between a *request for participation* (recruitment) and the actual *participation* itself (execution). We ended up using the same model for both, so the name change turned out to be for nothing.
This looks scary because it touches a lot of files, but it is actually not that complicated. Django's `RenameModel` migration operation takes care of all permissions and references.https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1422856 vanilla js2021-01-12T12:34:06ZBengfort856 vanilla jsSee also !526
Recently the [first alpha for bootstrap 5](https://blog.getbootstrap.com/2020/06/16/bootstrap-5-alpha/) has been released. One of the most important changes is that they have removed the dependency on jquery. I took that a...See also !526
Recently the [first alpha for bootstrap 5](https://blog.getbootstrap.com/2020/06/16/bootstrap-5-alpha/) has been released. One of the most important changes is that they have removed the dependency on jquery. I took that as an opportunity to remove the dependency in our javascript as well. I also used http://youmightnotneedjquery.com/ as a reference.
This *does* port our code from jquery to vanilla DOM. However, we still depend on jquery because it is a dependency for bootstrap 4 as well as bootstrap-datepicker. So this is only a first step.
Most jquery functions have an equivalent in vanilla javascript. Still, the syntax is different so nearly every line that deals with elements needs to be changed. I somewhat tried to structure the edit history but had to give up at some point because the necessary changes are just too entagled. (Sorry!)
Jquery's event handeling is one of the few areas for which there are still no equivalent functions in vanilla DOM, so I created some helpers under the `$$` namespace.
I used some more recent JS/DOM features:
- [`closest()`](https://caniuse.com/#feat=element-closest)
- [arrow functions](https://caniuse.com/#feat=arrow-functions)
- [`forEach()` on NodeLists](https://caniuse.com/#feat=mdn-api_nodelist_foreach)
All of these are supported in modern browsers, but not in IE, which is [basically EOL](https://en.wikipedia.org/wiki/Internet_Explorer#End_of_life) at this point. (bootstrap 5 will also drop support for IE).https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/2274improve anonymous invitations2022-03-22T08:49:11ZBengfortimprove anonymous invitationsfixes #154fixes #154https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/2343rm user docs on geofilters2022-06-27T15:18:50ZBengfortrm user docs on geofilterssee https://git.mpib-berlin.mpg.de/castellum/documentation/-/merge_requests/112see https://git.mpib-berlin.mpg.de/castellum/documentation/-/merge_requests/112https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/2333Draft: JOSS Paper2022-11-21T16:49:15ZTimoDraft: JOSS PaperThis adds a joss paper section in docs for a submission to [JOSS](https://joss.theoj.org/). This MR is only used for a transparent review process and **must not** be merged into ```main```. Paper style taken from <https://joss.readthedoc...This adds a joss paper section in docs for a submission to [JOSS](https://joss.theoj.org/). This MR is only used for a transparent review process and **must not** be merged into ```main```. Paper style taken from <https://joss.readthedocs.io/en/latest/submitting.html#example-paper-and-bibliography>.https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/2288Rename "domain" to "coding list"2024-03-20T15:28:34ZBengfortRename "domain" to "coding list"Even though we ourselves have gotten used to it, the term "pseudonym domain" has often caused confusion outside of the castellum team. Only recently we realized that this is basically a synonym for "coding list". So it seems appropriate ...Even though we ourselves have gotten used to it, the term "pseudonym domain" has often caused confusion outside of the castellum team. Only recently we realized that this is basically a synonym for "coding list". So it seems appropriate to change our wording.
This is quite a big change, including some breaking API changes:
- `CASTELLUM_STUDY_DOMAIN_BITS` and `CASTELLUM_SESSION_DOMAIN_BITS` have been renamed to `CASTELLUM_STUDY_PSEUDONYM_BITS` /
`CASTELLUM_SESSION_PSEUDONYM_BITS`
- `/domains/` in API URLs was replaced by `/coding-lists/` (e.g. `/execution/api/studies/5/coding-lists/6f7e93b8-4ddd-4438-9140-4628043e83fc/`)
- The response object for `/execution/api/studies/5/coding-lists/` has the format `{"coding_lists": […]}` instead of `{"domains": […]}`https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/2080add execution resource feed2021-10-25T14:03:28ZBengfortadd execution resource feedThere is currently no permission check. So this is blocked until we have a solution for lab managers.There is currently no permission check. So this is blocked until we have a solution for lab managers.https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/2021Draft: New availability2021-09-14T14:09:26ZBengfortDraft: New availabilityFix #141
![2021-09-01_18-51-54](/uploads/45f03917be3a95e392a670f291fc62d8/2021-09-01_18-51-54.png)Fix #141
![2021-09-01_18-51-54](/uploads/45f03917be3a95e392a670f291fc62d8/2021-09-01_18-51-54.png)https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1977remove diacritics before phonetic encoding2021-08-10T15:42:27ZBengfortremove diacritics before phonetic encodingotherwise characters with diacritics are ignored
backport of https://github.com/provinzkraut/cologne_phonetics/pull/2otherwise characters with diacritics are ignored
backport of https://github.com/provinzkraut/cologne_phonetics/pull/2https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1953rm exclusion_criteria_checked2021-07-26T12:30:30ZBengfortrm exclusion_criteria_checkedSee #108
This field was meant to covere two aspects:
1. Remind users to check exclusion criteria.
2. Document that exclusion criteria have already been checked in an
earlier call/mail.
(1) is not really that relevant because rec...See #108
This field was meant to covere two aspects:
1. Remind users to check exclusion criteria.
2. Document that exclusion criteria have already been checked in an
earlier call/mail.
(1) is not really that relevant because recruiters usually know the
criteria by heart after a few calls. It is nice to have the text
available, but it is usually not necessary for each participant.
(2) also has limited utility. For phone recruitment, everything is
usually checked in a single call. For mail recruitment there are usually
more than one mail, but those have a relatively clear structure.https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1884bootstrap 52021-12-15T14:00:32ZBengfortbootstrap 5Bootstrap 5 was finally [released last week](https://blog.getbootstrap.com/2021/05/05/bootstrap-5/) so I updated !1719. Unfortunately this is still not ready.
- [django-bootstrap5](https://django-bootstrap5.readthedocs.io/en/latest/migr...Bootstrap 5 was finally [released last week](https://blog.getbootstrap.com/2021/05/05/bootstrap-5/) so I updated !1719. Unfortunately this is still not ready.
- [django-bootstrap5](https://django-bootstrap5.readthedocs.io/en/latest/migrate.html) still has some issues, notably [django-bootstrap5#102](https://github.com/zostera/django-bootstrap5/issues/102)
- [fullcalendar](https://github.com/fullcalendar/fullcalendar/issues/6299) does not yet have support
- select2 just looks like bootstrap but does not rely on their code, so no issues here
We will also not be able to remove jquery because select2 depends on it.https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1714Test Django 3.22021-04-06T16:51:03ZBengfortTest Django 3.2See https://docs.djangoproject.com/en/dev/releases/3.2/
Relevant changes:
- `default_app_config` has been deprecated
- New setting `DEFAULT_AUTO_FIELD`. I set it to `django.db.models.AutoField` for backwards compatible but new projects...See https://docs.djangoproject.com/en/dev/releases/3.2/
Relevant changes:
- `default_app_config` has been deprecated
- New setting `DEFAULT_AUTO_FIELD`. I set it to `django.db.models.AutoField` for backwards compatible but new projects will use [`django.db.models.BigAutoField`](https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.BigAutoField). We could also migrate to that if we want.
- New function `Queryset.alias()` that can replace `annotate()` if you only use the annotation for filtering/sorting.
- The new database function [`Random()`](https://docs.djangoproject.com/en/dev/ref/models/database-functions/#django.db.models.functions.Random) might be useful to improve the performance of randomly picking subjects from the database. Not sure though.
A nice aside: No new deprecation warnings for dependencies. However, the last round of deprecation warnings still exists for [django-parler](https://github.com/django-parler/django-parler/pull/279).https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1683show one available contact method in subject search2021-01-11T14:42:18ZBengfortshow one available contact method in subject searchFor context: This information is only shown to users who have the relevant privacy level and who have any of the following:
- the `view_subject` permission
- the `search_participation` permission and the subject is invited to a study th...For context: This information is only shown to users who have the relevant privacy level and who have any of the following:
- the `view_subject` permission
- the `search_participation` permission and the subject is invited to a study that is in execution status
- recruiters in a study in which the subject has a participation
- conductors in a study in which the subject is invitedhttps://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1649rm subject notes 22020-12-08T15:51:22ZBengfortrm subject notes 2!1618 reased onto !1646!1618 reased onto !1646https://git.mpib-berlin.mpg.de/castellum/castellum/-/merge_requests/1255Refactor: merge AttributeSet into Subject2020-10-26T16:04:49ZBengfortRefactor: merge AttributeSet into SubjectThe `AttributeSet` model only contains a single field (at least it did until !1054) and has a one-to-one relation to `Subject`. It seems obvious that the two models could be merged. So I tried that.
My conclusion is that this is a lot o...The `AttributeSet` model only contains a single field (at least it did until !1054) and has a one-to-one relation to `Subject`. It seems obvious that the two models could be merged. So I tried that.
My conclusion is that this is a lot of work for little benefit. There is no significant reduction in code or complexity.
An important aspect is that the `AttributeSet` model contains more than just the fields:
- It has its own permissions
- It has special code for the GDPR export view (related to #53)
- It contains attribute related functionality: `get_completeness()` and `get_statistics_bucket()`
Merging all that into `Subject` would not really improve anything. So in the spirit of [composition](https://en.wikipedia.org/wiki/Composition_over_inheritance) I would not merge this for now.
It might be an option to pick only 43bc016f0df2dc500ae9c61ab9a4976139364156 though. It doesn't do much, but at least it gets rid of the `prefix` hack from !1135.