Skip to content

Commit 2289f35

Browse files
committed
Merge branch 'main' into rm-macros
2 parents ea2d8a5 + f4b37ca commit 2289f35

File tree

4 files changed

+86
-7
lines changed

4 files changed

+86
-7
lines changed

.github/workflows/CI.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
6+
jobs:
7+
Build:
8+
runs-on: [ubuntu-22.04]
9+
10+
env:
11+
FC: gfortran
12+
GCC_V: 12
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- uses: fortran-lang/setup-fpm@v3
19+
with:
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Install Dependencies Ubuntu
23+
if: contains(matrix.os, 'ubuntu')
24+
run: |
25+
sudo apt-get update
26+
sudo apt install -y gfortran-${GCC_V} build-essential
27+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
28+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
29+
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
30+
31+
- name: Build and Test
32+
run: |
33+
fpm test

.github/workflows/deploy-docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Deploy Documentation
2+
3+
on: [push, pull_request]
4+
5+
6+
jobs:
7+
Build:
8+
runs-on: ubuntu-22.04
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Install Dependencies Ubuntu
15+
run: |
16+
sudo apt-get update
17+
sudo apt install -y python3-dev python3 build-essential graphviz gfortran-12
18+
sudo pip install ford
19+
20+
- name: Build Developer Documenation
21+
run: |
22+
ford doc-generator.md
23+
24+
- name: Upload Documentation
25+
uses: actions/upload-artifact@v2
26+
with:
27+
name: documentation
28+
path: doc/html
29+
if-no-files-found: error
30+
31+
- name: Broken Link Check
32+
if: ${{ github.ref == 'refs/heads/main'}}
33+
uses: technote-space/broken-link-checker-action@v1
34+
with:
35+
TARGET: file://${{ github.workspace }}/doc/html/index.html
36+
RECURSIVE: true
37+
ASSIGNEES: ${{ github.actor }}
38+
39+
- name: Deploy API Documentation
40+
uses: JamesIves/[email protected]
41+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
42+
with:
43+
branch: gh-pages
44+
folder: doc/html

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@ The `characterizable_t` type defines an `as_character()` deferred binding that p
2828

2929
The `intrinsic_array_t` type that extends `characterizable_t` provides a convenient mechanism for producing diagnostic output from arrays of intrinsic type `complex`, `integer`, `logical`, or `real`.
3030

31+
Documentation
32+
-------------
33+
See [Assert's GitHub Pages site] for HTML documentation generated with [`ford`].
34+
3135
Use Cases
3236
---------
37+
Two common use cases include
38+
3339
1. [Enforcing programming contracts] throughout a project via runtime checks.
34-
2. Produce output in `pure` procedures for debugging purposes.
40+
2. Producing output in `pure` procedures for debugging purposes.
3541

3642
### Enforcing programming contracts
3743
Programming can be thought of as requirements for correct execution of a procedure and assurances for the result of correct execution.
@@ -103,3 +109,5 @@ For further documentation, please see [example/README.md] and the [tests]. Also
103109
[FORD]: https://github.com/Fortran-FOSS-Programmers/ford
104110
[Fortran Package Manager]: https://github.com/fortran-lang/fpm
105111
[OCL]: https://en.wikipedia.org/wiki/Object_Constraint_Language
112+
[Assert's GitHub Pages site]: https://sourceryinstitute.github.io/assert/
113+
[`ford`]: https://github.com/Fortran-FOSS-Programmers/ford

src/assert_s.F90 renamed to src/assert_s.f90

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@
5656

5757
end if toggle_assertions
5858

59-
#ifndef FORD
6059
contains
61-
#else
62-
end procedure
63-
#endif
6460

6561
pure function string(numeric) result(number_as_string)
6662
!! Result is a string represention of the numeric argument
@@ -86,8 +82,6 @@ pure function string(numeric) result(number_as_string)
8682

8783
end function string
8884

89-
#ifndef FORD
9085
end procedure
91-
#endif
9286

9387
end submodule

0 commit comments

Comments
 (0)