Open blueyed opened 9 years ago
Overriding Stellar's __init__
and load_config
might do the trick. I will happily merge such PR that makes it any easier to use it without the cmd line app.
I had a stab at this but found that stellar
's behaviour of os.fork()
ing in order to do the snapshots tripped me up in my use case (also testing, and involving pdb
. It resulted in several pdb
prompts on the same console (i.e. unusable))
For the time being I've resorted to running stellar
through subprocess
with a generated stellar.yaml
Oh yeah the os.fork()
must be a tricky one.
I think stellar might be a good option for a (Django) test suite, where you want to rollback to a previous state (including data migrations - Django would flush the tables, but keep the schema migrated).
For this to be usable from the tests (without
stellar init
and a config file), it would be required to allow for passing inoptions
toStellar
for example.What do you think about that? I'd be happy to prepare a PR for this.