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

Allow the user to provide a year list to filter the datasets #97

Merged
merged 3 commits into from
Jul 8, 2017

Conversation

Irio
Copy link
Collaborator

@Irio Irio commented Jun 18, 2017

One step in the direction to allow users to make non-standard uses of the datasets.

In the Whistleblower repository, will remove the need of copying and pasting a whole file - whistleblower/get_dataset.py - for just a few changes.

self.path = path

self.years = years
Copy link
Collaborator

@cuducos cuducos Jun 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be nice to have this argument flexible? Year could be an int (eg. Dataset('/tmp', years=2010)) or a list (eg. Dataset('/tmp, years=[2010, 2011])`). In that case I'd replace this line by:

        self.years = [years] if isinstance(year, int) else years

@Irio
Copy link
Collaborator Author

Irio commented Jul 7, 2017

Tests passed after the change. Rebasing with master.

@Irio Irio merged commit 53b0d94 into master Jul 8, 2017
@Irio Irio deleted the irio-year-list branch July 8, 2017 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants