schrodinger.application.utils module

Utility functions for finding python packages in product directories.

schrodinger.application.utils.add_package_dir_to_path(path, product_dir_name, subdir='')

Adds product specific directory to __path__ or raises an ImportError if no such directory exists

Parameters:
  • path (list of str) – __path__ of the calling module

  • product_dir_name (str) – The product subdirectory name of the SCHRODINGER directory, without the “-v*” version suffix (e.g. ‘psp).

  • subdir (str) – Specifies the subdirectory of the product python packages directory that should be added to the product package directory. Use this if the product package directory has packages you want to ignore (e.g. ‘schrodinger.application.prime.packages’).

Note

New callers must also add the (product_dir_name, subdir) pair to _PRODUCT_PACKAGE_SUBDIRS in schrodinger/test/test_markers.py so module_require_product skips guarded tests cleanly when the python_packages subtree is missing.

schrodinger.application.utils.find_full_product_version(product_name)
schrodinger.application.utils.find_product_package_dir(product_dir_name, subdir='')
schrodinger.application.utils.get_maestro_profile() str

Get the Maestro profile name.