-
-
Notifications
You must be signed in to change notification settings - Fork 211
MAINT remove python2 support #623
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #623 +/- ##
==========================================
Coverage ? 89.68%
==========================================
Files ? 32
Lines ? 3123
Branches ? 0
==========================================
Hits ? 2801
Misses ? 322
Partials ? 0
Continue to review full report at Codecov.
|
| flow, _ = self._add_sentinel_to_flow_name(flow, None) | ||
| flow.publish() | ||
| self.assertRaisesRegexp(openml.exceptions.OpenMLServerException, | ||
| self.assertRaisesRegex(openml.exceptions.OpenMLServerException, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(line below)
tests/test_flows/test_sklearn.py
Outdated
|
|
||
| self.assertRaisesRegexp(ValueError, msg, | ||
| self.assertRaisesRegex(ValueError, msg, | ||
| openml.flows.obtain_parameter_values, flow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
tests/test_flows/test_sklearn.py
Outdated
| flow = sklearn_to_flow(model) | ||
| flow.flow_id = 1 | ||
| self.assertRaisesRegexp(ValueError, msg, | ||
| self.assertRaisesRegex(ValueError, msg, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(line below)
| 'flow_exists' | ||
| self.assertRaisesRegexp(ValueError, expected_message_regex, | ||
| self.assertRaisesRegex(ValueError, expected_message_regex, | ||
| openml.runs.run_flow_on_task, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent (also lines below
tests/test_tasks/test_split.py
Outdated
| self.assertEqual(train_split.shape[0], 808) | ||
| self.assertEqual(test_split.shape[0], 90) | ||
| self.assertRaisesRegexp(ValueError, "Repeat 10 not known", | ||
| self.assertRaisesRegex(ValueError, "Repeat 10 not known", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
tests/test_tasks/test_split.py
Outdated
| split.get, 10, 2) | ||
| self.assertRaisesRegexp(ValueError, "Fold 10 not known", | ||
| self.assertRaisesRegex(ValueError, "Fold 10 not known", | ||
| split.get, 2, 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
tests/test_tasks/test_task.py
Outdated
| self.assertEqual(24, test_indices[-1]) | ||
| self.assertRaisesRegexp(ValueError, "Fold 10 not known", | ||
| self.assertRaisesRegex(ValueError, "Fold 10 not known", | ||
| task.get_train_test_split_indices, 10, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
tests/test_tasks/test_task.py
Outdated
| task.get_train_test_split_indices, 10, 0) | ||
| self.assertRaisesRegexp(ValueError, "Repeat 10 not known", | ||
| self.assertRaisesRegex(ValueError, "Repeat 10 not known", | ||
| task.get_train_test_split_indices, 0, 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
| openml.config.cache_directory = self.static_cache_dir | ||
| self.assertRaisesRegexp(OpenMLCacheException, | ||
| self.assertRaisesRegex(OpenMLCacheException, | ||
| 'Task file for tid 2 not cached', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
janvanrijn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with the code in its current state. Can be merged if all checks are green.
This pull request removes python 2 support and reduces the number of warnings emitted when running unit tests.