dftbplus / skprogs

Basic programs for generating Slater-Koster files for the DFTB-method
GNU Lesser General Public License v3.0
25 stars 19 forks source link

Tests do not work due to missing sktools.oldskfile / OldSKFile #98

Open andrewshyichuk opened 1 day ago

andrewshyichuk commented 1 day ago

Describe the bug

Post-build tests with ctest -j fail due to lack of sktools.oldskfile and OldSKFile - unless "make install" is made first. Neither is even googleable, sktools.oldskfile and OldSKFile gone without trace. Consequently, tests do not work.

make install does this:

Building wheels for collected packages: sktools Building wheel for sktools (pyproject.toml): started Building wheel for sktools (pyproject.toml): finished with status 'done' Created wheel for sktools: filename=sktools-0.3-py3-none-any.whl size=88877 sha256=fb8e9d83487fca0263e62eaa074127fba090e6f5d9b30e7a36704623c895848e Stored in directory: /tmp/pip-ephem-wheel-cache-2mptirz7/wheels/c3/9d/3c/dedb5f0db8ff351377eb280a4bd64187b44082636de8c3ec8f

So, either manuals should be updated, or this dependency bit installed during make, not make install.

To Reproduce

Example output:

1/8 Testing: sktable_LDA-PW91/Non-Relativistic 1/8 Test: sktable_LDA-PW91/Non-Relativistic Command: "/usr/local/bin/python3" "/home/andrew/Soft/skprogs/test/prog/sktable/bin/testwithworkdir" "LDA-PW91/Non-Relativistic" "/home/andrew/Soft/skprogs/build/test/prog/sktable" "-r" "/home/andrew/Soft/skprogs/test/prog/sktable" Directory: /home/andrew/Soft/skprogs/build/test/prog/sktable "sktable_LDA-PW91/Non-Relativistic" start time: Oct 21 17:03 CEST Output:

Traceback (most recent call last): File "/home/andrew/Soft/skprogs/test/prog/sktable/bin/testwithworkdir", line 21, in import testwithworkdir as twd File "/home/andrew/Soft/skprogs/test/prog/sktable/bin/testwithworkdir.py", line 14, in from sktools.oldskfile import OldSKFile ModuleNotFoundError: No module named 'sktools.oldskfile'

**Expected behaviour** Tests should work. **Additional context**
vanderhe commented 6 hours ago

Hi @andrewshyichuk,

running the regression tests should not require to install the package first. See for example the GitHub workflow. Configuring the build and compiling the components is sufficient. Can you provide a few more information (OS, Python version, etc.) so that I can try to reproduce the incorrect behavior?

Best regards Tammo

andrewshyichuk commented 5 hours ago

Sure. Apparently, I messed up the original message on edit, and the actions to reproduce are not seen. My exact actions were:

  1. git clone https://github.com/dftbplus/skprogs.git skprogs
  2. mkdir build; cd build; ccmake ..
  3. make
  4. try tests (pushd, ctest -j)
  5. All tests fail.

Alternatively:

  1. git clone https://github.com/dftbplus/skprogs.git skprogs
  2. mkdir build; cd build; ccmake ..
  3. make
  4. make install
  5. try tests (pushd, ctest -j)
  6. All tests work.

My system is Fedora 6.6.11-100.fc38.x86_64, Python is Python 3.11.7 (main, Dec 18 2023, 00:00:00) [GCC 13.2.1 20231011 (Red Hat 13.2.1-4)] .

vanderhe commented 4 hours ago

It seems that the way testwithworkdir sets up the paths to the sktools does not work in your environment. However, I cannot reproduce this behavior on my machine (Kubuntu 24.04, Python 3.12.3).

andrewshyichuk commented 3 hours ago

No problem, and thank you for trying. The next people having my situation will have this thread.