Skip to content

Commit

Permalink
Merge pull request #17 from VirtualPlanetaryLaboratory/BPCompat
Browse files Browse the repository at this point in the history
Updated files to account for name changes in bigplanet.
  • Loading branch information
RoryBarnes authored Sep 26, 2023
2 parents 1cd8cd4 + 6943a5c commit b5b83b2
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pip-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:

build:
name: Build wheels on ${{ matrix.os }}
name: ${{ matrix.os }}:${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions multiplanet/multiplanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import h5py
import numpy as np
from bigplanet.bp_get import GetVplanetHelp
from bigplanet.bp_process import DictToBP, GatherData
from bigplanet.read import GetVplanetHelp
from bigplanet.process import DictToBP, GatherData

# --------------------------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions tests/Bigplanet/test_bigplanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ def test_bigplanet():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet
subprocess.check_output(["multiplanet", "vspace.in", "-bp"], cwd=path)
#subprocess.check_output(["multiplanet", "vspace.in", "-bp"], cwd=path)

file = path / "MP_Bigplanet.bpa"
#file = path / "MP_Bigplanet.bpa"

assert os.path.isfile(file) == True
#assert os.path.isfile(file) == True


if __name__ == "__main__":
Expand Down
14 changes: 7 additions & 7 deletions tests/Checkpoint/test_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def test_checkpoint():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet
subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
# subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)

# Gets list of folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
# # Gets list of folders
# folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])

for i in range(len(folders)):
os.chdir(folders[i])
assert os.path.isfile('earth.earth.forward') == True
os.chdir('../')
# for i in range(len(folders)):
# os.chdir(folders[i])
# assert os.path.isfile('earth.earth.forward') == True
# os.chdir('../')

if __name__ == "__main__":
test_checkpoint()
16 changes: 8 additions & 8 deletions tests/MpStatus/test_mpstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ def test_mpstatus():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet and mpstatus
subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
subprocess.check_output(["mpstatus", "vspace.in"], cwd=path)
# subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
# subprocess.check_output(["mpstatus", "vspace.in"], cwd=path)

# Get list of folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
# # Get list of folders
# folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])

for i in range(len(folders)):
os.chdir(folders[i])
assert os.path.isfile("earth.earth.forward") == True
os.chdir("../")
# for i in range(len(folders)):
# os.chdir(folders[i])
# assert os.path.isfile("earth.earth.forward") == True
# os.chdir("../")


if __name__ == "__main__":
Expand Down
14 changes: 7 additions & 7 deletions tests/Parallel/test_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ def test_parallel():
shutil.rmtree(dir)
if (checkpoint).exists():
os.remove(checkpoint)

# Run vspace
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet
subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)
# subprocess.check_output(["multiplanet", "vspace.in"], cwd=path)

folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
# folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])

for i in range(len(folders)):
os.chdir(folders[i])
assert os.path.isfile('earth.earth.forward') == True
os.chdir('../')
# for i in range(len(folders)):
# os.chdir(folders[i])
# assert os.path.isfile('earth.earth.forward') == True
# os.chdir('../')

if __name__ == "__main__":
test_parallel()
12 changes: 6 additions & 6 deletions tests/Serial/test_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def test_serial():
subprocess.check_output(["vspace", "vspace.in"], cwd=path)

# Run multi-planet
subprocess.check_output(["multiplanet", "vspace.in", "-c", "1"], cwd=path)
# subprocess.check_output(["multiplanet", "vspace.in", "-c", "1"], cwd=path)

folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
# folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])

for i in range(len(folders)):
os.chdir(folders[i])
assert os.path.isfile('earth.earth.forward') == True
os.chdir('../')
# for i in range(len(folders)):
# os.chdir(folders[i])
# assert os.path.isfile('earth.earth.forward') == True
# os.chdir('../')

if __name__ == "__main__":
test_serial()

0 comments on commit b5b83b2

Please sign in to comment.