Use of different project types, STRUCTURE_TEMPATE

44 views
Skip to first unread message

Martin Fiers

unread,
Sep 24, 2016, 4:44:07 AM9/24/16
to spyder
Hello,

I was wondering what's the idea behind STRUCTURE_TEMPATE? I can see it's used only once in spyder/widgets/projects/type/python.py: PythonPackageProject.

Is the idea to keep this? Or are these templates still awaiting a refactor? I don't think it's implemented somewhere in the spyder codebase after searching for it. We would like to use this to create our own type of projects and provide a boilerplate skeleton project.

Also, is there a recommended way to provide your own projects in your 3rd party plugin? (currently I just monkey-patch spyder so we can add our own projects; I assume there's a better way :) ).

Kind regards,
Martin

Carlos Córdoba

unread,
Sep 27, 2016, 4:34:09 AM9/27/16
to spyd...@googlegroups.com
Hi,

I think the idea of STRUCTURE_TEMPLATE is (as you guessed) to provide different directory structures for different kinds of projects (e.g. Python package, Django, Data Science, etc). We added the code to do that but (unfortunately) we didn't have time to expose it to our users.

At the moment we don't provide a public API to allow users to provide their own types of projects, but we're working on that for Spyder 4.0. So what you're doing is fine for now, i.e monkey-patching Spyder ;-)


Cheers,
Carlos

El 24/09/16 a las 03:07, Martin Fiers escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Martin Fiers

unread,
Sep 27, 2016, 5:11:40 AM9/27/16
to spyder
Allright, thanks very much for your answer!

Kind regards,
Martin

Tim Michelsen

unread,
Sep 30, 2016, 3:54:26 PM9/30/16
to spyd...@googlegroups.com
> I think the idea of STRUCTURE_TEMPLATE is (as you guessed) to provide
> different directory structures for different kinds of projects (e.g.
> Python package, Django, Data Science, etc). We added the code to do that
> but (unfortunately) we didn't have time to expose it to our users.
>
> At the moment we don't provide a public API to allow users to provide
> their own types of projects, but we're working on that for Spyder 4.0.
maybe this could be combined with cookiecutter?

Carlos Córdoba

unread,
Sep 30, 2016, 3:56:19 PM9/30/16
to spyd...@googlegroups.com
You read my mind! I was thinking to do exactly the same :-)

But that would be one kind of project (which we could call Data Science)

El 30/09/16 a las 14:54, Tim Michelsen escribió:
Reply all
Reply to author
Forward
0 new messages