elsa icon indicating copy to clipboard operation
elsa copied to clipboard

[Stalled] Provide an Elsa class that can be used programmatically

Open hroncok opened this issue 8 years ago • 5 comments

Related: https://github.com/pyvec/elsa/issues/32

This is still very much work in progress, currently:

  • There is a Elsa class people can use to do freeze(), serve() and deploy()
  • cli(...) is now a shortcut to Elsa(...).cli()
  • all integration tests pass without modification

However:

  • a lot of stuff inside still prints and exists (notably deploy) - this is not acceptable with library API

I'd like an early feedback if possible.

hroncok avatar Jun 28 '17 15:06 hroncok

Should the cli() thing be decoupled to not be part of the class?

hroncok avatar Jun 28 '17 20:06 hroncok

I'm honestly not sure. I probably would have put it outside myself, but I don't think the current state of things is wrong.

Sanqui avatar Jun 28 '17 20:06 Sanqui

OK, let me work on this as is, will try to fix all the printing and error reporting and change it so that only the actual CLI is talking. Will also try to add some unittests, since now we are defining an API.

hroncok avatar Jun 28 '17 20:06 hroncok

Sounds good to me!

Sanqui avatar Jun 28 '17 20:06 Sanqui

BTW I was thinking about this more and I think making cli() a separate function once again and just create an Elsa instance on each command will be more maintainable.

hroncok avatar Sep 14 '17 12:09 hroncok