i've been developing within Galaxy for awhile now and have been enjoying it 
quite a bit. i've seen portions of similar ideas in the past, but never 
cohesively assembled and so well realized.

i'd like to make some suggestions for further code collaboration / community 
contributions.

my default development environment seems to occasionally be causing havoc 
within my local repository. upon saving, i normally automatically strip 
right-sided whitespace to stay compatible with other developers i collaborate 
with. this also fixes the auto-indentation left by my editor when it 
occasionally leaves a line consisting of only spaces.

given that python has syntactically significant whitespace, i also try to 
maintain the convention of indentation with four-spaces. i've noticed this 
isn't consistent within the codebase, but does seem to be the preferred style 
such as in `lib/galaxy/datatypes/`.

python comes packaged with the script `reindent.py`:

    Change Python (.py) files to use 4-space indents and no hard tab characters.
    Also trim excess spaces and tabs from ends of lines, and remove empty lines
    at the end of files.  Also ensure the last line ends with a newline.


this is recommended practice per PEP 8:
  http://www.python.org/dev/peps/pep-0008/

  Tabs or Spaces?

      Never mix tabs and spaces.

      The most popular way of indenting Python is with spaces only.  The
      second-most popular way is with tabs only.  Code indented with a mixture
      of tabs and spaces should be converted to using spaces exclusively.  When
      invoking the Python command line interpreter with the -t option, it issues
      warnings about code that illegally mixes tabs and spaces.  When using -tt
      these warnings become errors.  These options are highly recommended!

      For new projects, spaces-only are strongly recommended over tabs.  Most
      editors have features that make this easy to do.


other comments in regards to collaboration:
  http://rails-bestpractices.com/posts/60-remove-trailing-whitespace
  http://blogobaggins.com/2009/03/31/waging-war-on-whitespace.html


hooks can be added to the repository for consistency, as i'm sure with the many 
contributions received this would be easy to miss:
  http://mercurial.selenic.com/wiki/CheckFilesExtension


would anyone be opposed to me fixing up the current codebase to adhere to this? 
running `reindent.py` on the files is easy enough, i'm willing to step through 
the files (`opendiff` / `FileMerge.app`) and verify no unlikely syntactic 
changes have occurred. i can also deliver changes in gradual "chunked" pull 
requests to ease current developers getting possibly bit by merge issues.

would anyone be willing to add the appropriate hooks to the central repository 
as well?


trevor
tre...@well.com
https://github.com/trevor
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Reply via email to