Skip to content

Commit e034ad4

Browse files
authored
Add automatic documentation for Fortran fpm (#209)
- create docs.md as input for FORD - fix docstrings and comment style for FORD - workaround FORD bug by adding whitespace to table headers - add manifest reference to FORD pages - apply ugly workaround to not replace array of tables with links
1 parent d569a89 commit e034ad4

19 files changed

+191
-135
lines changed

PACKAGING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ copyright = "2020 Jane Programmer"
456456
[library]
457457
source-dir="src"
458458

459-
[[executable]]
459+
[[ executable ]]
460460
name="math_constants"
461461
source-dir="app"
462462
main="main.f90"
@@ -487,12 +487,12 @@ copyright = "2020 Jane Programmer"
487487
[library]
488488
source-dir="src"
489489

490-
[[executable]]
490+
[[ executable ]]
491491
name="math_constants"
492492
source-dir="app"
493493
main="main.f90"
494494

495-
[[test]]
495+
[[ test ]]
496496
name="runTests"
497497
source-dir="test"
498498
main="main.f90"
@@ -546,12 +546,12 @@ source-dir="src"
546546
[dependencies]
547547
helloff = { git = "https://gitlab.com/everythingfunctional/helloff.git" }
548548

549-
[[executable]]
549+
[[ executable ]]
550550
name="math_constants"
551551
source-dir="app"
552552
main="main.f90"
553553

554-
[[test]]
554+
[[ test ]]
555555
name="runTests"
556556
source-dir="test"
557557
main="main.f90"
@@ -601,14 +601,14 @@ copyright = "2020 Jane Programmer"
601601
[library]
602602
source-dir="src"
603603

604-
[[executable]]
604+
[[ executable ]]
605605
name="math_constants"
606606
source-dir="app"
607607
main="main.f90"
608608
[executable.dependencies]
609609
helloff = { git = "https://gitlab.com/everythingfunctional/helloff.git" }
610610

611-
[[test]]
611+
[[ test ]]
612612
name="runTests"
613613
source-dir="test"
614614
main="main.f90"
@@ -633,12 +633,12 @@ source-dir="src"
633633
[dev-dependencies]
634634
helloff = { git = "https://gitlab.com/everythingfunctional/helloff.git" }
635635

636-
[[executable]]
636+
[[ executable ]]
637637
name="math_constants"
638638
source-dir="app"
639639
main="main.f90"
640640

641-
[[test]]
641+
[[ test ]]
642642
name="runTests"
643643
source-dir="test"
644644
main="main.f90"

doc/Contributing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Contributing Guidelines
3+
---
4+
5+
{!CONTRIBUTING.md!}

doc/License.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: License
3+
---
4+
5+
{!LICENSE!}

doc/Manifest.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Manifest reference
3+
---
4+
5+
{!manifest-reference.md!}
6+

doc/Packaging.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Packaging with fpm
3+
---
4+
5+
{!PACKAGING.md!}

doc/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: Packaging and contributing
3+
---

doc/media/favicon.ico

16.6 KB
Binary file not shown.

docs.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
project: Fortran-lang/fpm
3+
summary: Fortran Package Manager
4+
project_github: https://github.com/fortran-lang/fpm
5+
project_download: https://github.com/fortran-lang/fpm/archive/master.zip
6+
author: fortran-lang/fpm contributors
7+
author_pic: https://fortran-lang.org/assets/img/fortran_logo_512x512.png
8+
author_email: [email protected]
9+
github: https://github.com/fortran-lang
10+
twitter: https://twitter.com/fortranlang
11+
website: https://fortran-lang.org
12+
src_dir: ./fpm/src
13+
output_dir: ./fpm-doc
14+
page_dir: ./doc
15+
media_dir: ./doc/media
16+
exclude_dir: ./bootstrap
17+
./archive
18+
./test
19+
display: public
20+
protected
21+
source: true
22+
proc_internals: true
23+
sort: permission-alpha
24+
favicon: doc/media/favicon.ico
25+
print_creation_date: true
26+
extra_mods: iso_fortran_env:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html
27+
creation_date: %Y-%m-%d %H:%M %z
28+
md_extensions: markdown.extensions.toc
29+
markdown.extensions.smarty
30+
---
31+
32+
[TOC]

fpm/src/fpm.f90

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ subroutine cmd_run(settings)
321321
stop
322322
endif
323323
else
324-
!*! expand names, duplicates are a problem??
324+
! expand names, duplicates are a problem??
325325
allocate(foundit(size(settings%name)))
326326
foundit=.false.
327327
FINDIT: do i=1,size(package%executable)
@@ -341,10 +341,10 @@ subroutine cmd_run(settings)
341341
if(allocated(foundit))deallocate(foundit)
342342
endif
343343
do i=1,size(newwords)
344-
!*! list is a new option for use with xargs, to move files to production area, valgrind, gdb, ls -l, ....
345-
!*! maybe add as --mask and could do --mask 'echo %xx' or --mask 'cp %XX /usr/local/bin/' an so on
346-
!*! default if blank would be filename uptodate|needs|updated|doesnotexist creation_date, ...
347-
!*! or maybe just list filenames so can pipe through xargs, and so on
344+
! list is a new option for use with xargs, to move files to production area, valgrind, gdb, ls -l, ....
345+
! maybe add as --mask and could do --mask 'echo %xx' or --mask 'cp %XX /usr/local/bin/' an so on
346+
! default if blank would be filename uptodate|needs|updated|doesnotexist creation_date, ...
347+
! or maybe just list filenames so can pipe through xargs, and so on
348348
if(settings%list)then
349349
write(stderr,'(*(g0,1x))')'fpm::run<INFO>:executable expected at',newwords(i),&
350350
& merge('exists ','does not exist',exists(newwords(i)))
@@ -403,7 +403,7 @@ subroutine cmd_test(settings)
403403
stop
404404
endif
405405
else
406-
!*! expand names, duplicates are a problem??
406+
! expand names, duplicates are a problem??
407407
allocate(foundit(size(settings%name)))
408408
foundit=.false.
409409
FINDIT: do i=1,size(package%test)
@@ -423,10 +423,10 @@ subroutine cmd_test(settings)
423423
if(allocated(foundit))deallocate(foundit)
424424
endif
425425
do i=1,size(newwords)
426-
!*! list is a new option for use with xargs, to move files to production area, valgrind, gdb, ls -l, ....
427-
!*! maybe add as --mask and could do --mask 'echo %xx' or --mask 'cp %XX /usr/local/bin/' an so on
428-
!*! default if blank would be filename uptodate|needs|updated|doesnotexist creation_date, ...
429-
!*! or maybe just list filenames so can pipe through xargs, and so on
426+
! list is a new option for use with xargs, to move files to production area, valgrind, gdb, ls -l, ....
427+
! maybe add as --mask and could do --mask 'echo %xx' or --mask 'cp %XX /usr/local/bin/' an so on
428+
! default if blank would be filename uptodate|needs|updated|doesnotexist creation_date, ...
429+
! or maybe just list filenames so can pipe through xargs, and so on
430430
if(settings%list)then
431431
write(stderr,'(*(g0,1x))')'fpm::run<INFO>:test expected at',newwords(i),&
432432
& merge('exists ','does not exist',exists(newwords(i)))

fpm/src/fpm/cmd/new.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ subroutine cmd_new(settings)
3838

3939
! change to new directory as a test. System dependent potentially
4040
call run('cd '//settings%name)
41-
!*! NOTE: need some system routines to handle filenames like "."
42-
!*! like realpath() or getcwd().
41+
! NOTE: need some system routines to handle filenames like "."
42+
! like realpath() or getcwd().
4343
bname=basename(settings%name)
4444

4545
! create NAME/.gitignore file

0 commit comments

Comments
 (0)