dftlibs / xcfun

XCFun: A library of exchange-correlation functionals with arbitrary-order derivatives
https://dftlibs.org/xcfun/
Mozilla Public License 2.0
57 stars 32 forks source link

Add pytest dependency #166

Closed q-posev closed 1 year ago

q-posev commented 2 years ago

ctest proceeds to test the Python bindings via the pytest, which is not a built-in Python package. Thus, ctest fails if pytest is not installed. The source of failure is only visible when ctest -V is invoked.

It might be a good idea to document an optional pytest dependency and/or install it automatically (as pybind11).

Description

Add pytest to the list of dependencies.

Motivation and Context

ctest proceeds to test the Python bindings via the pytest, which is not a built-in Python package. Thus, ctest fails if pytest is not installed.

How Has This Been Tested?

No testing required. No side effects on the source code.

Types of changes

Questions

Status

robertodr commented 2 years ago

Thanks for clarifying the documentation. pytest is included in requirements.txt and environment.yml, but you're right that it should have been spelled out that it's required.

q-posev commented 2 years ago

@robertodr thanks for clarifying! Indeed, I should have looked into the requirements.txt.

In this case, perhaps it would be helpful to have a note in the docs reminding the user to use requirements.txt or environment.yml file.

robertodr commented 2 years ago

Yeah, it would be nice if you could add that as well 😄

And to answer the question:

Should pytest be installed automatically (if not yet present) when XCFUN_PYTHON_INTERFACE is ON ?

I would say "no" since then we'd have to track how Python packages are installed (virtualenv+pip? conda? conda-env+pip? something else?) and I think that's overkill.

bast commented 2 years ago

Sorry for silence:

q-posev commented 2 years ago

Sorry for my late reply. I push the necessary changes now.

robertodr commented 1 year ago

The windows test runners are somehow stuck... Merging regardless