Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jonwright committed Jul 25, 2024
1 parent bdc5d73 commit 5101312
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 22 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 12 additions & 17 deletions bld_test_linux.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
#!/usr/bin/env bash

python setup.py build bdist_wheel

# pip install dist/ImageD11-1.7.0-cp27-none-linux_x86_64.whl --user
# PYTHONPATH=$HOME/.local/lib/python2.7/site-packages
PYT=python
SRC=`pwd`
PYTHONPATH=$SRC/build/lib.linux-x86-64-2.7:$PYTHONPATH

echo "Running tests from " $SRC " with PYTHONPATH " $PYTHONPATH
$PYT setup.py build_ext --inplace > bld.log 2> bld.err
PYTHONPATH=`pwd`
export PYTHONPATH=$PYTHONPATH
echo "Running tests from " $SRC " with PYTHONPATH: " $PYTHONPATH

cd $SRC/test && $PYT -c 'import ImageD11, sys; sys.stdout.write(ImageD11.__file__+"\n")'


cd $SRC/test
$PYT run_tests.py
cd $SRC

cd $SRC/test/demo
echo `pwd` latred_new.py
$PYT latred_new.py
echo `pwd` test.py
$PYT test.py


cd $SRC/test
python run_tests.py



cd $SRC/test/quantix/
echo `pwd` testfitfilt.py
$PYT testfitfilt.py
Expand All @@ -38,16 +34,15 @@ cd $SRC/test
#python2.5 test_peaksearch.py ALL

cd $SRC/test/ken_simul
$PYT idx.py
$PYT testken.py


cd $SRC/test/
$PYT testcol.py


cd $SRC


echo
echo "Just finished testing ImageD11 from" $PYT
echo "Using PYTHONPATH=" $PYTHONPATH
$PYT -c "import ImageD11; print ImageD11.__version__"
cd $SRC/test && $PYT -c 'import ImageD11, sys; sys.stdout.write(ImageD11.__version__+" "+ImageD11.__file__+"\n")'
cd $SRC
6 changes: 6 additions & 0 deletions todo.txt → docs/todo_historical.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

# 25/07/2024

Move this to docs.
Now tracked in github issues.


# 26-2-2019

Overhaul or new package?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

import os
import os, sys

apui = []
syui = []
noui = []

root = "."
root = sys.argv[1]
for dirName, subdirList, fileList in os.walk(root):
if True in [dirName.find(s)>=0 for s in ("__","build",".git",".vscode") ]:
continue
Expand Down
7 changes: 4 additions & 3 deletions test/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"test_compress_duplicates",
"eps_sig.test_eps",
"test_finite_strain",
"test_stress"
# "test_stress",
"test_fetch_data"
]

Expand All @@ -49,14 +49,15 @@

for M in modules:
os.chdir(HERE)
print("Running suite for ",M)
MOD = importlib.import_module(M)
print("Running suite for ",M,MOD)
if M.find(".")>-1 and 0:
path = M.split(".")
for direc in path[:-1]:
os.chdir( direc )
M = path[-1]
mySuite = unittest.loader.findTestCases( MOD )
# mySuite = unittest.loader.findTestCases( MOD )
mySuite = unittest.defaultTestLoader.loadTestsFromModule( MOD )
runner = unittest.TextTestRunner()
try:
runner.run(mySuite)
Expand Down

0 comments on commit 5101312

Please sign in to comment.