Skip to content

Commit

Permalink
[staged-updates] quick helper functions on summary statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
biblicabeebli committed Jan 19, 2024
1 parent 1118dd7 commit ef61c20
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions database/forest_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,3 +345,23 @@ class Meta:
constraints = [
models.UniqueConstraint(fields=['date', 'participant'], name="unique_summary_statistic")
]

@classmethod
def beiwe_fields(cls):
return [field.name for field in cls._meta.get_fields() if field.name.startswith("beiwe_")]

@classmethod
def jasmine_fields(cls):
return [field.name for field in cls._meta.get_fields() if field.name.startswith("jasmine_")]

@classmethod
def willow_fields(cls):
return [field.name for field in cls._meta.get_fields() if field.name.startswith("willow_")]

@classmethod
def sycamore_fields(cls):
return [field.name for field in cls._meta.get_fields() if field.name.startswith("sycamore_")]

@classmethod
def oak_fields(cls):
return [field.name for field in cls._meta.get_fields() if field.name.startswith("oak_")]

0 comments on commit ef61c20

Please sign in to comment.