← Back to team overview

dolfin team mailing list archive

Re: [noreply@xxxxxxxxxxxxx: [Branch ~dolfin-core/dolfin/main] Rev 5081: Integrate FEniCS documentation with DOLFIN to get correct docstrings for the Python module.]

 

On 26 August 2010 18:24, Anders Logg <logg@xxxxxxxxx> wrote:
> On Thu, Aug 26, 2010 at 06:18:25PM +0200, Kristian Ølgaard wrote:
>> On 26 August 2010 18:04, Anders Logg <logg@xxxxxxxxx> wrote:
>> > What is the role of the docstrings module?
>>
>> This is the module that contains all the docstrings for the dolfin module.
>> We use it to dynamically asssign to __doc__ and in the hand written
>> Python layer, we will use it as:
>>
>> class Foo(object):
>>     __doc__ = docstrings.Foo.__doc__
>>
>> >
>> > It seems strange that DOLFIN should install a module named
>> > 'docstrings' in the global Python namespace.
>>
>> I'll delete the docstrings module in the dolfin.__init__ file such
>> that it is not present when doing:
>>
>> >>> import dolfin
>> >>> dir(dolfin)
>>
>> Kristian
>
> My point is that it is now in the same directory as the modules
> 'dolfin' and 'dolfin_utils' so it looks like we are providing a module
> named 'docstrings'.

Which we do :)

> Can't we place it inside the dolfin directory?

I think so, don't know if it will result in any import errors since I
have docstrings.dolfin which will then be dolfin.docstrings.dolfin.
And yes, we need that kind of naming, otherwise the documentation will
be all screwed up.

Kristian

> --
> Anders
>



References