Additional Setup Information
Configuration Initialization
prismAId offers multiple ways to create review configuration files:
-
Web Initializer: Use the browser-based tool on the Review Configurator page to create TOML configuration files through a user-friendly interface.
-
Template Files: Ready-to-use configuration templates are available in the projects/templates directory for review, screening, and Zotero download tools.
-
Command Line Initializer: Use the binary with the -init flag to create a configuration file through an interactive terminal:
./prismaid -init

Use in Jupyter Notebooks
When using versions <= 0.6.6 it is not possible to disable the prompt asking the user’s confirmation to proceed with the review, leading Jupyter notebooks to crash the python engine and to the impossibility to run reviews with single models (in ensemble reviews, on the contrary, confirmation requests are automatically disabled).
To overcome this problem, it is possible to intercept the IO on the terminal as it follows:
import pty
import os
import time
import select
def run_review_with_auto_input(input_str):
master, slave = pty.openpty() # Create a pseudo-terminal
pid = os.fork()
if pid == 0: # Child process
os.dup2(slave, 0) # Redirect stdin
os.dup2(slave, 1) # Redirect stdout
os.dup2(slave, 2) # Redirect stderr
os.close(master)
import prismaid
prismaid.RunReviewPython(input_str.encode("utf-8"))
os._exit(0)
else: # Parent process
os.close(slave)
try:
while True:
rlist, _, _ = select.select([master], [], [], 5)
if master in rlist:
output = os.read(master, 1024).decode("utf-8", errors="ignore")
if not output:
break # Process finished
print(output, end="")
if "Do you want to continue?" in output:
print("\n[SENDING INPUT: y]")
os.write(master, b"y\n")
time.sleep(1)
finally:
os.close(master)
os.waitpid(pid, 0) # Ensure the child process is cleaned up
# Load your review (TOML) configuration
with open("config.toml", "r") as file:
input_str = file.read()
# Run the review function
run_review_with_auto_input(input_str)