Closed filchos closed 1 year ago
The code in website/lib/make_xlsx.py uses methods that access the database of the logging system, e.g. by using the function get_data.
website/lib/make_xlsx.py
get_data
The import statement for these functions however is commented out:
#from website.database.get_data import get_data, get_personnel_list, get_cruise
Since template generator should be completely independent from the logging system, no DB calls should be executed in the function.
Instead of
def do_something(DB=None): data = get_data(DB …) do_stuff(data) do_something(DB)
This can help to make the template generator more self-containing:
def do_something(data): do_stuff(data) data = get_data(DB …) do_something(data)
The code in
website/lib/make_xlsx.py
uses methods that access the database of the logging system, e.g. by using the functionget_data
.The import statement for these functions however is commented out:
Since template generator should be completely independent from the logging system, no DB calls should be executed in the function.
Instead of
This can help to make the template generator more self-containing: