#NEWLINE# def get_project_name( working_dir , project_name = None , environment = None ) : #NEWLINE# #INDENT# def normalize_name( name ) : #NEWLINE# #INDENT# return re . sub ( '[^a-z0-9]' , '' , name . lower ( ) ) #NEWLINE# #UNINDENT# if ( not environment ) : #NEWLINE# #INDENT# environment = Environment . from_env_file ( working_dir ) #NEWLINE# #UNINDENT# project_name = ( project_name or environment . get ( 'COMPOSE_PROJECT_NAME' ) ) #NEWLINE# if project_name : #NEWLINE# #INDENT# return normalize_name ( project_name ) #NEWLINE# #UNINDENT# project = os . path . basename ( os . path . abspath ( working_dir ) ) #NEWLINE# if project : #NEWLINE# #INDENT# return normalize_name ( project ) #NEWLINE# #UNINDENT# return 'default'