librelist archives

« back to archive

Fwd: Code Organization

Fwd: Code Organization

From:
George V. Reilly
Date:
2013-01-10 @ 01:22
We're about to start a new project that's spread across two Git repos:
1. A framework that wraps Flask and provides additional services.
   Let's call it Bread.
2. An application that uses the Bread framework. Let's call it Jam.

We expect there will be future applications, like Marmalade and
PeanutButter, that use Bread, which is why it lives in its own
repository. Most likely they will `pip install Bread`.
Meanwhile, neither Bread nor Jam actually exists yet; they'll be
developed in parallel.

My question is, how do *you* do develop this? How do you manage the
co-evolving repos? Do you stick Bread into a subdirectory of Jam and
manage it as a git submodule, a git subtree, or the Mercurial
equivalent? Do you keep them as peers and play games with PYTHONPATH
and virtualenv? Are you constantly doing `pip install -e
path/to/Bread`? Or something else?

I ask here because it seems like from the mailing list traffic
that many Flask developers are developing multiple components
simultaneously, and may have some useful insights.
I've looked around, but I haven't found any very satisfactory guidelines.

Most of our existing Python code is in one very large repo,
with about 100 homegrown packages. I do not want to continue that
practice.

Thanks
-- 
/George V. Reilly  george@reilly.org  Twitter: @georgevreilly
http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech

Re: [flask] Fwd: Code Organization

From:
Todd Kennedy
Date:
2013-01-10 @ 01:40
Great I just ate dinner and now I'm hungry again!

But seriously what we do is develop both in unison -- we build what we need
in bread first and then start on jam.

As we need more functionality in bread we add it and increment the version
and then use that functionality in jam.

Two separate repos, pip install with virtualenv.

On Jan 9, 2013, at 20:25, "George V. Reilly" <george@reilly.org> wrote:

We're about to start a new project that's spread across two Git repos:
1. A framework that wraps Flask and provides additional services.
   Let's call it Bread.
2. An application that uses the Bread framework. Let's call it Jam.

We expect there will be future applications, like Marmalade and
PeanutButter, that use Bread, which is why it lives in its own
repository. Most likely they will `pip install Bread`.
Meanwhile, neither Bread nor Jam actually exists yet; they'll be
developed in parallel.

My question is, how do *you* do develop this? How do you manage the
co-evolving repos? Do you stick Bread into a subdirectory of Jam and
manage it as a git submodule, a git subtree, or the Mercurial
equivalent? Do you keep them as peers and play games with PYTHONPATH
and virtualenv? Are you constantly doing `pip install -e
path/to/Bread`? Or something else?

I ask here because it seems like from the mailing list traffic
that many Flask developers are developing multiple components
simultaneously, and may have some useful insights.
I've looked around, but I haven't found any very satisfactory guidelines.

Most of our existing Python code is in one very large repo,
with about 100 homegrown packages. I do not want to continue that
practice.

Thanks
-- 
/George V. Reilly  george@reilly.org  Twitter: @georgevreilly
http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech

Re: [flask] Fwd: Code Organization

From:
Nathan M
Date:
2013-01-10 @ 09:29
Why not provide Bread as a webservice through an API, so others projects
just have to connect to it ? This way, you do not fiddle with git
submodule. It will be easy to add more subservices on the future, and if
you need to ship a standalone package made of Bread+Marmelade, you can
either provide both or melt them into one app by removing the networking
code if you have abstracted enough.


--
/*
** "What do you despise? By this you are truly known."
**	from Manual of Muad'Dib by the Princess Irulan.
*/



On Thu, Jan 10, 2013 at 2:40 AM, Todd Kennedy <todd.kennedy@gmail.com>wrote:

> Great I just ate dinner and now I'm hungry again!
>
> But seriously what we do is develop both in unison -- we build what we
> need in bread first and then start on jam.
>
> As we need more functionality in bread we add it and increment the version
> and then use that functionality in jam.
>
> Two separate repos, pip install with virtualenv.
>
>
> On Jan 9, 2013, at 20:25, "George V. Reilly" <george@reilly.org> wrote:
>
> We're about to start a new project that's spread across two Git repos:
> 1. A framework that wraps Flask and provides additional services.
>    Let's call it Bread.
> 2. An application that uses the Bread framework. Let's call it Jam.
>
> We expect there will be future applications, like Marmalade and
> PeanutButter, that use Bread, which is why it lives in its own
> repository. Most likely they will `pip install Bread`.
> Meanwhile, neither Bread nor Jam actually exists yet; they'll be
> developed in parallel.
>
> My question is, how do *you* do develop this? How do you manage the
> co-evolving repos? Do you stick Bread into a subdirectory of Jam and
> manage it as a git submodule, a git subtree, or the Mercurial
> equivalent? Do you keep them as peers and play games with PYTHONPATH
> and virtualenv? Are you constantly doing `pip install -e
> path/to/Bread`? Or something else?
>
> I ask here because it seems like from the mailing list traffic
> that many Flask developers are developing multiple components
> simultaneously, and may have some useful insights.
> I've looked around, but I haven't found any very satisfactory guidelines.
>
> Most of our existing Python code is in one very large repo,
> with about 100 homegrown packages. I do not want to continue that
> practice.
>
> Thanks
> --
> /George V. Reilly  george@reilly.org  Twitter: @georgevreilly
> http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech
>
>
>

Re: [flask] Fwd: Code Organization

From:
Juan Pablo Scaletti
Date:
2013-01-10 @ 01:33
You could use separate repos for Bread and Jam, write a setup.py for 
Bread and "install" it with `python setup.py develop`.
Any change to Bread from then on will be available to Jam without need 
to re-install it.

George V. Reilly wrote:
> We're about to start a new project that's spread across two Git repos:
> 1. A framework that wraps Flask and provides additional services.
>    Let's call it Bread.
> 2. An application that uses the Bread framework. Let's call it Jam.
>
> My question is, how do *you* do develop this? How do you manage the
> co-evolving repos? Do you stick Bread into a subdirectory of Jam and
> manage it as a git submodule, a git subtree, or the Mercurial
> equivalent? Do you keep them as peers and play games with PYTHONPATH
> and virtualenv? Are you constantly doing `pip install -e
> path/to/Bread`? Or something else?
>
> Thanks
> -- 
> /George V. Reilly george@reilly.org <mailto:george@reilly.org> 
>  Twitter: @georgevreilly
> http://www.georgevreilly.com/blog http://blogs.cozi.com/tech
>

Juan-Pablo Scaletti
LĂșcuma labs