latinos / mkShapesRDF

A framework for post processing and shapes creation of CMS data.
https://mkshapesrdf.readthedocs.io/en/latest/index.html
1 stars 5 forks source link

Unable to find start.sh when running configurations in custom paths #8

Closed lviliani closed 7 months ago

lviliani commented 1 year ago

The following line is causing problems if the directory with the configuration files is located in a custom path: https://github.com/latinos/mkShapesRDF/blob/fe44319ba9a29de4f2b076ef7998b80663b4ec6a/mkShapesRDF/shapeAnalysis/BatchSubmission.py#L116

A possible solution could be to use inspect:

import inspect

start_path = os.path.dirname(inspect.getabsfile(inspect.currentframe()))+"/../../start.sh"
with open(start_path) as file:

An alternative could be to define a PROJECT_PATH in the install script and use it in BatchSubmission.py