Ford, Fortran documentation generator, new major release v7.0.0

This is a new major version of the Ford documentation generator with many new features:

  • CSS Bootstrap framework has been updated to 5.3, removing use of deprecated JQuery 2.1.3
    • This might break your custom CSS, sorry!
  • Namelists are now processed and documented on their own pages (thanks to work by University of York undergraduate Kieran Bell)
  • Ford options can now be set in fpm.toml files (thanks to work by University of York undergraduate Ella Saunders)
  • All options can now be overridden on the command line using the --config flag
  • Fixed some long standing bugs with notes (thanks to work by University of York undergraduate Mia Jones)
  • Fixed many issues with graphs (by JosephWood2001)
  • Better handling of inter-documentation links
  • Fixed a long standing bug with linking to deep static pages using the |page| alias
  • Use the rich library for prettier and more informative progress bars

and many, many bug fixes!

22 Likes

I tried it on the example and edited the fixed-form source file (ford_77_example.f) to see if an earlier problem I had run into was gone. Indeed, it seems to work properly with long lines. This offers possibilities :slight_smile:

However, I did note a peculiarity: the file appears twice in the overview. This seems related to the .f extension. Adding more fixed form files leads to each name appearing twice…

Oh dear, thanks for letting me know, I’ll look into it!

You’re welcome :slight_smile:

Hm, I applied the new version to an actual program and ran into problems. This was with a fixed-form source file. I can try and construct a minimal test case.

I’ve just released 7.0.1 which fixes duplicated source files on case insensitive filesystems.

1 Like

Here is the minimal test case:

      subroutine agr_hyd_step(input_hyd, ipnt, ipnt_q, ipnt_vdf, ipnt_tau, output_hyd)

      ! function : aggregeate one hydrodynamic step
      real, parameter     :: rmiss = -999.

      return
      end

It is in a fixed-form source file. I get errors about the “real” statement and about “end”. Renaming it to .f90 solves the problems. Well, for this case :slight_smile:

It feels like Ford’s original bootstrap-3 style is much more nice looking than the current bootstrap-5. :wink:

I do prefer much more the new style, guess it’s a matter of taste. What would be nice is different CSS templates to provide different “themes”, as sphinx does. But, knowing how much I hate web design, I do love the default style!

@Arjen This looks to be because it’s hitting the 72-character limit for fixed-form Fortran. If you run ford like:

ford project.md --config="fixed_length_limit=false"

then it should work. You can also set this option permanently in your config file. It might make sense for Ford to flip the default for this value, you’re not the first person to bump into it!

@zoziha @fedebenelli The style is definitely a matter of personal preference :slight_smile:
Adding themes would be nice, but I would quite like to go even further and enable Ford as a plugin to Sphinx itself, in order to benefit from all of their lovely features!

4 Likes

Thanks, I will try with that option!

That would be really amazing!

Yes, that works. This opens the way for some more experimentation :slight_smile:

This would be AWESOME !! :slight_smile: