new: add docstrings for module DispatchChecker

This commit is contained in:
Wataru Otsubo 2024-10-03 14:52:39 +09:00
parent f81241a89b
commit 7cf2088b6f
2 changed files with 31 additions and 0 deletions

View file

@ -127,3 +127,9 @@ Modules = [DownloadCSVs]
```@autodocs
Modules = [ClockParser]
```
## `DispatchChecker`
```@autodocs
Modules = [DispatchChecker]
```

View file

@ -1,3 +1,8 @@
"""
Module to check PSBoard is dispatchable.
Use [`interactive_dispatch_checker`](@ref) for interactive use in QAQC.
"""
module DispatchChecker
using SQLite
@ -7,6 +12,13 @@ using DataFrames
export DbConnection
export is_dispatchable
"""
Stores connection to database.
DbConnection(db::SQLite.DB)
Constructor.
"""
mutable struct DbConnection
db::SQLite.DB
df_single_result::DataFrame
@ -83,6 +95,14 @@ function is_dispatchable(conn::DbConnection, psbid::Int64)
return missing
end
"""
Interactive session for QAQC to check PSBoard is ready for dispatch.
"""
function interactive_dispatch_checker end
"""
interactive_dispatch_checker(conn::DbConnection)
"""
function interactive_dispatch_checker(conn::DbConnection)
dispatch_list = Int64[]
@ -141,6 +161,11 @@ function interactive_dispatch_checker(conn::DbConnection)
return dispatch_list
end
"""
interactive_dispatch_checker(database_file::AbstractString)
Interactive session for QAQC to check provided PSBoard is ready to dispatch.
"""
function interactive_dispatch_checker(database_file::AbstractString)
conn = DbConnection(SQLite.DB(database_file))
interactive_dispatch_checker(conn)