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

chore(python): refactor unit / system test dependency install #1186

Closed
wants to merge 4 commits into from
Closed

chore(python): refactor unit / system test dependency install #1186

wants to merge 4 commits into from

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Aug 18, 2021

Closes #1185.

Opened PR as a draft for discussion.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 18, 2021
session.install("-e", *UNIT_TEST_LOCAL_DEPENDENCIES, *constraints)

if UNIT_TEST_DEPENDENCIES:
session.install("-e", *UNIT_TEST_DEPENDENCIES, *constraints)
Copy link
Contributor

Choose a reason for hiding this comment

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

These aren't supposed to be installed in "editable" mode, are they?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Likely not -- I doubt anybody is using a git: URL for a dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -81,29 +126,38 @@ def lint_setup_py(session):
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")


def install_unittest_dependencies(session, *constraints):
session.install(*UNIT_TEST_STANDARD_DEPENDENCIES, *constraints)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer if we installed UNIT_TEST_STANDARD_DEPENDENCIES and UNIT_TEST_DEPENDENCIES all in one go.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I'm not sure I see why? The prior template alwasy installed the "standard" deps ("mock", "asyncmock", "pytest", "pytest-cov", "pytest-asyncio") in a separate step, prior to any others.

Copy link
Contributor

Choose a reason for hiding this comment

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

The reason is that the pip resolver can run in one go. Otherwise subsequent pip installs might have to downgrade some packages.

"pytest-cov",
"pytest-asyncio",
]
UNIT_TEST_EXTERNAL_DEPENDENCIES = [{% for v in unit_test_external_dependencies %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to deprecate unit_test_external_dependencies? It seems quire redundant to me with unit_test_dependencies

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tseaver
Copy link
Contributor Author

tseaver commented Nov 30, 2021

PR made from a now-removed fork. Replaced by #1294.

@tseaver tseaver closed this Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python: refactor installing unit/system test dependencies
2 participants