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

infra: limit installs for dependent-tests.yml #792

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

AbeCoull
Copy link
Contributor

@AbeCoull AbeCoull commented Nov 9, 2023

Issue #, if available:

Description of changes:

Testing done:

Tests go from an execution of 7-10 mins down to 4.5 minutes.

amazon-braket/amazon-braket-pennylane-plugin-python#219 - The Pennylane Plugin will now install the dependencies which allows the runner to not need to worry about installing them here. This also keeps the test envs consistent across runs.

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

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

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

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cc28083) 100.00% compared to head (43599de) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #792   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          129       129           
  Lines         8532      8532           
  Branches      1908      1908           
=========================================
  Hits          8532      8532           

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

@AbeCoull AbeCoull marked this pull request as ready for review November 9, 2023 23:13
@AbeCoull AbeCoull requested a review from a team as a code owner November 9, 2023 23:13
@AbeCoull AbeCoull changed the title Update dependent-tests.yml infra: limit installs for dependent-tests.yml Nov 9, 2023
@AbeCoull
Copy link
Contributor Author

Comment on lines 40 to 37
pip install -e .[test]
pip install tox
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you validate if this causes the tests to reference the SDK mainline instead of the current commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am unsure of the behavior when you left this comment so I added a deterministic change to the tox file to ensure the setup uses the working branch for the PR.

From the test logs:

unit-tests: install_deps> python -I -m pip install git+https://github.com/amazon-braket/amazon-braket-sdk-python.git@math411-patch-4

@AbeCoull AbeCoull requested a review from kshitijc November 24, 2023 21:43
replaced_line = (
line
if package not in line
else f" git+https://github.com/amazon-braket/{package}-python.git@{args.branch}\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this work if someone is raising a PR from their personal fork. Is there a way we could handle that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am testing this with a forked branch of the repo. The action runner syncs the repo so this should work across forks with the new commit

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.

2 participants