You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These filters are identical to the daily filters and the monthly filters. If they need to be defined on an app basis, I would suggest to:
Create utilities/filters.py and put all this filters within JournalFilter and JournalFilterDepth classes.
In this file and the corresponding ones in the daily and monthly apps, subclass them:
fromutilities.filtersimportJournalFilter, JournalFilterDepthclassHourlyFilter(JournalFilter):
""" Filter class for hourlys that are not Polar Wind, Discharge Curve, or Level Function and that have no depth information. """classHourlyFilterDepth(JournalFilterDepth):
""" Filter class for hourlys that are not Polar Wind, Discharge Curve, or Level Function and that have depth information. """
However, if they do not need to be defined on an app basis, just skip step 2 altogether and directly import the JournalFilter and JournalFilterDepth where relevant. The more code we write, the harder it is to maintain, so let's keep it to a minimum.
utilities/filters.py
and put all this filters withinJournalFilter
andJournalFilterDepth
classes.However, if they do not need to be defined on an app basis, just skip step 2 altogether and directly import the
JournalFilter
andJournalFilterDepth
where relevant. The more code we write, the harder it is to maintain, so let's keep it to a minimum.Originally posted by @dalonsoa in #103 (comment)
The text was updated successfully, but these errors were encountered: