Fortran-FOSS-Programmers / Fortran-FOSS-Programmers/ford

Using ford with an existing project

Open
#475 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
458
Forks
138
PR merge metrics
No merged PRs in 30d

Description

I have inherited a very large fortran project and for my own sanity I would like to have some good documentation. I think ford is the right answer.

I am trying to slowly migrate this project over to but I'm to get some advice for how to do this. If I try and run ford on the whole codebase, I get a bunch of parsing errors `'NoneType' object is not subscriptable`.

I also get `Unexpected SUBROUTINE` messages which end up throwing a `NotImplementedError()` which results in

```
File "C:\Users\John.Runburg\AppData\Local\Programs\Python\Python311\Lib\site-packages\ford\fortran_project.py", line 121, in __init__
print(f"Warning: Error parsing {relative_path}.\n\t{e.args[0]}")
~~~~~~^^^
IndexError: tuple index out of range
```
and `Unexpected variable` messages which result in the same as above.

If I throw out only focus on the source files that do not result in these parsing issues, ford makes it to `Correlating information from different parts of your project...` and then throws the error
```
File "C:\Users\John.Runburg\AppData\Local\Programs\Python\Python311\Lib\site-packages\ford\fortran_project.py", line 234, in
module: set(module.deplist)
^^^^^^^^^^^^^^
AttributeError: 'FortranSubmodule' object has no attribute 'deplist'
```

The codebase is written almost entirely in modern fortran. But are there certain features that ford will get hung up on or that commonly cause these kind of problems.

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.