mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +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
|
```@autodocs
|
||||||
Modules = [ClockParser]
|
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
|
module DispatchChecker
|
||||||
|
|
||||||
using SQLite
|
using SQLite
|
||||||
|
@ -7,6 +12,13 @@ using DataFrames
|
||||||
export DbConnection
|
export DbConnection
|
||||||
export is_dispatchable
|
export is_dispatchable
|
||||||
|
|
||||||
|
"""
|
||||||
|
Stores connection to database.
|
||||||
|
|
||||||
|
DbConnection(db::SQLite.DB)
|
||||||
|
|
||||||
|
Constructor.
|
||||||
|
"""
|
||||||
mutable struct DbConnection
|
mutable struct DbConnection
|
||||||
db::SQLite.DB
|
db::SQLite.DB
|
||||||
df_single_result::DataFrame
|
df_single_result::DataFrame
|
||||||
|
@ -83,6 +95,14 @@ function is_dispatchable(conn::DbConnection, psbid::Int64)
|
||||||
return missing
|
return missing
|
||||||
end
|
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)
|
function interactive_dispatch_checker(conn::DbConnection)
|
||||||
dispatch_list = Int64[]
|
dispatch_list = Int64[]
|
||||||
|
|
||||||
|
@ -141,6 +161,11 @@ function interactive_dispatch_checker(conn::DbConnection)
|
||||||
return dispatch_list
|
return dispatch_list
|
||||||
end
|
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)
|
function interactive_dispatch_checker(database_file::AbstractString)
|
||||||
conn = DbConnection(SQLite.DB(database_file))
|
conn = DbConnection(SQLite.DB(database_file))
|
||||||
interactive_dispatch_checker(conn)
|
interactive_dispatch_checker(conn)
|
||||||
|
|
Loading…
Add table
Reference in a new issue