Skip to content

fix: Make type annotation of UploadedCode consistent #3839

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 1 commit into from
May 18, 2023

Conversation

wimlewis-amazon
Copy link
Contributor

@wimlewis-amazon wimlewis-amazon commented May 5, 2023

Description of changes:

Corrected the documentation and type annotations for some methods and variables which handle UploadedCode instances. In some places they were referred to as str and in some places as the nonexistent UserCode type. Now they are all UploadedCode (or Optional[UploadedCode]).

Testing done:

  • ran it through mypy, got one fewer error than before
  • ran tox tests/unit

Merge Checklist

General

  • I have read the CONTRIBUTING doc
  • I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • I used the commit message format described in CONTRIBUTING
  • I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • I have checked that my tests are not configured for a specific region or account (if appropriate)
  • I have used unique_name_from_base to create resource names in integ tests (if appropriate)

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

@wimlewis-amazon wimlewis-amazon requested a review from a team as a code owner May 5, 2023 21:18
@wimlewis-amazon wimlewis-amazon requested review from claytonparnell and removed request for a team May 5, 2023 21:18
Copy link
Contributor

@knikure knikure left a comment

Choose a reason for hiding this comment

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

/bot run all

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-local-mode-tests
  • Commit ID: e0e8913
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-pr
  • Commit ID: e0e8913
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-notebook-tests
  • Commit ID: e0e8913
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: e0e8913
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-slow-tests
  • Commit ID: e0e8913
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2023

Codecov Report

Merging #3839 (e0e8913) into master (4bc49e5) will decrease coverage by 0.72%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3839      +/-   ##
==========================================
- Coverage   89.96%   89.25%   -0.72%     
==========================================
  Files        1140      267     -873     
  Lines      105616    26100   -79516     
==========================================
- Hits        95021    23296   -71725     
+ Misses      10595     2804    -7791     
Impacted Files Coverage Δ
src/sagemaker/estimator.py 89.92% <100.00%> (ø)
src/sagemaker/fw_utils.py 90.80% <100.00%> (ø)

... and 1405 files with indirect coverage changes

Copy link
Contributor

@knikure knikure left a comment

Choose a reason for hiding this comment

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

/bot run notebook-tests

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-notebook-tests
  • Commit ID: e0e8913
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@knikure knikure merged commit 4430c8c into aws:master May 18, 2023
@wimlewis-amazon wimlewis-amazon deleted the nitfix1 branch May 18, 2023 16:11
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