Skip to content

Commit

Permalink
Merge pull request #15 from scholarsportal/jayanthy-dev
Browse files Browse the repository at this point in the history
Renaming Dataverse to Borealis
  • Loading branch information
JayanthyChengan authored Jan 23, 2024
2 parents 3f8010f + 9ab3ad8 commit 9bffc20
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions metrics/config/metrics.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ subject = Monthly metrics for Borealis

[excel]
template = template.xlsx
report = Dataverse Usage Report.xlsx
report = Borealis Usage Report.xlsx
# archive_dir is the base directory containing all the report subdirectories
# A report subdirectory is created every month when the cron job is run. It is in the format: e.g: '$archive_dir/2019-06-01 to 2020-05-31/')
archive_dir = output
Expand All @@ -32,4 +32,4 @@ number_of_time_periods = 2

[configuration]
config_dir = metrics/config/
sql_dir = metrics/sql/
sql_dir = metrics/sql/
4 changes: 2 additions & 2 deletions metrics/excel/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def generate_historical_reports(history):
end_date = datetime.date(_end_date.year, _end_date.month,
calendar.monthrange(_end_date.year, _end_date.month)[1]).strftime(
'%Y-%m-%d')
print('Generating Dataverse Historical Usage Report for period: ' + start_date + ' to ' + end_date)
print('Generating Borealis Historical Usage Report for period: ' + start_date + ' to ' + end_date)
history_start_date = history_start_date + relativedelta(months=1)
periods = periods - 1
Metrics.create(start_date, end_date)
Expand All @@ -55,7 +55,7 @@ def generate_latest_report():
end_date = datetime.date(_end_date.year, _end_date.month,
calendar.monthrange(_end_date.year, _end_date.month)[1]).strftime(
'%Y-%m-%d')
print('Generate Dataverse Usage Report for period: ' + start_date + ' to ' + end_date)
print('Generate Borealis Usage Report for period: ' + start_date + ' to ' + end_date)
Metrics.create(start_date, end_date)

@staticmethod
Expand Down
6 changes: 3 additions & 3 deletions metricsroutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

@app.route('/', methods=['GET'])
def home():
return "<h1>Dataverse Metrics</h1>"
return "<h1>Borealis Metrics</h1>"


@app.route('/api/metrics/list', methods=['GET'])
Expand All @@ -39,7 +39,7 @@ def get_report_by_date():
metricsdate = get_latest_metrics_folder()
filename = request.args.get('filename')
if not filename:
filename = 'Dataverse Usage Report.xlsx'
filename = 'Borealis Usage Report.xlsx'
file = os.path.join(archive_dir, metricsdate, filename)
return send_from_directory(archive_dir, os.path.join(metricsdate, filename), as_attachment=True)

Expand All @@ -54,7 +54,7 @@ def get_latest_metrics_folder():
end_date = datetime.date(_end_date.year, _end_date.month,
calendar.monthrange(_end_date.year, _end_date.month)[1]).strftime(
'%Y-%m-%d')
print('Generate Dataverse Usage Report for period: ' + start_date + ' to ' + end_date)
print('Generate Borealis Usage Report for period: ' + start_date + ' to ' + end_date)
month_sub_dir = os.path.join(start_date + ' to ' + end_date)
print('Subdirectory: ' + month_sub_dir)
return month_sub_dir
Expand Down

0 comments on commit 9bffc20

Please sign in to comment.