Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception: 'fromsky' with abstract interface #30

Open
Cirdans-Home opened this issue Oct 18, 2020 · 3 comments
Open

exception: 'fromsky' with abstract interface #30

Cirdans-Home opened this issue Oct 18, 2020 · 3 comments

Comments

@Cirdans-Home
Copy link

Hi,

I encounter the following exception
Extension error: Handler <function fortran_parse at 0x7f35d1032170> for event 'builder-inited' threw an exception (exception: 'fromsky')
when I try to parse a module with:
.. f:automodule:: psfun_d_serial_mod
if the module contains an abstract interface:

abstract interface
        function func (x,k)
            use psb_base_mod
            implicit none
            real(psb_dpk_)                          :: func
            real(psb_dpk_), intent (in)             :: x   
            integer(psb_ipk_), intent(in), optional :: k 
        end function func
 end interface

If the previous code is commented, then the generation of the documentation works as intended.

I am using Sphinx version 3.2.1 and Sphinx_Fortran 1.1.1

Thank you in advance!

@jhaiduce
Copy link

This appears to be due to a lack of support for abstract interfaces in numpy.f2py. I've opened an issue in numpy: numpy/numpy#18403.

@edwardsmith999
Copy link

edwardsmith999 commented Jun 9, 2022

Hi @jhaiduce , it seems numpy supports this now, is it possible to extend sphinx-fortran? I think related is use of a general public interface to private functions to allow different forms of input, e.g.

interface CPL_send
    module procedure CPL_send_full, CPL_send_min
end interface CPL_send

where inputs are CPL_send_full(a, b, c) or CPL_send_min(a, b) which using Sphinx, breathe, doyxgen combo for C++ on the same interface is documented as

 CPL_send(a, b, c)
 CPL_send(a, b)

I currently get an error:

sphinxfortran.fortran_autodoc.F90toRstException: Unknown function, subroutine or program: cpl_send

@jhaiduce
Copy link

Hi @jhaiduce , it seems numpy supports this now, is it possible to extend sphinx-fortran?

Probably, but I’ll defer to the developers on that question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants