ChucK-plugin-for-ST3 icon indicating copy to clipboard operation
ChucK-plugin-for-ST3 copied to clipboard

project folders organization

Open zeffii opened this issue 11 years ago • 18 comments

How you feel about sticking everything into folders where possible. It seems that the python files need to stay in the main folder, but things like the syntax files and settings can be moved to their own folder.

Adding a bit more structure here can help compartmentalize. what do you say?

zeffii avatar Dec 09 '13 19:12 zeffii

That's an excellent idea. Things are getting a bit cluttered. Suggestions?

tildebyte avatar Dec 09 '13 19:12 tildebyte

yeah find a nice place for everything that isn't a python file, then worry about the python files if they get out of hand.. but i'm close to saturation now..

zeffii avatar Dec 09 '13 19:12 zeffii

this is already a pretty sweet development environment now, if ST3 had an openGL overlay mode with py bindings things would get mental. I don't find myself needing this "replace remove" shred functionality, it's not like the replace shred feature is more elegant that start-stop, so as much as I would like to get that feature working it's not a major concern, It might even be useful to remove that ChucK.py altogether for now

zeffii avatar Dec 09 '13 19:12 zeffii

Yeah, I think keeping it dormant (named as ".py_") is a good idea, as well as removing the Supercollider stuff, leaving only the bits which are more-or-less currently working, so that there's still a base for someone to build on. I hear what you're saying re: shred management, but I can't stop thinking about that SC+EMACS vid from a while back; being able to truly tweak things while chuck is running... mmmm....

tildebyte avatar Dec 10 '13 18:12 tildebyte

yeah, but even replacing shreds restarts the shred, i don't think SC does that... i got the impression that it does update on the fly.. proper on the fly

zeffii avatar Dec 10 '13 21:12 zeffii

Ahhh. Good point. iirc from messing with the Audicle, any shred you replace starts over… Oh, well.

tildebyte avatar Dec 10 '13 21:12 tildebyte

OK, in the absence of any other suggestions from all those participating (us two :) ), I'm going to take a whack at this. One thing I'd like to do is create a zip file, named 'on hold' or 'optional', where potentially useful but currently annoying files could live without (presumably) being seen by ST (Scales.sublime-completions, I'm looking at you...).

tildebyte avatar Dec 11 '13 17:12 tildebyte

yeah. don't mind if you torch Scales

zeffii avatar Dec 11 '13 17:12 zeffii

maybe even Main.sublime menu and Chuck.py_ you might have to stick underscores at the end of them to fully "obliviate" sublime.

zeffii avatar Dec 11 '13 17:12 zeffii

OK, so ST will ignore an arbitrary zipfile, in this case "on hold.bz2". Done. It'll read its files from almost anywhere. Done. HOWEVER. Commands, e.g. context menu items, keybound items; really, Python files in general AFAICT, are bound by Pythonic rules. I've looked at a couple of other plugins, and some use an 'init.py' to e.g. include the necessary files. I couldn't get it to work, but I'm not exactly a wizard when it comes to those aspects of Python.

tildebyte avatar Dec 11 '13 17:12 tildebyte

continuing the thought... Most projects have something like: Foo plugin -

Foo
  |_ foo (for python file heirarchy)
       |_ foo.py (whatever the main plugin file is)
       __ various other Python files & dirs
  |_ various directories
  __ loose files

... so I'd at least like to have a 'chuck' directory containing the py files.

tildebyte avatar Dec 11 '13 17:12 tildebyte

Derp, keep remembering things. Will having '.ck' files in a 'ck' sub-directory cause problems?

tildebyte avatar Dec 11 '13 17:12 tildebyte

no ck files just need to be copied by users, to wherever their chuck file is.

Agreed btw, about the python files I would also feel more comfortable having a directory for just the python stuff. I'll look into that asap.

zeffii avatar Dec 11 '13 18:12 zeffii

if you show me some links to projects that have a nice folder structure, i'll get this one rapidly.

zeffii avatar Dec 11 '13 18:12 zeffii

https://github.com/srusskih/SublimeJEDI ok, that will work nicely (I think.)

zeffii avatar Dec 11 '13 18:12 zeffii

LOL. Was about to suggest that one. SublimeREPL (http://github.com/wuub/SublimeREPL) looks nice as well.

tildebyte avatar Dec 11 '13 18:12 tildebyte

no ETA on this, but i'll mess with it after dinner.

zeffii avatar Dec 11 '13 18:12 zeffii

even SublimeREPL has several .py files in the main directory, I haven't seen any example projects where plugin classes are placed in a directory.

I know from writing python plugins for Blender3D that it can be a complete insert favourite expletive here to get imports working, it will either be very easy or complete hackery.

So theoretically, i'm totally in favour of getting these files into a folder, but without a reasonable example showing how Sublime will find plugin .py files I haven't had much luck.

import sys
sys.path.append(os.path.dirname(__file__)

(i'm storing this snippet for later)

zeffii avatar Dec 11 '13 22:12 zeffii