Skip to content
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

fix: Simplify how we process test dependencies, which are supposed to include all extras. #4513

Merged
merged 1 commit into from
Mar 20, 2024
Merged

fix: Simplify how we process test dependencies, which are supposed to include all extras. #4513

merged 1 commit into from
Mar 20, 2024

Conversation

ShailavTaneja
Copy link
Collaborator

@ShailavTaneja ShailavTaneja commented Mar 18, 2024

Issue #, if available:

Description of changes:

Change: An alternative to adding extras to test requirements explicitly, all the time.

  • Test dependencise should not have to be duplicated from extras files to the test reqs file - which is error prone and can lead to asynch versions (depends on the developer remembering to update the requirement explicitly in multiple locations)
  • Test dependencies are a superset of all extras.

Testing done:

pip install .

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.

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.

@ShailavTaneja ShailavTaneja requested a review from a team as a code owner March 18, 2024 23:36
@ShailavTaneja ShailavTaneja requested review from liujiaorr and removed request for a team March 18, 2024 23:36
@ShailavTaneja ShailavTaneja marked this pull request as draft March 18, 2024 23:37
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.36%. Comparing base (c8d1428) to head (39dff71).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4513      +/-   ##
==========================================
- Coverage   87.36%   87.36%   -0.01%     
==========================================
  Files         389      389              
  Lines       36638    36638              
==========================================
- Hits        32008    32007       -1     
- Misses       4630     4631       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ShailavTaneja ShailavTaneja marked this pull request as ready for review March 19, 2024 17:11
Copy link
Contributor

@benieric benieric 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 pr

@benieric benieric self-assigned this Mar 19, 2024
@mufaddal-rohawala
Copy link
Member

AWS CodeBuild CI Report

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

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

Copy link
Contributor

@benieric benieric left a comment

Choose a reason for hiding this comment

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

Could you fix title to match format in CONTRIBUTING.md

  1. Does this change how new test dependencies are added?
  2. Where else are the dependencies that we are removing included? (ex, you are deleting docker-py=5.0.2,<7.0.0 is this installed anywhere else?)

@ShailavTaneja ShailavTaneja changed the title Fix how we process test dependencies, which are supposed to include all extras. fix: Simplify how we process test dependencies, which are supposed to include all extras. Mar 19, 2024
@ShailavTaneja
Copy link
Collaborator Author

ShailavTaneja commented Mar 19, 2024

Could you fix title to match format in CONTRIBUTING.md

  1. Does this change how new test dependencies are added?
  2. Where else are the dependencies that we are removing included? (ex, you are deleting docker-py=5.0.2,<7.0.0 is this installed anywhere else?)

Have fixed the title and the commit message.
Ref 1 - A new dependency will now only need to be added in the extra's requirement file if it's for an extra, instead of in 2 places.
Ref 2 - Yes, these are already present in the respective "extras" files. For example docker-py=5.0.2,<7.0.0 is present in local_requirements.txt. I validated that the ones I removed are already in one of the extras.

@benieric
Copy link
Contributor

Could you fix title to match format in CONTRIBUTING.md

  1. Does this change how new test dependencies are added?
  2. Where else are the dependencies that we are removing included? (ex, you are deleting docker-py=5.0.2,<7.0.0 is this installed anywhere else?)

Have fixed the title and the commit message. Ref 1 - A new dependency will now only need to be added in the extra's requirement file if it's for an extra, instead of in 2 places. Ref 2 - Yes, these are already present in the respective "extras" files. For example docker-py=5.0.2,<7.0.0 is present in local_requirements.txt. I validated that the ones I removed are already in one of the extras.

Could you fix title to match format in CONTRIBUTING.md

  1. Does this change how new test dependencies are added?
  2. Where else are the dependencies that we are removing included? (ex, you are deleting docker-py=5.0.2,<7.0.0 is this installed anywhere else?)

Have fixed the title and the commit message. Ref 1 - A new dependency will now only need to be added in the extra's requirement file if it's for an extra, instead of in 2 places. Ref 2 - Yes, these are already present in the respective "extras" files. For example docker-py=5.0.2,<7.0.0 is present in local_requirements.txt. I validated that the ones I removed are already in one of the extras.

Got you makes sense, nice fix

Copy link
Contributor

@benieric benieric 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 pr

@mufaddal-rohawala
Copy link
Member

AWS CodeBuild CI Report

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

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

@benieric benieric merged commit 7466e7e into aws:master Mar 20, 2024
6 of 8 checks passed
@ShailavTaneja ShailavTaneja deleted the test-dep-fix branch March 20, 2024 22:00
malav-shastri pushed a commit to malav-shastri/sagemaker-python-sdk that referenced this pull request Jun 20, 2024
… include all extras. (aws#4513)

Co-authored-by: Shailav Taneja <none>
jiapinw pushed a commit to jiapinw/sagemaker-python-sdk that referenced this pull request Jun 25, 2024
… include all extras. (aws#4513)

Co-authored-by: Shailav Taneja <none>
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.

4 participants