mdolab / pyhyp

pyHyp generates volume meshes from surface meshes using hyperbolic marching.
Other
45 stars 38 forks source link

Fixed tests hanging under Intel/Centos image #56

Closed ewu63 closed 2 years ago

ewu63 commented 2 years ago

Purpose

I couldn't really figure out why the tests were hanging. I tried different variants of subprocess.run, on one proc and on both, nothing worked. But somehow the reliable os.system worked just fine, so I used a workaround to pipe the output to a file, and read it back in. Hacky but works. I also changed it so cgnsdiff is called only on the root proc, and the results are bcast to everything.

As a somewhat unrelated change, I updated setup.py so that it's no longer installing all packages under the root directory when installing in editable mode. We should probably change this for all other packages. To explain this a bit better: Previously, when installing with pip install -e ., if you then run the following

cd ~
python -c "import examples; print(examples.__path__)"

you should get <path-to-pyhyp>/examples, meaning you now magically have a Python package called examples. With the changes in this PR, this is no longer the case.

Type of change

Testing

Checklist

codecov[bot] commented 2 years ago

Codecov Report

Merging #56 (cbc4282) into master (39e4a0d) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #56   +/-   ##
=======================================
  Coverage   76.37%   76.37%           
=======================================
  Files           3        3           
  Lines         364      364           
=======================================
  Hits          278      278           
  Misses         86       86           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 39e4a0d...cbc4282. Read the comment docs.

anilyil commented 2 years ago

I had not checked this before I left that previous comment. I uninstalled pyhyp now and re-installed with this branch, the "examples" package is now in pylayout, so I am guessing this fix works and @nwu63 also proves that we need to fix this in other repos as well.

Update: I am messing something up, re-installed with the master branch and I still have pylayout. its probably picking that up for some reason