Allow user-speicified source files with file transfer
As a solution to allow user models to be used this MR specifies additional source files that will be transferred when using the HTCondor file transfer mechanism. When not using the file transfer or running the bash script, the file will need to be manually transferred to the directory the code is being used from (at least for now).
The preferred method is still that these models should be packaged and installed in the environment for reproducibility, but for quick development and usage with shared environments, e.g., CVMFS environments over the OSG this will be useful.
For example, if someone is running from a directory /home/albert.einstein/run_gwpop_analysis
and they have a single self-contained file containing the user model /home/albert.einstein/my_source_models.py
users can do
def custom_mass_model(dataset, alpha, ...):
...
return prob
def custom_spin_model(dataset, beta, ...):
...
return prob
...
all-models={mass: [my_source_models.custom_mass_model], magnitude: [my_source_models.custom_spin_model]}
source-files=[/home/albert.einstein/my_source_models.py]
...
Relative paths can also be used without problems.