gen_run_utils.cpp 1.2 KB

123456789101112131415161718192021222324252627282930
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2021 by
  4. * The Salk Institute for Biological Studies
  5. *
  6. * Use of this source code is governed by an MIT-style
  7. * license that can be found in the LICENSE file or at
  8. * https://opensource.org/licenses/MIT.
  9. *
  10. ******************************************************************************/
  11. #include <sstream>
  12. #include "api/pybind11_stl_include.h"
  13. #include "api/python_export_utils.h"
  14. #include "gen_run_utils.h"
  15. namespace MCell {
  16. namespace API {
  17. void define_pybinding_run_utils(py::module& m) {
  18. m.def_submodule("run_utils")
  19. .def("get_last_checkpoint_dir", &run_utils::get_last_checkpoint_dir, py::arg("seed"), "Searches the directory checkpoints for the last checkpoint for the given \nparameters and returns the directory name if such a directory exists. \nReturns empty string if no checkpoint directory was found.\nCurrently supports only the seed argument.\n\n- seed\n")
  20. .def("remove_cwd", &run_utils::remove_cwd, py::arg("paths"), "Removes all directory names items pointing to the current working directory from a list and \nreturns a new list.\n\n- paths\n")
  21. ;
  22. }
  23. } // namespace API
  24. } // namespace MCell