mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-07 21:45:43 +09:00
new: add docstrings for module DispatchChecker
This commit is contained in:
parent
f81241a89b
commit
7cf2088b6f
2 changed files with 31 additions and 0 deletions
|
@ -127,3 +127,9 @@ Modules = [DownloadCSVs]
|
|||
```@autodocs
|
||||
Modules = [ClockParser]
|
||||
```
|
||||
|
||||
## `DispatchChecker`
|
||||
|
||||
```@autodocs
|
||||
Modules = [DispatchChecker]
|
||||
```
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue