When running multiple experiments in the lab, it's good to have a way to divide and conquer. Entropy allows you to divides such work packages into project
s.
When working from the command prompt, initializing a project is similar to initializing a git repository. You need to create a new folder for your project, change the working directory to that folder and then use the entropy Command Line Interface (CLI) to initialize the project.
mkdir my_proj
cd my_proj
entropy init
The directory will now contain a .entropy
sub-directory where the sqlite database file and the hdf5 data
file are stored. The project directory's name is effectively the project's name.
📁 my_proj <--- project directory
📁 .entropy
📄 entropy.db
📄 entropy.hdf5
You can then place the experiment files under my_proj
:
📁 my_proj <--- project directory
📁 .entropy
📄 entropy.db
📄 entropy.hdf5
📄 experiment1.py
📄 experiment2.py
The entropy CLI in installed when you install entropy with pip
.
pip install entropylab
The CLI currently support two commands: init
and upgrade
.
entropy init <path to project directory>
Initializes a new project in the given directory (as described above)
entropy upgrade <path to sqlite db file>
Takes an entropy db that predates the project structure (before version 0.3.0) and updates it as needed.
These are the steps executed:
- Moves the
.db
file (and corresponding.hdf5
file, if it exists) to a new project directory. The directory name will be the original.db
file's name. - Upgrades the
.db
file to the latest version of Entropy (if needed). - Migrates experiment results and metadata from the
.db
file to.hdf5
(if needed).