Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of 'optional' fields in source data sets #77

Open
gyoliver opened this issue May 18, 2019 · 0 comments
Open

Handling of 'optional' fields in source data sets #77

gyoliver opened this issue May 18, 2019 · 0 comments

Comments

@gyoliver
Copy link
Collaborator

Issue:
The BaseModel method "reload_sources" requires that you pass in "skip" for the source dataset's population field when instantiating any model, even those models do not require population data (i.e., AccessModel, AccessCount, AccessTime, and AccessSum).

Similarly, the BaseModel method "reload_dests" makes the same requirement for a capacity field in the destination dataset, while AccessModel, AccessCount, AccessTime don't require capacity data.

If you don't pass in "skip" for these fields, the code throws an error. I think users will go on the assumption that you only have to pass in/deal with fields that are required for a model, so this could be confusing. It took me a while to pinpoint what the issue was. Debugging is also confusing since (as of v0.1.10), the errors thrown are quite general--SourceDataNotParsableException and DestDataNotParsableException.

The lines in v0.1.17 triggering the error are:

  • line 294: if self.source_column_names['population'] == 'skip':
  • line 380: if self.dest_column_names['capacity'] == 'skip':

Recommended modifications:
Could we modify the logic so it doesn't require passing in "skip" for these fields?
Also, it'd be good to replace the "skip" value with None and/or blank string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant