Dunk Fordyce <[EMAIL PROTECTED]> writes:

> so what is the future of soya?

Soya is a useful 3D programming environment for Python. If it
continues to be developed and maintained, I'm sure it has a good
future.

> what do you want?

My application is probably a little different from that of most Soya
users: I'm using Soya to for visualization of airframe dynamics. I'm
interested in a clear, easy-to-understand presentation of this data. I
do not use a number of the ``advanced'' features of Soya (armatures,
ODE, etc.).

Given this, I am happy Soya's current features.

> what are your ideas?

Despite my contentment, I do have some ideas.

General ideas:

1. Introduce unit tests

  I'm don't know if automated testing is possible for the routines
  that actually draw things, but a lot could be tested, e.g., the math
  code.

2. Split _soya.pyx / _soya.c

  _soya.c is a 80k line C file -- smaller compilation units would make
  hacking on the Pyrex code *much* easier (I was using a PIII-500MHz
  over the Christmas break, and Soya took a long time to compile).
  
3. Use package modules

  The soya package has a lot of elements, some not obviously useful:
  e.g., what is soya.Bonus ? why soya.BLACK and soya.WHITE, but no
  soya.RED ?

  Twisted have an interesting package policy: as I understand it, the
  package itself contains very little; i.e., __init__.py is empty. All
  classes/functions are contained in modules in a package. I'm not
  sure how to apply this to Soya.

4. Adopt a coding standard

  Something like the Python coding standard

    http://www.python.org/peps/pep-0008.html

  and the Twisted coding standard

    
http://cvs.twistedmatrix.com/cvs/*checkout*/trunk/doc/core/howto/policy/coding-standard.xhtml

  could be used.

More specific ideas:

1. Class docstrings

  A numder of classes have important documentation given in the
  constructor's (that is, __init__'s) docstring. See, e.g., CoordSyst,
  _FixTraveling, and _Vertex. However, Python completely ignores these
  docstrings:

  >>> print soya.Vertex.__init__.__doc__
  x.__init__(...) initializes x; see x.__class__.__doc__ for signature

  This should be fixed -- i.e., the __init__ docstring should be moved
  up to the class docstring.

2. soya.World's dict/list behaviour

   I can't tell if soya.World is supposed to act like a dict or a
   list. __getitem__ takes a name as 'index', but __delitem__ takes a
   numeric index. Given the presence of append/insert/remove, I guess
   World is supposed to be list-like; this slight schizophrenia should
   be resolved.

3. Include 'name' in __repr__

   If a CoordSyst has a name, it should be printed in it's repr

Finally, there is a small, annoying issue with the __module__
attribute of builtin (i.e., Pyrex/C) classes:

  >>> from soya.pudding.style import Style
  >>> Style.__module__
  'soya.pudding.style'
  >>> from soya._soya import _Vertex
  >>> _Vertex.__module__
  '_soya'

This breaks pydoc links; I think it may be a Pyrex or Python issue,
rather than a Soya one.

Regards,

Rory

(HappyFool on freenode)

Reply via email to