Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements rename command #74

Merged
merged 1 commit into from
Jul 29, 2016
Merged

Implements rename command #74

merged 1 commit into from
Jul 29, 2016

Conversation

larsborn
Copy link
Contributor

@larsborn larsborn commented Jan 22, 2016

reopened because of #58 the pr #63 was closed.

The following items will be done:

  • fix PEP8 issues

  • Short style flag -p would be relevant in line "@click.option('--project', default=None, nargs=2)"

  • Idem with -T for cross commands consistency in line "@click.option('--tag', default=None, nargs=2)"

  • same in file watson.completion

  • use _replace function: That way if we change the format of the frame we will not have to edit this function.

  • change

    if frame.project == old_project:
        frame._replace(project=new_project)
    
  • incorp. code review by @SpotlightKid

  • change CLI from --tags to subsubcommand

  • rebase and squash

did I forget something?

@larsborn
Copy link
Contributor Author

larsborn commented Jan 22, 2016

reading the newly added CONTRIBUTION.md: also todo is

  • add a test for the rename command (or is it unnecessary?)
  • update docu

@jmaupetit jmaupetit changed the title implements rename command [WIP] Implements rename command Jan 25, 2016
@k4nar
Copy link
Collaborator

k4nar commented Jan 25, 2016

Great 👍 !

@larsborn : The commands are not tested yet (a shame ;) ), so no you don't have to write a test.

@jmaupetit
Copy link
Contributor

Hi @larsborn and thank you for this! Do not hesitate to remove the WIP label once this PR is ready to merge.

@larsborn larsborn force-pushed the master branch 2 times, most recently from afa6028 to ba6e258 Compare June 8, 2016 23:03
@larsborn
Copy link
Contributor Author

larsborn commented Jun 8, 2016

finally ready! :-) should I squash my commits?

It took me some time to get back to this, so new feedback is very much appreciated! If everything is alright, this is ready to merge from my side.

@larsborn larsborn changed the title [WIP] Implements rename command Implements rename command Jun 8, 2016
case "$3" in
-p|--project)
projects="$(watson projects)"
COMPREPLY=($(compgen -W "$projects" -- ${cur}))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this to handle paces in project names properly, like in #122, please.

@SpotlightKid
Copy link
Contributor

SpotlightKid commented Jun 15, 2016

@larsborn Yes, when your're ready, please rebase on current master and squash.

But I wonder whether it would be better to split this into two commands, "renameproject" and "renametag"? Would make the command line a lot easier, IMHO. Required options are always a bit of an oxymoron.

@larsborn
Copy link
Contributor Author

@SpotlightKid I suggested this interface in #62 and maybe, it wasn't discussed enough. @ALL Any additional opinions? Two commands would make the list of commands longer. Also: are there any plans to rename other things too?

Generally, my feeling is, that two commands are a slightly better idea.

@SpotlightKid
Copy link
Contributor

Or what about watson rename tag <oldtag> <newtag> and watson rename project <oldproject> <newproject>? I.e. the comamnd always takes three positional params: type, old, new.

@jmaupetit
Copy link
Contributor

A subsubcommand would be perfect!

@larsborn larsborn changed the title Implements rename command [WIP] Implements rename command Jun 17, 2016
@larsborn
Copy link
Contributor Author

all right, give me a few days again :)

@larsborn larsborn force-pushed the master branch 2 times, most recently from 11eb442 to 4d38eea Compare July 4, 2016 21:14
@larsborn larsborn changed the title [WIP] Implements rename command Implements rename command Jul 4, 2016
@larsborn
Copy link
Contributor Author

larsborn commented Jul 4, 2016

@k4nar @SpotlightKid @jmaupetit ok. Let's try again: ready to merge from my side.

Flag | Help
-----|-----
`-p, --project TEXT...` | Rename project
`-T, --tag TEXT...` | Rename tag
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These options are deprecated. Did you update the doc via make docs (see: https://tailordev.github.io/Watson/contributing/hack/)?

@larsborn
Copy link
Contributor Author

larsborn commented Jul 5, 2016

forgot to update the docs. Should be ok now.

btw: how are you managing releases (or in other words: when will it be possible for me to use this feature on my "production" machine aka "without switching to the dev-master version"?)

@jmaupetit
Copy link
Contributor

@SpotlightKid is working on a major release (2.0.0), but, in the meantime (if he agrees) we can release a 1.4.0 with recent changes.

Anyway, this PR should be merged to master.

@larsborn
Copy link
Contributor Author

larsborn commented Jul 6, 2016

thx for the info. Is there anything to do on my side?

COMPREPLY=($(compgen -W "$tags" -- ${cur}))
;;
esac
;;
esac
;;
esac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename needs to be added to the list of commands in line 9 of this file as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@SpotlightKid
Copy link
Contributor

Sorry that it took so long to review this. I discovered an issue with the Bash completion, which I wanted to investigate, but didn't find the time. Turned out that it is unrelated to your PR, so I'm merging it now and will push a fix for the completion file later.

@SpotlightKid SpotlightKid merged commit 33ef3da into jazzband:master Jul 29, 2016
@SpotlightKid SpotlightKid mentioned this pull request Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants