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

Integration with Sphinx #662

Open
astroDimitrios opened this issue Sep 4, 2024 · 5 comments
Open

Integration with Sphinx #662

astroDimitrios opened this issue Sep 4, 2024 · 5 comments

Comments

@astroDimitrios
Copy link

It would be nice if Ford had a way to easily integrate its API docs with Sphinx based user docs. Will get back to this when I'm home from RSECon!

@clatim
Copy link

clatim commented Dec 14, 2024

Did you get anywhere? I would be interested in helping with this.

@p-costa
Copy link

p-costa commented Dec 14, 2024

There's also this discussion started by @jalvesz.

@ZedThree
Copy link
Member

I think there's basically two parts to getting this working:

  1. Creating a set of Sphinx classes for rendering the docs
    • This would let users manually write docs in Sphinx
    • Sphinx tutorial on reference domains -- unfortunately rather brief!
    • There is already one fortran sphinx extension, although I found it rather fragile and incomplete. It also has an unusual licence that might mean building on top of it rather difficult. Probably worth looking into though!
  2. Converting Ford classes into the relevant Sphinx classes
    • This would then let us do the automatic conversion

A third aspect might be converting the existing Ford HTML templates into a roughly equivalent Sphinx theme.

Step 1 would let us manually write something like:

.. fortran:function: foo

   Some function foo

   :param integer, intent(in) a: first argument
   :param integer, intent(inout) b: second argument
   :return: the foo of a and b
   :rtype: integer

and step 2 would convert Ford classes into that text.

@jalvesz, @clatim, @astroDimitrios if you're all still interested in working on this, I'd be happy to give you write access to the repo so we could better collaborate -- maybe we have a call in the new year to discuss? My email is in my profile if you want to get in touch.

@jalvesz
Copy link

jalvesz commented Dec 16, 2024

I had indeed started to work on this here https://github.com/jalvesz/fspx (I just made it public to help this discussion) it is in a very drafty state and currently doesn't use FORD but fparser2 as the backend. I wouldn't mind at all dropping that project in order to improve FORD to make it a sphinx extension.

GitHub
Contribute to jalvesz/fspx development by creating an account on GitHub.

@astroDimitrios
Copy link
Author

@ZedThree I would still like to help with this, you have my email and a meeting in the new year sounds good :)

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

No branches or pull requests

5 participants