sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

change: Update package metadata

Open ofek opened this issue 1 year ago • 52 comments

Background

Hello there! The Python packaging ecosystem has standardized on the interface for build backends (PEP 517/PEP 660) and the format for metadata declaration (PEP 621/PEP 631). As a result, the execution of setup.py files is now deprecated.

So, I'm spending my free time updating important projects so that they are modernized and set an example for others 😄

Summary of changes

This implements PEP 621, obviating the need for setup.py, setup.cfg, and MANIFEST.in. The build backend hatchling (of which I am a maintainer in the PyPA) is now used as that is the default in the official Python packaging tutorial. Hatchling is available on all the major distribution channels such as Debian, Fedora, Arch Linux, conda-forge, Nixpkgs, Alpine Linux, FreeBSD/OpenBSD, Gentoo Linux, MacPorts, OpenEmbedded, Spack, MSYS2, etc.

Notes

  • The source distributions on PyPI are shipping /requirements/tox even though /tox.ini is not; let me know if you want me to remove the former or add the latter.
  • The project is no longer polluted with build artifacts such as a *.egg-info directory.
  • (See "Why Hatch?") The project now supports static analysis for external tools such as IDEs. With setuptools, you must provide additional configuration for editable installations which means that by default, for example, you would not get autocompletion in Visual Studio Code. This is marked as a legacy feature and may in fact be removed in future versions of setuptools.

Testing done

tox -e py39

Merge Checklist

General

  • [X] I have read the CONTRIBUTING doc
  • [X] 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
  • [X] 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.
  • [X] 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.

ofek avatar Dec 12 '22 06:12 ofek

@ofek Thank you for contributing to sagemaker-python-sdk. We will have to update our backend to make sure other PRs work with this change. I will check with my team and prioritize it accordingly.

navinsoni avatar Dec 12 '22 21:12 navinsoni

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 12 '22 21:12 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 12 '22 21:12 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 12 '22 21:12 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 12 '22 22:12 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 12 '22 22:12 sagemaker-bot

@navinsoni I rebased; would you mind triggering the CI again?

ofek avatar Dec 15 '22 22:12 ofek

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 19 '22 18:12 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 19 '22 19:12 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 19 '22 19:12 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 19 '22 19:12 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Dec 19 '22 19:12 sagemaker-bot

Umm @mufaddal-rohawala did you intend to force push to the master branch? That broke everyone's local Git and open PR

ofek avatar Dec 20 '22 00:12 ofek

I fixed my fork and branch, RIP to all of the others 😅

I'd highly recommend setting up branch protection to prevent this from happening again https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#allow-force-pushes

ofek avatar Dec 20 '22 01:12 ofek

Would you mind triggering the CI again?

ofek avatar Jan 10 '23 20:01 ofek

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Feb 13 '23 18:02 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Feb 13 '23 19:02 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Feb 13 '23 19:02 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Feb 13 '23 20:02 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Feb 13 '23 22:02 sagemaker-bot

This PR would need a change in build infra of the repo to make the move to new setup.

mufaddal-rohawala avatar Feb 21 '23 19:02 mufaddal-rohawala

Oh okay, can you direct me to what additional files I should modify?

ofek avatar Feb 21 '23 22:02 ofek

Ok so this is internal codebase managed by Sagemaker which hosts logic for Codebuild Projects used in PR checks. They need to be modified and I have created an item in teams backlog for the same, once the item is complete we can resume/merge this PR.

mufaddal-rohawala avatar Apr 11 '23 21:04 mufaddal-rohawala

Okay thanks!

ofek avatar Apr 11 '23 22:04 ofek

It would be really awesome if a wheel got produced as a side effect of hatch build from https://github.com/aws/sagemaker-python-sdk/issues/3181

jmahlik avatar Oct 12 '23 21:10 jmahlik