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

[Scons] Remove "install" target from "check_for_pytest" #1434

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

band-a-prend
Copy link
Contributor

Changes proposed in this pull request

The check_for_pytest depends on check_for_ruamel_yaml the pytest package is required on install phase and it results in the Cantera installation fail if pytest absent even if tests were not required.

This patch swap check_for_pytest and check_for_ruamel_yaml dependency order.

The explicit test-python-convert, test-python targets are dropped from check_for_ruamel_yaml because the check_for_pytest includes target.startswith("test-python").

If applicable, fill in the issue number this pull request is fixing

See commit 72734b1#r97347952 discussion

If applicable, provide an example illustrating new features this pull request is introducing

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

The `check_for_pytest` depends on `check_for_ruamel_yaml`
the pytest package is required on `install` phase and it results in
the Cantera installation fail if pytest absent
even if tests were not required.

This patch swap `check_for_pytest` and `check_for_ruamel_yaml`
dependency order.

The explicit `test-python-convert`, `test-python` targets are dropped
from `check_for_ruamel_yaml` because the `check_for_pytest`
includes `target.startswith("test-python")`.

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
Copy link
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

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

Thanks, @band-a-prend. Changes look good to me - some tests appear to be failing for unrelated upstream reasons - I’ll retrigger them, expecting them to pass eventually.

@ischoegl ischoegl merged commit 0ce1a1b into Cantera:main Feb 11, 2023
@@ -1697,17 +1697,17 @@ ruamel_min_version = parse_version('0.15.34')
# Minimum pytest version assumed based on Ubuntu 20.04
pytest_min_version = parse_version("4.6.9")

# Pytest is required only to test the Python module
check_for_pytest = any(
target.startswith("test-python") for target in COMMAND_LINE_TARGETS
Copy link
Member

Choose a reason for hiding this comment

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

the command line target test should also trigger this check.

Copy link
Member

Choose a reason for hiding this comment

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

this is correct - sorry for jumping the gun on this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@speth
If cantera built without "python_full" or "python_minimal" should then "test" trigger the check_for_pytest? Is pytest required just for C++ library and Fortran wrapper testing?

Copy link
Member

Choose a reason for hiding this comment

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

No, of course not. But test causes the Python test suite to be executed when the Python module is installed, so this check does need to happen in that case.

It's not clear from this line alone, but if you look further down where this test is actually handled, you'll see that it happens in a block that checks that env['python_package'] != 'none'.

ischoegl added a commit to ischoegl/cantera that referenced this pull request Feb 15, 2023
Addendum to Cantera#1434; update ensures that checks are run for all tests of
the test suite that involve pytest.
@ischoegl ischoegl mentioned this pull request Feb 15, 2023
5 tasks
speth pushed a commit that referenced this pull request Feb 16, 2023
Addendum to #1434; update ensures that checks are run for all tests of
the test suite that involve pytest.
@band-a-prend band-a-prend deleted the cantera_install branch October 2, 2024 18:21
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.

3 participants