uw-comphys / opencmp

OpenCMP is a computational multiphysics software package based on the finite element method. It is primarily intended for physicochemical processes involving significant convective flow.
https://opencmp.io/
GNU Lesser General Public License v2.1
26 stars 15 forks source link

JOSS: pytest #19

Closed bonh closed 2 years ago

bonh commented 2 years ago

A test fails on my machine. Installed all the dependencies via conda.

pytest.txt

openjournals/joss-reviews#3742

Alex-Vasile commented 2 years ago

That's strange. I have just rerun it and works on my machine.

Which version of NGSolve is installed and what does conda list return?

bonh commented 2 years ago

Output is conda.txt including

ngsolve 6.2.2105 py38h3277127_0 ngsolve

Do you see anything suspicious? Let me know, happy to try!

Alex-Vasile commented 2 years ago

Okay, something weird is going on. I'm currently thinking it's something to do with Conda. I have tried with system python3.8 and it works. What's curious is that you have ngsolve 6.2.2105. When I installed ngsolve using conda, following their instructions here, I get 6.2.2009.

Did you install ngsolve in conda using their steps? And it looks like you're on linux based on the conda.txt. Is that correct? If so what version?

Could you try installing ngsolve using apt-get and see if you have the same issue?

bonh commented 2 years ago

Yes, I followed the instructions. 6.2.2105 should be the right version, see https://anaconda.org/NGSolve/ngsolve. But if you want, I can pull 6.2.2009 and try if it works (in that case, you should add a version warning to your documentation)?

I am on Ubuntu 20.04.3 LTS with kernel 5.11.0-36-generic.

I would rather not use apt to install ngsolve (only as a last resort)...

Alex-Vasile commented 2 years ago

Please try installing with the apt version, their conda installation option is labelled as experimental.

I shall add a note to the documentation to specify that the conda install not be used until it is not experimental.

bonh commented 2 years ago

123 passed in 926.30s (0:15:26)

Awesome!:-)

bonh commented 2 years ago

Sorry to reopen that one, but with the new revision I am again not able to run all the tests. This is what I did:

  1. Add the top level folder opencmp as it is cloned from the branch main to `PYTHONPATH.
  2. Run pytest --runslow from opencmp

It returns the message:

ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --runslow
  inifile: None
  rootdir: /opencmp

I think I am missing something here...

Alex-Vasile commented 2 years ago

We've been having similar issues within our group when running the tests with pytest --runslow. Though it is not consistent. On seemingly identical setups it works for some but not for others. We believe it's a pytest issue.

If you rest the tests as pytest --runslow pytests/ (i.e. provide a path or a file to it) then pytests seems to work. The README inside the pytests folder is update to reflect this.

bonh commented 2 years ago

This is with pytest --runslow pytests/: 123 passed in 581.61s (0:09:41) and with pytest pytests/: 116 passed, 7 skipped in 213.73s (0:03:33).

Awesome!