GMLC-1-4-2 / battery_interface

Implemenation of Device Models and their Battery Equivalent Interface
MIT License
5 stars 0 forks source link

Regulation service path issue #48

Closed hlngo closed 5 years ago

hlngo commented 5 years ago

@jingjingliu2018 On Linux or Mac, regulation service build file path using string concatenation:

results_df_dir = dirname(abspath(__file__)) + '\\results\\'
        ensure_ddir(results_df_dir)
        results_df_filename = datetime.now().strftime('%Y%m%d') + '_' + ts_request[0].strftime('%B') + '_2sec_results_' + service_type + '_' + fleet_name + '.csv'
        results_df.to_csv(results_df_dir + results_df_filename)

        # Generate and save plot of the normalized request and response signals for the month
        print('     Plotting monthly response signal')
        plot_dir = dirname(abspath(__file__)) + '\\results\\plots\\'
        ensure_ddir(plot_dir)
        plot_filename = datetime.now().strftime('%Y%m%d') + '_' +\
                        ts_request[0].strftime('%B') +\
                        '_2secnormsignals_' +\
                        service_type +\
                        '_' +\
                        fleet_name + '.png'

Better way of doing that is to use built-in function: os.path.join(). For example: result_path = join(dirname(abspath(__file__)) + 'results')

hlngo commented 5 years ago

@rhosbach You added a new PR to Jingjing repository. Was there any reason why you didn't make a PR directly to the team repos?

jingjingliu2018 commented 5 years ago

Hung, I did a git pull. Is this change available to you now? Jingjing

On Sat, Mar 2, 2019 at 2:09 PM HUNG NGO notifications@github.com wrote:

@rhosbach https://github.com/rhosbach You added a new PR to Jingjing repository. Was there any reason why you didn't make a PR directly to the team repos?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GMLC-1-4-2/battery_interface/issues/48#issuecomment-468965116, or mute the thread https://github.com/notifications/unsubscribe-auth/AlzNqTHfH6Q7a7dSNNCD6NnzENxQvsZXks5vSvaggaJpZM4bPxTR .

-- Jingjing Liu, P.E., CDCP, BEAP, CP EnMS – Industrial, SEP Performance Verifier – Industrial

Program Manager Building & Industrial Applications, Energy Technologies Area Lawrence Berkeley National Laboratory Phone: (510) 486-5410 Email: JingjingLiu@lbl.gov psheaffer@lbl.gov Web: https://industrialapplications.lbl.gov/

hlngo commented 5 years ago

@jingjingliu2018 Yes. It is. Thanks.