msticpy/nbtools/azure_ml_tools.py
def _set_mpconfig_var():
    """Set MSTICPYCONFIG to file in user directory if no other found."""
    mp_path_val = os.environ.get(MP_ENV_VAR)
    if (
        # If a valid MSTICPYCONFIG value is found - return
        (mp_path_val and Path(mp_path_val).is_file())
        # Or if there is a msticpconfig in the current folder.
        or Path(".").joinpath(MP_FILE).is_file()
    ):
        return
    # Otherwise check the user's root folder
    user_dir = get_aml_user_folder()
    mp_path = Path(user_dir).joinpath(MP_FILE)
    if mp_path.is_file():
        # If there's a file there, set the env variable to that.
        os.environ[MP_ENV_VAR] = str(mp_path)
        # Since we have already imported msticpy to check the version
        # it will have already configured settings so we need to refresh.
        refresh_config()
        _disp_html(
            f"<br>No {MP_FILE} found. Will use {MP_FILE} in user folder {user_dir}<br>"
        )
Set MSTICPYCONFIG to file in user directory if no other found.
Set MSTICPYCONFIG to file in user directory if no other found.
Set MSTICPYCONFIG to file in user directory if no other found .
def _set_mpconfig_var():
    mp_path_val = os.environ.get(MP_ENV_VAR)
    if (
        (mp_path_val and Path(mp_path_val).is_file())
        or Path(".").joinpath(MP_FILE).is_file()
    ):
        return
    user_dir = get_aml_user_folder()
    mp_path = Path(user_dir).joinpath(MP_FILE)
    if mp_path.is_file():
        os.environ[MP_ENV_VAR] = str(mp_path)
        refresh_config()
        _disp_html(
            f"<br>No {MP_FILE} found. Will use {MP_FILE} in user folder {user_dir}<br>"
        )
def _set_mpconfig_var ( ) : mp_path_val = os . environ . get ( MP_ENV_VAR ) if ( ( mp_path_val and Path ( mp_path_val ) . is_file ( ) ) or Path ( "." ) . joinpath ( MP_FILE ) . is_file ( ) ) : return user_dir = get_aml_user_folder ( ) mp_path = Path ( user_dir ) . joinpath ( MP_FILE ) if mp_path . is_file ( ) : os . environ [ MP_ENV_VAR ] = str ( mp_path ) refresh_config ( ) _disp_html ( f"<br>No {MP_FILE} found. Will use {MP_FILE} in user folder {user_dir}<br>" )
Set MSTICPYCONFIG to file in user directory if no other found.
Set MSTICPYCONFIG to file in user directory if no other found .
"""Set MSTICPYCONFIG to file in user directory if no other found.""" # If a valid MSTICPYCONFIG value is found - return # Or if there is a msticpconfig in the current folder. # Otherwise check the user's root folder # If there's a file there, set the env variable to that. # Since we have already imported msticpy to check the version # it will have already configured settings so we need to refresh.