← Back to team overview

quickly-talk team mailing list archive

Re: Fwd: Fwd: Proposal: Abstract hosting service from project templates.

 

Hi Didier
 I have a use case for -t. I have a command in my toolbox template
that removes launchpad from a project. This way my ubuntu-application
template can remain up to date and it's easy to remove launuchpad from
a project.

quickly create ubuntu-application foo
cd foo
quickly -t toolbox nolaunchpad

If you remove -t what workflow should I use to patch a project to
differ slightly from stock template but keep getting bug fixes to the
template?



On 09/08/2012, Didier Roche <didrocks@xxxxxxxxxx> wrote:
> Le 08/08/2012 23:01, tony byrne a écrit :
>> Hi Alistair
>>   The -t parameter calls a command from a template even if it is not
>> the template that created the project. When you create a project
>> quickly defaults to the creating template unless you specify
>> otherwise.
>>
>> quickly -t alistairs_template create ubuntu-app
>>    alistairs_template should not contain a create command so a command
>> not found error will be thrown.
>> If it did, because you had run
>> quickly quickly ubuntu-application alistairs_template then
>> quickly -t alistairs_template create ubuntu-app leads the original
>> duplication of project files problem you mentioned.
>> quickly save will probably crash on lack of bzr repo directory
>> quickly submitubuntu ditto
>> quickly -t alistairs_template submitubuntu - a command not found error
>> will be thrown.
>> alistairs_template will not contain a submitubuntu command, unless you
>> put one into it. Consider alistairs_template as a collection of
>> commands and quickly calls them from within the source tree and
>> provides them with the right environment. You write the commands, and
>> as you say, they can do anything.
>
> In the Quickly reboot, my plan is that the Command class naturally take
> the boiler_plate from the current template, but default to the parent
> one (and so on), if there are no boiler plate directory available .
>
> For that, I think we need to standardize project_root (that I'm eager to
> rename project_directory) to be considered as the "boiler plate" one.
> Same with the "store" directory, which can have modules imported on
> quickly add. So you will be able to customize either the boiler template
> or just getting the inheritance from the parent template for it. Then
> for command a similar system, using the override part I presented in a
> previous email in this thread.
>
> With this, you should gain the flexibility you desire to tweak existing
> templates without having to duplicate a bunch of code and we keep the
> paradigm of one template == one opinionated set of technology. I need to
> think about the details though and how to present that in an effective
> interface :)
>
> I think with that, we can remove the -t option, as underlined into the
> hangout, it was never really used, and propose commands that are not
> controlled into the current environment and so can create conflicts
> (what about calling add from an ubuntu-flash template in the
> ubuntu-application one? that can be ugly ;))
>
> Cheers,
> Didier
>
>>
>> On 08/08/2012, Alistair Buxton <a.j.buxton@xxxxxxxxx> wrote:
>>> On 8 August 2012 21:00, tony byrne <tony.badwolf@xxxxxxxxx> wrote:
>>>> ---------- Forwarded message ----------
>>>> From: tony byrne <tony.badwolf@xxxxxxxxx>
>>>> Date: Wed, 8 Aug 2012 20:59:46 +0100
>>>> Subject: Re: [Quickly-talk] Fwd: Proposal: Abstract hosting service
>>>> from project templates.
>>>> To: Alistair Buxton <a.j.buxton@xxxxxxxxx>
>>>>
>>>> Hi Alistair
>>>>   I forgot about build. So template 1, ubuntu-application, contains
>>>> project code and bzr/launcpad commands, template 2 contains a bzr2git
>>>> command, removing bzr and initialising git, and release uploading to
>>>> githost. No project files or create command so no duplication.
>>>>
>>>> quickly create ubuntu-application foo
>>>> cd foo
>>>> quickly -t alistairs_template bzr2git
>>>> quickly -t alistairs_template release
>>>>
>>>> quickly create ubuntu-cli bar
>>>> cd bar
>>>> quickly -t alistairs_template bzr2git
>>>> quickly -t alistairs_template release
>>>>
>>>> quickly create ubuntu-flash-game foobar
>>>> cd foobar
>>>> quickly -t alistairs_template bzr2git
>>>> quickly -t alistairs_template release
>>>
>>> What happens if I do any of the following:
>>>
>>> quickly save
>>> quickly submitubuntu
>>> quickly -t alistairs_template submitubuntu
>>>
>>> And why not just do:
>>>
>>> quickly -t alistairs_template create ubuntu-app
>>>
>>> And then have quickly remember that this project was created with -t
>>> and so it should always assume the -t parameter whenever running any
>>> command on this project. That was my original proposal, in a nutshell,
>>> and it avoids having to convert repository format.
>>>
>>>
>>> --
>>> Alistair Buxton
>>> a.j.buxton@xxxxxxxxx
>>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~quickly-talk
>> Post to     : quickly-talk@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~quickly-talk
>> More help   : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~quickly-talk
> Post to     : quickly-talk@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~quickly-talk
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References