Add capability for sub-managers to manage their own options #94

Merged
merged 4 commits into from Apr 28, 2014

Conversation

Projects
None yet
3 participants
Owner

smurfix commented Mar 2, 2014

The first three patches in this series are mostly-obvious and hopefully self-explanatory. (I removed Flask from the test to show that flask-script does not require anything special from Flask.)

The fourth patch adds the capability for sub-managers to process their own command-line arguments. It also allows command options to have the same name as (sub)manager options, as long as the dest= values are different. It also allows a sub-manager to replace the current app with something else that's passed on to commands.

On the other hand, it takes away the ability to freely mix and match options and non-options. IMHO this was not a good idea in the first place; if nothing else, I want "manage.py --host foo config appserver --host=bar" to actually work, without being required to remember to use --config-host and --appserver-host or other strange "non-conflicting" option names. (Or in fact "-h" instead of "--host". Help is "-?" around here.) Because this is an incompatible change, this patch also increments the version number.

If you decide not to take this patch (or something like it), I'll probably maintain the change in my own fork.

added some commits Mar 2, 2014

@smurfix Tests: remove superfluous lambda 6e2d069
@smurfix Fix outdated docstring 334c512
@smurfix Tests: Replace Flask with minimal test scaffolding e489630
@smurfix Add capability for sub-managers to manage their own options
This change *removes* the ability to mix-and-match commands and
options. This means that you now can do
$ manage.py --host=webserver config backend --host=appserver

The actual parameter spaces must still be different.
e9a5cf9
Collaborator

techniq commented Mar 2, 2014

I'll be honest, I've moved away from using Flask-Script for my own projects for a while now (I primarily work in Node.js and ASP.NET nowadays, and thus Grunt/Gulp for my builds/scripts). I've been looking for a new maintainer for the project, and it looks like you might have a strong interest. Would you want to take over the reigns of the project?

Note, the project went through a fairly breaking change when we switched to use argparse subparsers, so I would be careful making another breaking change without a major version change (I saw the 0.7 change). It might be a good time to switch to semantic version and release the current v0.6.x code as 1.0, and start a new 2.x branch with breaking changes.

Thoughts?

Owner

smurfix commented Mar 2, 2014

Hi,

Sean Lynch:

I'll be honest, I've moved away from using Flask-Script for my own projects for a while now (I primarily work in Node.js and ASP.NET nowadays, and thus Grunt/Gulp for my builds/scripts). I've been looking for a new maintainer for the project, and it looks like you might have a strong interest. Would you want to take over the reigns of the project?

No problem, I'd be honored to.

Note, the project went through a fairly breaking change when we switched to use argparse subparsers, so I would be careful making another breaking change without a major version change (I saw the 0.7 change). It might be a good time to switch to semantic version and release the current v0.6.x code as 1.0, and start a new 2.x branch with breaking changes.

Thoughts?

OK with me; I tend to regard 0.X versions as "no stable API yet, so
semantic versioning's X.Y.Z scheme becomes 0.X.YZ" and didn't
change anything major because I had no idea what your plans are.

If the answer to that last question is "None", then I'll set up branches
in my current repository along "clean" 1.0/2.0 lines, and check why Travis
keeps complaining about the 2.6 build for no known reason. :-/

-- Matthias Urlichs

Collaborator

techniq commented Mar 2, 2014

No plans. All that sounds good.

Collaborator

techniq commented Mar 2, 2014

Btw, regarding transferring of ownership, I'm not sure how that will work if you already have a fork. I could also keep the primary repo on my account and give you admin privileges. I remember it took a little extra work to migrate the repo to my back in 2012, but Github has added redirects and such since then.

Owner

smurfix commented Mar 2, 2014

Hi,

Sean Lynch:

Btw, regarding transferring of ownership, I'm not sure how that will work if you already have a fork. I could also keep the primary repo on my account and give you admin privileges. I remember it took a little extra work to migrate the repo to my back in 2012, but Github has added redirects and such since then.

I can always temporarily remove that fork from github.

I never did an ownership transfer / project redirect / whatever before, so
whatever works. If nothing else, you can always upload a "do-not-pull" branch
which does not have a parent and which contains a single README file that
tells people to go to smurfix/flask-script.

Also, there's pypi and whatever other sites the package is registered at …

-- Matthias Urlichs

Collaborator

techniq commented Mar 3, 2014

I just attempted the transfer and it failed due to your fork. Let me know when you've deleted it and i'll try again.

Also, what is your PyPI username and I'll add you.

Owner

smurfix commented Mar 3, 2014

Hi,

Sean Lynch:

I just attempted the transfer and it failed due to your fork. Let me know when you've deleted it and i'll try again.

Done.

Also, what is your PyPI username and I'll add you.

smurfix

-- Matthias Urlichs

Collaborator

techniq commented Mar 3, 2014

Done for both.

Owner

smurfix commented Mar 3, 2014

Hi,

Sean Lynch:

Done for both.

Cool. Thanks.

-- Matthias Urlichs

How will this project go on? Please take good care of it! Especially update the documentation on readthedocs and handle the issues. I think it's a fairly important addon in the flask ecosystem.

Owner

smurfix commented Mar 27, 2014

Not to worry, I plan to do some work on it during the next few days.

Very nice! Looking forward to that. Thanks for caring about the project. 👍

smurfix merged commit e9a5cf9 into smurfix:master Apr 28, 2014

1 check failed

default The Travis CI build failed
Details
Owner

smurfix commented Apr 28, 2014

@techniq In case you read this, could you please reassign or delete the flask-script page on readthedocs?

Collaborator

techniq commented Apr 28, 2014

I responsed on Google+, but in case you see here first :), what's your readthedocs username. I tried smurfix and it said it didn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment