Skip to content

Commit

Permalink
Fix a few more edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Mullen committed Nov 21, 2024
1 parent 1640ee7 commit 1e4e730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tst/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def main(**kwargs):
# insert arguments for artemis.make()
artemis_cmake_args = kwargs.pop("cmake")
artemis_make_nproc = kwargs.pop("make_nproc")
module.artemis.make(artemis_cmake_args, artemis_make_nproc)
artemis.make(artemis_cmake_args, artemis_make_nproc)
except Exception:
logger.error("Exception occurred", exc_info=True)
test_errors.append("make()")
Expand Down Expand Up @@ -308,7 +308,7 @@ def set_globals(args):
else:
# If we are in a directory with an executable, default to using that
local_path = os.path.join(os.getcwd(), "artemis")
if os.path.exists(local_path) and os.access(local_path, os.X_OK):
if os.path.isfile(local_path) and os.access(local_path, os.X_OK):
# If no out_dir was passed, set it to the cwd
if out_dir is None:
out_dir = os.getcwd()
Expand Down
3 changes: 2 additions & 1 deletion tst/scripts/utils/artemis.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def set_mpi_oversubscribe(use_oversubscribe):
def set_supplied_exe(use_exe):
global use_supplied_exe
use_supplied_exe = use_exe
custom_msg = "use pre-existing" if use_exe else "build"
print("...Regression will " + custom_msg + " executable...\n")


# Optionally set custom path for executable, and update other variables related to where
Expand Down Expand Up @@ -252,7 +254,6 @@ def create_colorbar(ax, norm, where="top", cax=None, cmap="viridis", **kargs):

# Shared function to compute analytic Ogilvie & Lubow (2002) spiral positions
def spiral_pos(r, r0=1.0, p0=np.pi, h=0.05):
# Analytic spiral position from
def mod_2pi(p):
while p > 2 * np.pi:
p -= 2 * np.pi
Expand Down

0 comments on commit 1e4e730

Please sign in to comment.