Skip to content

Conversation

@mfeurer
Copy link
Collaborator

@mfeurer mfeurer commented Feb 19, 2019

This pull request removes python 2 support and reduces the number of warnings emitted when running unit tests.

@codecov-io
Copy link

codecov-io commented Feb 19, 2019

Codecov Report

❗ No coverage uploaded for pull request base (develop@3ed08f0). Click here to learn what that means.
The diff coverage is 97.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #623   +/-   ##
==========================================
  Coverage           ?   89.68%           
==========================================
  Files              ?       32           
  Lines              ?     3123           
  Branches           ?        0           
==========================================
  Hits               ?     2801           
  Misses             ?      322           
  Partials           ?        0
Impacted Files Coverage Δ
openml/testing.py 93.97% <100%> (ø)
openml/flows/functions.py 93.25% <100%> (ø)
openml/flows/sklearn_converter.py 90% <100%> (ø)
openml/config.py 89.09% <100%> (ø)
openml/datasets/functions.py 92.57% <100%> (ø)
openml/datasets/data_feature.py 70% <100%> (ø)
openml/tasks/functions.py 88.31% <100%> (ø)
openml/tasks/split.py 93.61% <100%> (ø)
openml/utils.py 92.78% <100%> (ø)
openml/flows/flow.py 93.82% <100%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ed08f0...99a8be1. Read the comment docs.

flow, _ = self._add_sentinel_to_flow_name(flow, None)
flow.publish()
self.assertRaisesRegexp(openml.exceptions.OpenMLServerException,
self.assertRaisesRegex(openml.exceptions.OpenMLServerException,
Copy link
Member

Choose a reason for hiding this comment

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

please check indent

Copy link
Member

Choose a reason for hiding this comment

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

(line below)


self.assertRaisesRegexp(ValueError, msg,
self.assertRaisesRegex(ValueError, msg,
openml.flows.obtain_parameter_values, flow)
Copy link
Member

Choose a reason for hiding this comment

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

indent

flow = sklearn_to_flow(model)
flow.flow_id = 1
self.assertRaisesRegexp(ValueError, msg,
self.assertRaisesRegex(ValueError, msg,
Copy link
Member

Choose a reason for hiding this comment

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

indent

Copy link
Member

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,
Copy link
Member

Choose a reason for hiding this comment

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

indent (also lines below

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",
Copy link
Member

Choose a reason for hiding this comment

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

indent

split.get, 10, 2)
self.assertRaisesRegexp(ValueError, "Fold 10 not known",
self.assertRaisesRegex(ValueError, "Fold 10 not known",
split.get, 2, 10)
Copy link
Member

Choose a reason for hiding this comment

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

indent

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)
Copy link
Member

Choose a reason for hiding this comment

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

indent

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)
Copy link
Member

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',
Copy link
Member

Choose a reason for hiding this comment

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

indent

@mfeurer mfeurer marked this pull request as ready for review February 19, 2019 12:48
Copy link
Member

@janvanrijn janvanrijn left a 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.

@mfeurer mfeurer merged commit 96db525 into develop Feb 19, 2019
@mfeurer mfeurer deleted the remove_python_2 branch February 19, 2019 15:16
@mfeurer mfeurer mentioned this pull request Feb 25, 2019
@mfeurer mfeurer mentioned this pull request May 22, 2019
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.

4 participants