Skip to content

Add absolute import checking #180

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

Merged
merged 5 commits into from
May 11, 2018
Merged

Add absolute import checking #180

merged 5 commits into from
May 11, 2018

Conversation

mvsusp
Copy link
Contributor

@mvsusp mvsusp commented May 10, 2018

Issue #, if available:
#179
#139

Description of changes:

  • enforcing absolute importing so Python 2.7 prioritizes absolute imports.
  • fix for tensorflow-serving-api issues related to multiple versions.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mvsusp mvsusp requested review from winstonaws and laurenyu May 10, 2018 23:18
@codecov-io
Copy link

codecov-io commented May 10, 2018

Codecov Report

Merging #180 into master will increase coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
+ Coverage   90.55%   90.66%   +0.11%     
==========================================
  Files          38       38              
  Lines        2562     2593      +31     
==========================================
+ Hits         2320     2351      +31     
  Misses        242      242
Impacted Files Coverage Δ
src/sagemaker/cli/common.py 76.71% <ø> (ø) ⬆️
src/sagemaker/predictor.py 95.58% <ø> (ø) ⬆️
src/sagemaker/cli/main.py 84.48% <ø> (ø) ⬆️
src/sagemaker/estimator.py 86.1% <ø> (ø) ⬆️
src/sagemaker/__init__.py 100% <ø> (ø) ⬆️
src/sagemaker/session.py 87.41% <ø> (ø) ⬆️
src/sagemaker/amazon/kmeans.py 100% <100%> (ø) ⬆️
src/sagemaker/tensorflow/__init__.py 83.33% <100%> (+1.51%) ⬆️
src/sagemaker/local/__init__.py 100% <100%> (ø) ⬆️
src/sagemaker/tensorflow/predictor.py 97.1% <100%> (+0.04%) ⬆️
... and 27 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 fda0e0e...67aa24c. Read the comment docs.

laurenyu
laurenyu previously approved these changes May 10, 2018
Copy link
Contributor

@laurenyu laurenyu left a comment

Choose a reason for hiding this comment

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

when you squash and merge, can you also add in the commit message that this change is adds the copyright notice?

@@ -10,6 +10,8 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from __future__ import absolute_import

import sys

import os
Copy link
Contributor

Choose a reason for hiding this comment

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

while you're here, want to also group os and sys?

@@ -1,4 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason we have 2017-2018 for some and just 2018 for others?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, I will update all the copyright to the 2017-2018 range.

@@ -10,3 +10,4 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from __future__ import absolute_import
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this for files with no code?

@mvsusp mvsusp merged commit d974d4b into aws:master May 11, 2018
@mvsusp mvsusp deleted the mvs-absolute-import branch May 11, 2018 17:51
apacker pushed a commit to apacker/sagemaker-python-sdk that referenced this pull request Nov 15, 2018
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.

5 participants