Skip to content

Commit c32a3b4

Browse files
committed
Fixed bug in login functionality - missing validation for empty password field.
1 parent fdcffd9 commit c32a3b4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

braininventory/get.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def today():
5858
else:
5959
print("Error: Failed to fetch JSON data")
6060
return pd.DataFrame()
61-
61+
62+
6263
def __clean_affiliations(df):
6364
# Need to combine the universities so the pie chart shows a single university's total samples under the same area.
6465
# right now there is one area of the pie chart that says 'Allen Institute for Brain Science' and 'Allen Instititute for Brain Science ' (with a space!)
@@ -101,7 +102,7 @@ def __clean_affiliations(df):
101102
del affiliations["University of California, Los Angeles (UCLA)"]
102103
return affiliations
103104

104-
105+
105106
def __get_affiliation_frequency(df):
106107
"""
107108
Get affiliation frequency.
@@ -111,6 +112,7 @@ def __get_affiliation_frequency(df):
111112
"""
112113
return df["affiliation"].value_counts().to_dict()
113114

115+
114116
def __get_number_of_datasets(df):
115117
return len(df)
116118

@@ -221,10 +223,10 @@ def __get_contributors(df):
221223

222224
def __get_project_names(df):
223225
"""
224-
Gets the unique list of project names.
226+
Gets the unique list of project names.
225227
226228
Input: dataframe
227-
Output: list
229+
Output: list
228230
"""
229231
return df["project"].unique()
230232

@@ -250,6 +252,7 @@ def __get_number_of_projects(df):
250252

251253
return len(df["project"].unique())
252254

255+
253256
def get_projects_treemap(df):
254257
"""
255258
Created a code for the visualization of projects frequency
@@ -276,6 +279,7 @@ def __get__percentage_of_metadata_version_1(df):
276279
"""
277280
return len(df[df["metadata_version"] == 1]) / len(df)
278281

282+
279283
def report():
280284
# Get today's date
281285
tdate = date.today()

0 commit comments

Comments
 (0)