artiq icon indicating copy to clipboard operation
artiq copied to clipboard

Access to project, repository, and result path

Open lriesebos opened this issue 3 years ago • 0 comments

@b-bondurant @sbourdeauducq I would like to revisit the topic discussed in #1571 and maybe widen the scope a bit.

I think in essence, we are interested in knowing the following at runtime (with the default ARTIQ directory structure shown below as an example):

  1. The path of the "repository" directory (~/my_project/repository) (#1571)
  2. The path of the "project root" directory (~/my_project/)
  3. The path of the "results" directory, specifically where the HDF5 file of the current experiment will end up (in this example ~/my_project/results/2021-08-23/18)
~/my_project/
|-- repository/
|   |-- experiment_a.py
|-- results/
|   |-- 2021-08-23/
|       |-- 18/
|           |-- 000000001-ExperimentA.h5
|-- dataset_db.pyon
|-- device_db.py

Currently (ARTIQ 6) only the results directory (3.) is easy to find because it will be the current working directory during an experiment that runs through the ARTIQ master, though I am not sure if you are considering to change that. The others can not be reliably obtained at this moment, but are of interest to our software.

Assuming it is reasonable to expose these paths, what would be the best way to serve these? The scheduler virtual device and/or the expid could play a role here, but I am open to other approaches if that fits better in the envisioned software design.

lriesebos avatar Aug 23 '21 23:08 lriesebos