Stephen Finucane <step...@that.guru> writes: > On 2016-10-26 08:54, Andrew Donnellan wrote: >> On 16/10/16 23:50, Stephen Finucane wrote: >>> Add a series revision model. This model is expected to act like a >>> collection for patches, similar to bundles but thread-orientated. >>> >>> Signed-off-by: Stephen Finucane <step...@that.guru> >> >> Looking pretty good! A few minor things below. I mostly won't repeat >> stuff that Daniel pointed out. >> >> Otherwise, with Daniel's comments fixed: >> >> Reviewed-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com> > > [snip] > >>> @property >>> + def series(self): >>> + """Get a simple series reference. >>> + >>> + Return the last series revision that (ordered by date) that >>> + this submission is a member of. >>> + >>> + .. warning:: >>> + Be judicious in your use of this. For example, do not use >>> it >>> + in list templates as doing so will result in a new query >>> for >>> + each item in the list. >>> + """ >>> + # NOTE(stephenfin): We don't use 'latest()' here, as this can >>> raise an >>> + # exception if no series revisions exist >>> + return self.series_revisions.order_by('-date').first() >>> + >> >> When versioning gets added later on, are you planning on calling the >> series group model "Series" as per v2? (FWIW after thinking about it >> for a bit I think I like the v1 naming better than the v2 naming, but >> I digress...) > > I'd prefer the 'Series' and 'SeriesGroup' names also, given how we're > doing versioning. Daniel - any thoughts on going back to that naming?
I have no strong feelings. I think that, like the Oxford comma, both come with situations where they are good and situations where they are going to be confusing. Your call :) Regards, Daniel > >> If so, calling this method "series()" and having it return a >> SeriesRevision is a bit confusing. > > Good call - I'll go with 'latest_series' if I rename SeriesRevision -> > Series, else 'latest_series_revision'. > > Stephen _______________________________________________ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork