-
Notifications
You must be signed in to change notification settings - Fork 1
Adding in the documentation directory #65
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
Merged
+112
−1
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
18d34b8
First parse of readme for documentation
6ced6fe
Adding in a Doxygen markdown
48d97bd
Adding in FORD
be17b78
Fixing table formatting
dleggat 2401545
Removing extraneous file
790f003
Adding link to documentation directory
dleggat a58ed71
Update documentation/ford.md
dleggat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Fortran Documentation | ||
|
||
Building documentation from your source code has widely been used for a long time, and now commonly used tools like Doxygen work with Fortran. | ||
|
||
A number of automated documentation generation projects for Fortran have come and gone over the years, and below are documented a number of them. | ||
At the top of the list are the recommended and still supported documentation tools. | ||
|
||
## Candidate Tools | ||
|
||
| Tool | Description | Known issues | | ||
| ---- | ------ | ----- | | ||
| **Recommended** ||| | ||
| [Doxygen](https://www.doxygen.nl/) | Commonly used documentation tool for large repositories. Officially supports Fortran with language-specific docblocks. See [doxygen.md](doxygen.md) for details on use. | <ul><li> Examples are somewhat outdated </li><li> Support traditionally has not been great </li></ul> | | ||
| [FORD](https://github.com/Fortran-FOSS-Programmers/ford) | Created due to Doxygen's lack of Fortran compatability, FORtran Documentater (FORD) is an independent automatic documenter for modern Fortran. See [ford.md](ford.md) for details on use. | <ul><li> Not the healthiest repository </li><li> Not as feature rich as Doxygen (in principle) </ul> | | ||
| **Dead projects** | | | | ||
| [ROBODoc](https://rfsber.home.xs4all.nl/Robo/) | Automatic parsing of any comment-enabled language into various output formats | <ul><li>Last updated 2021</li><li> Various links no longer work </li><li> Cannot actually extract information correctly from Fortran </li></ul> | | ||
| [Doctran](https://github.com/CPardi/Doctran) | Cross-platform documentation generator specifically designed for Fortran | <ul><li> Last updated 9 years ago </li><li> Homepage examples et al no longer exist </li></ul> | | ||
| [f90tohtml](https://code.google.com/archive/p/f90tohtml/) | | Last revision 2009 | | ||
| [f90doc](https://fortranwiki.org/fortran/show/f90doc) | The basis for FORD | Last revision 2005 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# [Doxygen](https://www.doxygen.nl/) | ||
|
||
The Doxygen tool is a widely-used tool for automatically generating documentation from a codebase. | ||
It | ||
|
||
## Prerequisites | ||
|
||
Min reqs: | ||
|
||
- Python >= 2.7 | ||
- GNU tools `flex`, `bison`, `libiconv` and `GNU make` | ||
- cmake >= 3.14 | ||
|
||
For all features: | ||
- Qt >= 5.14 | ||
- A `latex` distribution | ||
- [Graphvix](https://www.graphviz.org/) >= 2.38 | ||
- [Ghostscipt](https://www.ghostscript.com/) | ||
|
||
## Installation | ||
|
||
Installation is done from source via the Doxygen [download page](https://www.doxygen.nl/download.html). | ||
|
||
Download the latest version for your operating system from that page, and follow the extensive [installation instructions](https://www.doxygen.nl/manual/install.html) provided by Doxyden. | ||
|
||
## Use | ||
|
||
The [User Manual](https://www.doxygen.nl/manual/index.html) is well documented and explains how the documentation keywords are read from docstring blocks. | ||
|
||
There is a brief note on the specific comment style required for Fortran comments in the [Documenting the code](https://www.doxygen.nl/manual/docblocks.html#fortranblocks) section. | ||
A comment block readable by `Doxygen` begins with `!>` or `!<`, and can be continued over multiple lines with `!!` or `!>`. | ||
The usual Doxygen keywords then apply within these blocks. | ||
|
||
An example subroutine would look like: | ||
|
||
```Fortran | ||
!> @brief Write results to an output file | ||
!! @details Writes the generated mesh to a specified output file | ||
!! | ||
!! @param num_nodes Number of nodes to write to the output file | ||
!! @param num_elements Number of elements to write to the output file | ||
!! @param element_to_node Values of the elements to write | ||
!! @param coordinates Co-ordinates of the node points to write | ||
!! @param nodal_value_of_f Nodal value of f | ||
!! @param file_io Output file | ||
subroutine write_output_file(num_nodes,num_elements,element_to_node,coordinates,nodal_value_of_f,file_io) | ||
implicit none | ||
|
||
integer, intent(in) :: num_nodes,num_elements,element_to_node(3,mxp),file_io | ||
real, intent(in) :: nodal_value_of_f(mxp), coordinates(2, mxp) | ||
!... | ||
end subroutine | ||
``` | ||
|
||
### TODO | ||
|
||
Actually implement Doxygen into our repo and check the output... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# [FORD](https://github.com/Fortran-FOSS-Programmers/ford) | ||
|
||
FORtran Documenter (FORD) is an automatic documentation generater designed for Fortran. | ||
|
||
Originally conveived due to Doxygen's historical lack of Fortran support, FORD has turned into a well established and feature-rich documentation project. | ||
See [the FORD repository](https://github.com/Fortran-FOSS-Programmers/ford) for a full description of the features available. | ||
|
||
TODO list some of the useful bits we're interested in here/are unique from Doxygen? | ||
|
||
## Installation | ||
|
||
Installation (and automatic handling of dependencies) can be done through pip: | ||
|
||
```sh | ||
pip install ford | ||
``` | ||
|
||
Installation is also available through Homebrew with the following commands: | ||
|
||
```sh | ||
brew update | ||
brew install FORD | ||
``` | ||
|
||
There is also a spack package available to install FORD: | ||
|
||
```sh | ||
spack install py-ford | ||
``` | ||
|
||
## Use | ||
|
||
I would like to have some examples here, which could be in a sub-directory. | ||
Next Tooling Day, I suppose! | ||
Or if anyone else wants to contribute them... |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started this implementation a while ago in a branch - 32-setup-ford