[PATCH 04/10] models: Add 'status' model

Finucane, Stephen stephen.finucane at intel.com
Wed Jul 29 23:33:16 AEST 2015


> 2015-07-29 09:58, Finucane, Stephen:
> > > 2015-07-29 09:58, Stephen Finucane:
> > > > +class Status(models.Model):
> > > > +    """Status for a patch.
> > > > +
> > > > +    Statuses define a state for patches. This is useful, for
> example,
> > > > +    when using a continuous integration (CI) system to test patches.
> > > > +    """
> > >
> > > There is already "class State" associated to "class Patch".
> > > Don't you think TestStatus would be a better name?
> >
> > I've discussed this with a few folks already. The 'Status.state' naming
> is inconvenient,
> 
> Having State and Status is confusing.

What about getting rid of State? :) I haven't found any public patchwork project that modifies the default list of states, so I think a static "choices" field on 'Patch' would be a better option. I actually have a waffle.io "ticket" for myself and some work done to do this:

	https://github.com/stephenfin/patchwork/tree/draft/model-cleanup

More immediately though, I'm fine with renaming this. Would "Service" be a suitable compromise or are you rigid on "TestStatus"? I really don't like the double-barrel name tbh heh.

I won't do any of this until I get a little more feedback on the feature though, to make sure it's worth my time.

> > but I can't think of a better word to represent this.
> > As for the whole model, I think we shouldn't necessarily restrict this
> > to test results: you could have a license check job, for example.
> 
> I think a license check is a test.
> The values for Status are Success/Warning/Failure. They are results of a
> test.
> 
> > I did consider renaming the model 'services' (this is the terminology the
> > rather sweet 'review.ninja' app uses) but I think 'status' is still
> > perfectly suitable TBH. Thoughts?



More information about the Patchwork mailing list