Skip to content

Commit e3ca342

Browse files
author
Eric Tsai
committed
rename MultiDataLoader to DataLoader
1 parent e08aac8 commit e3ca342

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/User_Guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ From the root folder of your repository run `python3 setup.py install` (or if `p
66
## Parameter Files
77
In the directory from which you will run the system -- which can be outside your local repository-- create the main parameter files you'll need:
88
* `jurisdiction_prep.par` for the JurisdictionPrepper() class
9-
* `multi.par` for loading data (MultiDataLoader() class) and for pulling and analyzing results (the Analyzer()) class)
9+
* `multi.par` for loading data (DataLoader() class) and for pulling and analyzing results (the Analyzer()) class)
1010

1111
There are templates in `templates/parameter_file_templates`.
1212

@@ -226,7 +226,7 @@ Some routines in the Analyzer class are useful even in the data-loading process,
226226
>>>
227227
```
228228

229-
The MultiDataLoader class allows batch uploading of all data in a given directory. That directory should contain the files to be uploaded, as well as a `.par` file for each file to be uploaded. See `templates/parameter_file_templates/results.par`. You can use `make_par_files()` to create parameter files for multiple files when they share values of the following parameters:
229+
The DataLoader class allows batch uploading of all data in a given directory. That directory should contain the files to be uploaded, as well as a `.par` file for each file to be uploaded. See `templates/parameter_file_templates/results.par`. You can use `make_par_files()` to create parameter files for multiple files when they share values of the following parameters:
230230
* directory in which the files can be found
231231
* munger
232232
* jurisdiction
@@ -239,8 +239,8 @@ The `load_all()` method will read each `.par` file and make the corresponding up
239239
From a directory containing a `multi.par` parameter file, run
240240
```
241241
import election_anomaly as ea
242-
mdl = ea.MultiDataLoader()
243-
err = mdl.load_all()
242+
dl = ea.DataLoader()
243+
err = dl.load_all()
244244
```
245245

246246
If something doesn't work, error messages will print. Even when the upload has worked, there may be warnings about lines not loaded. The system will ignore lines that cannot be munged. For example, the only contests whose results are uploaded will be those in the `CandidateContest.txt` or `BallotMeasureContest.txt` files that are correctly described in `dictionary.txt`.

src/election_anomaly/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
analyze_pars = ['db_paramfile', 'db_name']
3333

3434
# classes
35-
class MultiDataLoader():
35+
class DataLoader():
3636
def __new__(self):
3737
""" Checks if parameter file exists and is correct. If not, does
38-
not create MultiDataLoader object. """
38+
not create DataLoader object. """
3939
try:
4040
d, parameter_err = ui.get_runtime_parameters(
4141
multi_data_loader_pars,param_file='multi.par')
4242
except FileNotFoundError as e:
4343
print("Parameter file multi.par not found. Ensure that it is located" \
44-
" in the current directory. MultiDataLoader object not created.")
44+
" in the current directory. DataLoader object not created.")
4545
return None
4646

4747
if parameter_err:

0 commit comments

Comments
 (0)