cms-dev / cms

Contest Management System
http://cms-dev.github.io/
GNU Affero General Public License v3.0
888 stars 360 forks source link

Feature request: rethink cms command line interface #281

Open wil93 opened 10 years ago

wil93 commented 10 years ago

Right now there are many different scripts, like:

cmsAdminWebServer
cmsContestWebServer
cmsImporter
cmsMake
...

An idea to make the command line interface easier and more accessible is to use a "git-like" syntax:

cms admin-web-server
cms contest-web-server
cms importer
cms make
...

(commands like cms admin-web-server could be aliased to cms aws, for example)

There are several advantages with this approach:

lw commented 10 years ago

I don't oppose this idea but I don't see it as a priority. I just hope that the code to do it will be kept simple and elegant (for example, that it integrates nicely with setuptools). Anybody who wants to work on it is welcome.

As a side note, I add that IMO the best option to manage CMS's services is to have them running as "daemons" (terminology differs) managed by something like systemd, upstart or (simpler) supervisord. I'm hoping this would make RS useless. That's also something one could work on.

stefano-maggiolo commented 10 years ago

I also doesn't consider this a priority, but it could simplify all the similar scripts in scripts/. On the other hand I still don't like too much the idea of transitioning to systemd.

wil93 commented 10 years ago

I think that the best way to implement this would be using click. It supports arbitrary nesting of commands and it does integrate with setuptools.

Almost forgot: it also supports some automatic bash completion.

lw commented 10 years ago

Is the package available in Ubuntu?

wil93 commented 10 years ago

It doesn't seem so. However, click's developer (which BTW it's also the developer of Werkzeug and Flask) advises to install click inside a virtualenv (thus using pip).

giomasce commented 9 years ago

The idea seems fine for me too. For CMS we more or less always tried to use components from the OS package manager instead of Python package manager, and I personally encourage this behavior for a variety of reasons (including security-related and good project management practices ones).

wil93 commented 9 years ago

Where/whom should I ask in order to get python-click into Ubuntu repositories? I had a (not so fruitful :P) discussion here.

giomasce commented 9 years ago

Usually packages in Ubuntu are taken from Debian. I think that the best way to have a (non-Ubuntu-specific) package accepted in Ubuntu is to have it accepted in Debian. You could file a RFP (Request For Packaging) for Debian (which is, of course, no guarantee that anyone will ever do it). For instructions see here: https://www.debian.org/devel/wnpp/.

I should mention that I could work on it myself. Unfortunately in this period I'm pretty busy and I can give no guarantees myself on when this could happen.

That said, I don't think that being in Debian/Ubuntu is a strong precondition for being a dependency of CMS. We already have had exceptions in the past. The point is that starting from when that package will exist in Ubuntu we will suggest to use the packaged version.

giomasce commented 9 years ago

(BTW, my link suggests to use reportbug to file the RFP; I usually prefer reportbug-ng, which has a GUI. YMMV)