Skip to content

MAINT remove python2 support - #623

Merged
mfeurer merged 4 commits into
developfrom
remove_python_2
Feb 19, 2019
Merged

MAINT remove python2 support#623
mfeurer merged 4 commits into
developfrom
remove_python_2

Conversation

@mfeurer

Copy link
Copy Markdown
Collaborator

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

@codecov-io

codecov-io commented Feb 19, 2019

Copy link
Copy Markdown

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 FilesCoverage Δ
openml/testing.py93.97% <100%> (ø)
openml/flows/functions.py93.25% <100%> (ø)
openml/flows/sklearn_converter.py90% <100%> (ø)
openml/config.py89.09% <100%> (ø)
openml/datasets/functions.py92.57% <100%> (ø)
openml/datasets/data_feature.py70% <100%> (ø)
openml/tasks/functions.py88.31% <100%> (ø)
openml/tasks/split.py93.61% <100%> (ø)
openml/utils.py92.78% <100%> (ø)
openml/flows/flow.py93.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
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

(line below)

Comment threadtests/test_flows/test_sklearn.py Outdated

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

indent

Comment threadtests/test_flows/test_sklearn.py Outdated
flow = sklearn_to_flow(model)
flow.flow_id = 1
self.assertRaisesRegexp(ValueError, msg,
self.assertRaisesRegex(ValueError, msg,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

indent

Copy link
Copy Markdown
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
Copy Markdown
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

Comment threadtests/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",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

indent

Comment threadtests/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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

indent

Comment threadtests/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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

indent

Comment threadtests/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)

Copy link
Copy Markdown
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
Copy Markdown
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

@janvanrijnjanvanrijn left a comment

Copy link
Copy Markdown
Member

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 developFeb 19, 2019
@mfeurer
mfeurer deleted the remove_python_2 branch February 19, 2019 15:16
@mfeurermfeurer mentioned this pull request Feb 25, 2019
@mfeurermfeurer mentioned this pull request May 22, 2019
Sign up for freeto 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

@mfeurer@codecov-io@janvanrijn