Project metadata
The optional [project] section lets you embed project metadata directly in the fobos file. FoBiS.py reads this section to provide version information and project details — independently of any build mode.
Syntax
ini
[project]
name = My Fortran Project
summary = A brief description of what the project does
version = 1.2.3
repository = https://github.com/user/my-fortran-project
website = https://user.github.io/my-fortran-project
email = maintainer@example.com
authors = Stefano Zaghi
Jane Doe
John SmithAll options are optional. The section itself is optional.
Options
| Option | Type | Description |
|---|---|---|
name | string | Human-readable name of the project |
summary | string | One-line description of what the project does |
version | string or file path | Project version (see Version resolution) |
repository | string | URL of the remote git repository (GitHub, GitLab, Codeberg, …) |
website | string | URL of the project website or documentation site |
email | string | Email address of the project maintainer |
authors | list of strings | One author per line (continuation lines indented with whitespace) |
Authors
Authors are written one per line using standard INI continuation syntax — each subsequent line must be indented:
ini
[project]
authors = Stefano Zaghi
Jane Doe
John SmithVersion resolution
The version option is resolved by get_version() following these steps:
- Literal value — if the value does not match a file path, it is used as-is.
- File path — if the value is a path relative to the git repository root that points to an existing file, the version string is read from that file. Useful when the version is maintained in a dedicated file (e.g.
VERSIONorsrc/version.f90). vprefix normalisation — the resolved fobos version is always returned with avprefix (added automatically if absent).- Git tag fallback — if
versionis not set in fobos, the most recent git tag is returned viagit describe --tags --abbrev=0.
Mismatch warning
When both the fobos version and a git tag are present and they disagree, FoBiS.py emits a warning with two actionable fix suggestions:
Warning: project version mismatch!
fobos [project] version : v1.2.3
git tag version : v1.2.4
To fix, either:
- update fobos: set version = v1.2.4 under [project]
- create a matching tag: git tag v1.2.3 && git push --tagsVersion file example
ini
[project]
version = VERSIONVERSION (at the git repository root):
1.2.3FoBiS.py reads the file and normalises the result to v1.2.3.
Full example
ini
[project]
name = PENF
summary = Portability Environment for Fortran poor people
version = VERSION
repository = https://github.com/szaghi/PENF
website = https://szaghi.github.io/PENF
email = stefano.zaghi@cnr.it
authors = Stefano Zaghi
[modes]
modes = debug release
[debug]
compiler = gnu
cflags = -c -O0 -g -Wall
build_dir = ./build/debug/
[release]
compiler = gnu
cflags = -c -O3
build_dir = ./build/release/