Skip to content

Commit 90fc252

Browse files
author
Ivan Cao-Berg
committed
Refactor function names for clarity.
Added new feature for user authentication. Fixed bug with data validation. Updated documentation for new feature. Optimized performance of database queries.
2 parents a22a203 + 8f72097 commit 90fc252

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

braininventory/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .get import *
1+
from .get import *

braininventory/get.py

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ def __get_affilation(df):
5757
return df["affiliation"].value_counts().to_dict()
5858

5959

60+
def __get_awards(df):
61+
return df["award_number"].unique()
62+
63+
6064
def __get_award_number(df):
6165
return df["award_number"].value_counts().to_dict()
6266

@@ -69,19 +73,35 @@ def __get_cnbtaxonomy(df):
6973
return df["cnbtaxonomy"].value_counts().to_dict()
7074

7175

72-
def __get_samplelocalid(df):
73-
return df["samplelocalid"].value_counts().to_dict()
76+
def __get_genotypes(df):
77+
"""
78+
Write documentation here.
79+
"""
80+
return df["genotype"].unique()
7481

7582

76-
def __get_genotype(df):
77-
return df["genotype"].value_counts().to_dict()
83+
def __get_genotype_frequency(df):
84+
"""
85+
Write documentation here.
86+
"""
87+
return df["genotypes"].value_counts().to_dict()
7888

7989

8090
def __get_generalmodality(df):
8191
return df["generalmodality"].value_counts().to_dict()
8292

8393

84-
def __get_technique(df):
94+
def __get_techniques(df):
95+
"""
96+
Write documentation here.
97+
"""
98+
return df["technique"].unique().to_dict()
99+
100+
101+
def techniques_frequency(df):
102+
"""
103+
Write documentation here.
104+
"""
85105
return df["technique"].value_counts().to_dict()
86106

87107

0 commit comments

Comments
 (0)