Browse Source

more documentation

Lucas Gautheron 2 years ago
parent
commit
32f577c562
3 changed files with 33 additions and 8 deletions
  1. 24 7
      EL1000/metadata.py
  2. 8 0
      README.md
  3. 1 1
      setup.py

+ 24 - 7
EL1000/metadata.py

@@ -26,13 +26,30 @@ def fake_dob(row):
 class MetadataImporter:
 
     def __init__(self,
-        experiment,
-        metadata,
-        preserve_dates = False,
-        recompute_ages = False,
-        preserve_metadata = False,
-        split_sessions = False,
-        weekend_flag = False):
+        experiment: str,
+        metadata: str,
+        preserve_dates: bool = False,
+        recompute_ages: bool = False,
+        preserve_metadata: bool = False,
+        split_sessions: bool = False,
+        weekend_flag: bool = False):
+        """MetadataImporter
+
+        :param experiment: corpus name
+        :type experiment: str
+        :param metadata: path to existing metadata csv file
+        :type metadata: str
+        :param preserve_dates: preserve true dates instead of setting children date of birth to 1000-01-01 and all recording dates accordingly, defaults to False
+        :type preserve_dates: bool, optional
+        :param recompute_ages: extract children date of birth from the its and recompute ages, defaults to False
+        :type recompute_ages: bool, optional
+        :param preserve_metadata: preserve languages spoken metadata into children.csv instead of moving it to a confidential section, defaults to False
+        :type preserve_metadata: bool, optional
+        :param split_sessions: split its files into 1 session per day, defaults to False
+        :type split_sessions: bool, optional
+        :param weekend_flag: add a boolean flag for week-end days in recordings.csv, defaults to False
+        :type weekend_flag: bool, optional
+        """
 
         self.children = pd.DataFrame()
         self.recordings = pd.DataFrame()

+ 8 - 0
README.md

@@ -0,0 +1,8 @@
+
+# EL1000 datasets management package
+
+## Installation
+
+```bash
+pip install git+ssh://git@gin.g-node.org:/EL1000/tools.git --upgrade
+```

+ 1 - 1
setup.py

@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 
 version = '0.0.1'
 
-requires = ['ChildProject>=0.0.2']
+requires = ['ChildProject>=0.0.3']
 
 setup(
     name='EL1000',