Scaffold devloop package
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
91cbc2872c8ba6d3f5483518d27a3782bd64a247- Parents
-
a7b23e2 - Tree
257beaf
91cbc28
91cbc2872c8ba6d3f5483518d27a3782bd64a247a7b23e2
257beaf| Status | File | + | - |
|---|---|---|---|
| A |
README.md
|
63 | 0 |
| A |
fpm.toml
|
20 | 0 |
| A |
src/fgof_devloop.f90
|
27 | 0 |
| A |
src/fgof_devloop_types.f90
|
10 | 0 |
| A |
test/test_scaffold.f90
|
12 | 0 |
README.mdadded@@ -0,0 +1,63 @@ | ||
| 1 | +# fgof-devloop | |
| 2 | + | |
| 3 | +Watch-driven rebuild, restart, and smoke-loop helpers for modern Fortran tools. | |
| 4 | + | |
| 5 | +`fgof-devloop` is intended to be a small standalone library for the reusable | |
| 6 | +parts of development loops: deciding when file changes should trigger work, | |
| 7 | +tracking run cycles, modeling restart policy, and eventually wiring those | |
| 8 | +decisions to `fgof-watch`, `fgof-process`, and `fgof-jobs`. | |
| 9 | + | |
| 10 | +It is part of the [FortranGoingOnForty lib-modules](https://github.com/FortranGoingOnForty/lib-modules) | |
| 11 | +catalog, but it is intended to stand on its own as a normal `fpm` package. | |
| 12 | + | |
| 13 | +Current v1 target: | |
| 14 | + | |
| 15 | +- stable dev-loop option and state types | |
| 16 | +- deterministic cycle and restart decision helpers | |
| 17 | +- watch-event shaping that can consume `fgof-watch` | |
| 18 | +- process-runner integration that can supervise rebuild and run commands | |
| 19 | +- examples for command-line tools and local service smoke loops | |
| 20 | + | |
| 21 | +## Status | |
| 22 | + | |
| 23 | +Initial scaffold is in place. | |
| 24 | + | |
| 25 | +Tracked today: | |
| 26 | + | |
| 27 | +- package layout, CI, and standalone repo setup | |
| 28 | +- local sprint plan in ignored `.docs/sprints/` | |
| 29 | +- placeholder public API for `fpm test` | |
| 30 | + | |
| 31 | +## Public API Shape | |
| 32 | + | |
| 33 | +Primary modules: | |
| 34 | + | |
| 35 | +- `fgof_devloop` | |
| 36 | +- `fgof_devloop_types` | |
| 37 | + | |
| 38 | +Current public procedures: | |
| 39 | + | |
| 40 | +- `devloop_backend_name` | |
| 41 | +- `clear_devloop_state` | |
| 42 | + | |
| 43 | +## Build And Test | |
| 44 | + | |
| 45 | +```bash | |
| 46 | +fpm test | |
| 47 | +``` | |
| 48 | + | |
| 49 | +## Supported Platforms | |
| 50 | + | |
| 51 | +- macOS | |
| 52 | +- Linux | |
| 53 | + | |
| 54 | +## Boundaries | |
| 55 | + | |
| 56 | +- focused on reusable development-loop mechanics, not a full CLI app | |
| 57 | +- should remain useful on its own even if future tools wrap it with UI policy | |
| 58 | +- watch, process, and job integration should stay layered over stable state | |
| 59 | + transitions | |
| 60 | + | |
| 61 | +## License | |
| 62 | + | |
| 63 | +MIT | |
fpm.tomladded@@ -0,0 +1,20 @@ | ||
| 1 | +name = "fgof-devloop" | |
| 2 | +version = "0.1.0" | |
| 3 | +license = "MIT" | |
| 4 | +author = "FortranGoingOnForty" | |
| 5 | +maintainer = "FortranGoingOnForty" | |
| 6 | +copyright = "2026" | |
| 7 | +description = "Watch-driven development loop helpers for modern Fortran tools" | |
| 8 | + | |
| 9 | +[build] | |
| 10 | +auto-executables = false | |
| 11 | +auto-tests = true | |
| 12 | +auto-examples = false | |
| 13 | + | |
| 14 | +[install] | |
| 15 | +library = true | |
| 16 | + | |
| 17 | +[fortran] | |
| 18 | +implicit-typing = false | |
| 19 | +implicit-external = false | |
| 20 | +source-form = "free" | |
src/fgof_devloop.f90added@@ -0,0 +1,27 @@ | ||
| 1 | +module fgof_devloop | |
| 2 | + use fgof_devloop_types, only : devloop_state | |
| 3 | + implicit none | |
| 4 | + private | |
| 5 | + | |
| 6 | + character(len=*), parameter :: FGOF_DEVLOOP_BACKEND_MODEL = "model" | |
| 7 | + | |
| 8 | + public :: clear_devloop_state | |
| 9 | + public :: devloop_backend_name | |
| 10 | + public :: devloop_state | |
| 11 | + | |
| 12 | +contains | |
| 13 | + | |
| 14 | + function clear_devloop_state() result(state) | |
| 15 | + type(devloop_state) :: state | |
| 16 | + | |
| 17 | + state%cycle_count = 0 | |
| 18 | + state%active = .false. | |
| 19 | + end function clear_devloop_state | |
| 20 | + | |
| 21 | + function devloop_backend_name() result(name) | |
| 22 | + character(len=:), allocatable :: name | |
| 23 | + | |
| 24 | + name = FGOF_DEVLOOP_BACKEND_MODEL | |
| 25 | + end function devloop_backend_name | |
| 26 | + | |
| 27 | +end module fgof_devloop | |
src/fgof_devloop_types.f90added@@ -0,0 +1,10 @@ | ||
| 1 | +module fgof_devloop_types | |
| 2 | + implicit none | |
| 3 | + private | |
| 4 | + | |
| 5 | + type, public :: devloop_state | |
| 6 | + integer :: cycle_count = 0 | |
| 7 | + logical :: active = .false. | |
| 8 | + end type devloop_state | |
| 9 | + | |
| 10 | +end module fgof_devloop_types | |
test/test_scaffold.f90added@@ -0,0 +1,12 @@ | ||
| 1 | +program test_scaffold | |
| 2 | + use fgof_devloop, only : clear_devloop_state, devloop_backend_name | |
| 3 | + use fgof_devloop_types, only : devloop_state | |
| 4 | + implicit none | |
| 5 | + | |
| 6 | + type(devloop_state) :: state | |
| 7 | + | |
| 8 | + state = clear_devloop_state() | |
| 9 | + if (state%cycle_count /= 0) error stop "devloop state should start with no cycles" | |
| 10 | + if (state%active) error stop "devloop state should start inactive" | |
| 11 | + if (devloop_backend_name() /= "model") error stop "devloop backend should report model" | |
| 12 | +end program test_scaffold | |