Skip to content

Avoid to add dataset_id -1 - #199

Closed
omgteam wants to merge 5 commits into
openml:developfrom
omgteam:develop
Closed

omgteam wants to merge 5 commits into
openml:developfrom
omgteam:develop

Conversation

@omgteam

@omgteam omgteam commented Feb 28, 2017

Copy link
Copy Markdown

fix line 35 in functions.py to avoid add dataset_id -1, which cause test error when python setup.py install

Due to re.match error in openml/datasets/functions.py line35, self.assertEqual(len(cached_datasets), 2) in openml-python/tests/test_datasets/test_dataset_functions.py will pop error when python setup.py test.
Error:
FAIL: test__list_cached_datasets (tests.test_datasets.test_dataset_functions.TestOpenMLDataset)

Traceback (most recent call last):
File "/root/install/openml-python/tests/test_datasets/test_dataset_functions.py", line 34, in test__list_cached_datasets
self.assertEqual(len(cached_datasets), 2)
nose.proxy.AssertionError: 3 != 2

'3 != 2' = '%s != %s' % _common_shorten_repr(3, 2)
'3 != 2' = self._formatMessage('3 != 2', '3 != 2')

    raise self.failureException('3 != 2')

Fix:
old:
if not re.match(r"[0-9]", directory_name): ##openml/datasets/functions.py in line 35
new:
if re.match(r"[0-9]", directory_name).group() == "":

fix line 35 in functions.py to avoid add dataset_id -1
@omgteam

omgteam commented Feb 28, 2017

Copy link
Copy Markdown
Author

Already fix! please build again.

datasets number is not sure for different release, not empty is OK
Number of datasets is not fixed, not empty is OK
@janvanrijn

Copy link
Copy Markdown
Member

Hi @omgteam thanks for adding this fix to the package! The lead developer of the package is currently on holiday, but I will ask him to merge this change after he comes back (~in two weeks)

Please let us know if there is any way we can help you with in the meantime

mfeurer added a commit that referenced this pull request Mar 27, 2017
@mfeurer

mfeurer commented Mar 27, 2017

Copy link
Copy Markdown
Collaborator

I assume this PR is about fixing issue #189, is this correct?

janvanrijn added a commit that referenced this pull request Apr 6, 2017
FIX issue #189, delete cached dataset after test
@mfeurer

mfeurer commented Oct 2, 2017

Copy link
Copy Markdown
Collaborator

I'm closing this now because of inactivity. Please reopen this pull request if you believe that your issue wasn't fixed in the meantime.

@mfeurer mfeurer closed this Oct 2, 2017
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

Successfully merging this pull request may close these issues.

3 participants