#18514: Upgrade of group cohomology spkg
-------------------------------------------------+-------------------------
       Reporter:  SimonKing                      |        Owner:
           Type:  defect                         |       Status:
       Priority:  major                          |  needs_review
      Component:  PLEASE CHANGE                  |    Milestone:  sage-6.8
       Keywords:  group cohomology               |   Resolution:
        Authors:  Simon King                     |    Merged in:
Report Upstream:  None of the above - read trac  |    Reviewers:
  for reasoning.                                 |  Work issues:
         Branch:                                 |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by SimonKing):

 Replying to [comment:7 jdemeyer]:
 > On the topic of `.pxd` files, this is what they should contain:
 >
 > 1. The API of your module, that is all `cdef` classes and `c(p)def`
 functions that you want to export for use in other modules (in the same
 package or by other packages).
 >
 > 2. If your module provides bindings to some library (the `mtx` module in
 your package for example), then add the declarations of the library
 functions in the `.pxd` file.
 >
 > 3. Any dependencies of the above. Sage example: if you're defining a new
 kind of element of a ring, you will probably inherit from `RingElement`.
 In your `.pxd` file, you want to write `cdef class
 MySpecialElement(RingElement)`. This makes `RingElement` a dependency, so
 you need to write `from ... cimport RingElement` in the `.pxd` file.
 >
 > And that's it really. Things like interrupts have nothing to do with the
 API of your module, those are implementation details and belong in the
 `.pyx` file. This is important in order to minimize dependencies.

 OK. That's something that I should change. Actually, until not so long
 ago, I thought that cimports were only possible in pxd files.

 > NOTE about 2: if your module provides bindings to some library but also
 does significant other stuff, then it's best to split up the bindings in a
 different `.pxd` file. In Sage, we usually put the library bindings in
 `sage/libs`, look at `sage/libs/gmp` for a good example.

 Do I understand correctly: You suggest that I should create a new pxd file
 for the `MeatAxe` bindings, say, `mtx_lib.pxd`, which is then cimported in
 `mtx.pxd`?

--
Ticket URL: <http://trac.sagemath.org/ticket/18514#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to