Skip to content

Add absolute import checking - #180

Merged
mvsusp merged 5 commits into
aws:masterfrom
mvsusp:mvs-absolute-import
May 11, 2018
Merged

mvsusp merged 5 commits into
aws:masterfrom
mvsusp:mvs-absolute-import

Conversation

@mvsusp

@mvsusp mvsusp commented May 10, 2018 •

Copy link
Copy Markdown
Contributor

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 laurenyu and winstonaws May 10, 2018 23:18
@codecov-io

codecov-io commented May 10, 2018 •

Copy link
Copy Markdown

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

@laurenyu laurenyu left a comment

Copy link
Copy Markdown
Contributor

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?


import sys

import os

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

Comment thread doc/conf.py
@@ -1,4 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.

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

# 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
Copy Markdown
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
Evan-W-ang added a commit to Evan-W-ang/sagemaker-python-sdk that referenced this pull request Jun 8, 2026
Add absolute import checking
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