Running your code headlessly

A primer on what will and will not run on Code Ocean

Shahar Zaks avatar
Written by Shahar Zaks
Updated over a week ago

Computational reproducibility is the backbone of Code Ocean. In practice, this means that all published analyses should be set to run headlessly -- meaning without user input during runtime, and also without any display popping up while code is executing. User input during runtime is difficult to record with high fidelity, and therefore difficult to map neatly to a set of published results.  

In light of this, before publishing, please adapt any code that requires user input -- such as selecting points on a screen, or options from a menu -- to either accept inputs at the outset or to select inputs on a user's behalf.

In practice, this means that your run script should execute all of your code without requiring any user input or selection, and without pausing in the middle; and it should save files explicitly to the /results folder.

Did this answer your question?