[Mailman-Developers] [GSoC 2014] Mailman CLI Project

Abhilash Raj raj.abhilash1 at gmail.com
Fri May 30 15:39:23 CEST 2014


On Fri, 30 May 2014 18:12:18 +0530
Rajeev S <rajeevs1992 at gmail.com> wrote:

> I agree that an override for the confirmation message is necessary so that
> the CLI
> commands can be used in scripts and I would like to follow Barry's
> suggestion of using
> a `--yes` or `--force` switch. (Isn't --force more common than --yes, as in
> `rm -f` ?)

No, as I think, `--yes` and `--force` or `-f` have different use cases.
For conformations `--yes` is used most of the times, it says 'hey I
know you are going to ask this question and my answer would be yes'.
While `--force` is to actually *force* any operation that cannot be
completed otherwise.

> About the create domain suggestion, Is the follow up question on `*create
> domain*`, upon missing domain,
> such a bad idea? A user already can `add a domain` by using the web
> interface. If that is not ambiguous,
> neither is this, right?
> 
> However I see this issue, if a newbie user types in an email address in
> place of the list name, probably
> on misreading the command format, he would end up creating a domain for his
> mail provider.
> 
> *$./mmclient create list --help*
> *Creates the list list at domain.org <list at domain.org>*
>  *$./mmclient create list user at gmail.com <user at gmail.com>*
> *The domain gmail.com <http://gmail.com> does not exist.Create one?[y/n] y*
>  *$*
> 
> @Abhilash
> 
> I have written unittests for methods like connect and create, but have to
> refine them more.
> Hence the tests won't come up in this revision.

Good to hear that. Did you give TDD a try?
 
> Also, I would like to ask how the tests should be triggered. Should
> there be a `mmclient test` with a set of possible switches like `all`
> ,`domain`, `list`, `user` etc?
> Or should the customary `python setup.py test` be used?

You can use `nose2` for that, like mailman does. It automatically
discovers all the tests in directories specified and runs them.

> 
> I also propose to build a a *`describe user`* command that gives a detailed
> profile of the user.
> Verbose listing using tables is not so effective users as most of the
> attributes are lists.

What detail profile are you talking about? Apart from addresses and
name(optional) does mailman store any other data about a user? You can
show the lists he is subscribed to, but `describe user` may not be an
appropriate command for that. Maybe you can add it in users scope
itself like
  `mmclient user a at b.org --list-subscriptions`
Others may have different thoughts though.

-- 
thanks,
Abhilash Raj


More information about the Mailman-Developers mailing list