12

I'm newbie using sphinx. It looks pretty good. I have almost documented all my project using autodoc, but I want to change one behavior. Reading the documentation, I've seen this: autodoc_member_order, and want to change to 'bysource' value, the point is, where am I supposed to put this value?

Thanks, and I apologize for my poor English.

Update: I'm using sphinx 0.6.6

bad_coder
  • 11,289
  • 20
  • 44
  • 72
slothy
  • 363
  • 1
  • 3
  • 13

1 Answers1

13

put

autodoc_member_order = 'bysource'

at the bottom of the config file.

Of course you need version 1.0, as the docs you linked in the question mention:

Changed in version 1.0: Support for 'bysource'.

nosklo
  • 217,122
  • 57
  • 293
  • 297
  • I've tried this, yet. Now at bottom of the conf.py file and it's not working. Maybe sphinx 0.6.6? – slothy Jan 14 '11 at 16:10
  • @slothy: Yeah, you need sphinx 1.0. See the end of the doc topic you linked yourself: *Changed in version 1.0: Support for 'bysource'.* – nosklo Jan 14 '11 at 16:26
  • Ouch!...sorry I don't know what was thinking in...anyway, Is signal in the docs where to put extensions config values? – slothy Jan 14 '11 at 16:45
  • 9
    This doesn't work for me using Sphinx 1.0.7. The behavior is still alphabetic order after setting autodoc_member_order = 'bysource' in conf.py. – Jacob Marble Apr 08 '11 at 18:14