Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions .github/workflows/pip-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,28 @@ on:
jobs:

build:
name: Build wheels on ${{ matrix.os }}
name: 'py${{ matrix.python }} on ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.7', '3.8', '3.9']
os: [macos-15-intel, macos-26, ubuntu-22.04, ubuntu-24.04]
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python }}
allow-prereleases: true

- name: Build
run: |
python -m pip install -U pip pep517 twine setuptools_scm astropy
python -m pep517.build .
python -m pip install -U pip build twine setuptools setuptools_scm wheel
python -m build

- name: Test the sdist
run: |
Expand All @@ -42,21 +43,22 @@ jobs:
venv-wheel/bin/python -m pip install dist/vspace*.whl
venv-wheel/bin/python -c "import vspace; print(vspace.__version__)"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}-${{ matrix.python }}
path: dist/*

upload_pypi:
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: dist-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
- uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: tests

on:
push:
branches: [main]
pull_request:
branches: [main]

Expand All @@ -13,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
python-version: ["3.9"]
os: [ubuntu-22.04, ubuntu-24.04, macos-15-intel, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v5
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-purple.svg"></a>
<a href="https://VirtualPlanetaryLaboratory.github.io/vplanet/conduct.html"><img src="https://img.shields.io/badge/Code%20of-Conduct-7d93c7.svg"></a>
<br>
<img src="https://img.shields.io/badge/Unit%20Tests-46-darkblue.svg"></a>
<img src="https://img.shields.io/badge/Unit%20Tests-48-darkblue.svg"></a>
<a href="https://github.com/VirtualPlanetaryLaboratory/vspace/actions/workflows/tests.yml">
<img src="https://github.com/VirtualPlanetaryLaboratory/vspace/actions/workflows/tests.yml/badge.svg">
<img src="https://img.shields.io/badge/Python-3.9--3.13-orange.svg"></a>
<img src="https://img.shields.io/badge/Python-3.9--3.14-orange.svg"></a>
<a href="https://github.com/VirtualPlanetaryLaboratory/vspace/actions/workflows/pip-install.yml">
<a href="https://codecov.io/github/VirtualPlanetaryLaboratory/vspace">
<img src="https://codecov.io/github/VirtualPlanetaryLaboratory/vspace/graph/badge.svg?token=6Z8HVQW8N6">
</a>
<br>
<img src="https://github.com/VirtualPlanetaryLaboratory/vspace/actions/workflows/pip-install.yml/badge.svg">
<img src="https://img.shields.io/badge/Python-3.6--3.9-orange.svg"></a>
<img src="https://img.shields.io/badge/Python-3.9--3.14-orange.svg"></a>
<img src = "https://img.shields.io/badge/Platforms-Linux_|%20macOS-darkgreen.svg?style=flat">
</a>
</p>
Expand Down
8 changes: 4 additions & 4 deletions tests/FileOps/test_file_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_multiple_input_files():
shutil.rmtree(dir)

# Run vspace with earth.in and sun.in
subprocess.check_output(["vspace", "vspace_multifile.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_multifile.in"], cwd=path)

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down Expand Up @@ -70,7 +70,7 @@ def test_option_addition():
if dir.exists():
shutil.rmtree(dir)

subprocess.check_output(["vspace", "vspace_option_add.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_option_add.in"], cwd=path)

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

Expand Down Expand Up @@ -106,7 +106,7 @@ def test_option_replacement():
if dir.exists():
shutil.rmtree(dir)

subprocess.check_output(["vspace", "vspace_option_replace.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_option_replace.in"], cwd=path)

folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
assert len(folders) == 2, "Should have 2 trials"
Expand Down Expand Up @@ -163,7 +163,7 @@ def test_source_folder_with_tilde():
shutil.rmtree(dir)

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

# Verify it worked
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down
6 changes: 3 additions & 3 deletions tests/GridMode/test_multi_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_two_parameters_cartesian_product():
shutil.rmtree(dir)

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

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down Expand Up @@ -97,7 +97,7 @@ def test_three_parameters_cube():
if dir.exists():
shutil.rmtree(dir)

subprocess.check_output(["vspace", "vspace_three_param.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_three_param.in"], cwd=path)

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

Expand Down Expand Up @@ -163,7 +163,7 @@ def test_mixed_spacing_types():
if dir.exists():
shutil.rmtree(dir)

subprocess.check_output(["vspace", "vspace_mixed_spacing.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_mixed_spacing.in"], cwd=path)

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

Expand Down
4 changes: 2 additions & 2 deletions tests/Random/test_cosine.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_cosine_degrees():
shutil.rmtree(dir)

# Run vspace with fixed seed for reproducibility
subprocess.check_output(["vspace", "vspace_cosine_deg.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_cosine_deg.in"], cwd=path)

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down Expand Up @@ -87,7 +87,7 @@ def test_cosine_radians():
if dir.exists():
shutil.rmtree(dir)

subprocess.check_output(["vspace", "vspace_cosine_rad.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_cosine_rad.in"], cwd=path)

folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
angles = []
Expand Down
4 changes: 2 additions & 2 deletions tests/Random/test_gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_gaussian_basic():
shutil.rmtree(dir)

# Run vspace with fixed seed for reproducibility
subprocess.check_output(["vspace", "vspace_gaussian.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_gaussian.in"], cwd=path)

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_gaussian_nonstandard():
shutil.rmtree(dir)

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

# Extract values
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down
6 changes: 3 additions & 3 deletions tests/Random/test_gaussian_cutoffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_gaussian_min_cutoff():
shutil.rmtree(dir)

# Run vspace: Gaussian(0, 1) with min=-1.0
subprocess.check_output(["vspace", "vspace_gaussian_min.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_gaussian_min.in"], cwd=path, stderr=subprocess.STDOUT)

# Extract values
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down Expand Up @@ -72,7 +72,7 @@ def test_gaussian_max_cutoff():
shutil.rmtree(dir)

# Run vspace: Gaussian(0, 1) with max=1.0
subprocess.check_output(["vspace", "vspace_gaussian_max.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_gaussian_max.in"], cwd=path, stderr=subprocess.STDOUT)

folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
values = []
Expand Down Expand Up @@ -118,7 +118,7 @@ def test_gaussian_both_cutoffs():
shutil.rmtree(dir)

# Run vspace: Gaussian(0, 1) with min=-1.5, max=1.5
subprocess.check_output(["vspace", "vspace_gaussian_both.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_gaussian_both.in"], cwd=path, stderr=subprocess.STDOUT)

folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
values = []
Expand Down
4 changes: 2 additions & 2 deletions tests/Random/test_lognormal.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_lognormal_basic():

# Run vspace with fixed seed
# Using mean=0, sigma=1 for standard log-normal
subprocess.check_output(["vspace", "vspace_lognormal.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_lognormal.in"], cwd=path)

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_lognormal_nonstandard():
if dir.exists():
shutil.rmtree(dir)

subprocess.check_output(["vspace", "vspace_lognormal_nonstandard.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_lognormal_nonstandard.in"], cwd=path)

folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
values = []
Expand Down
4 changes: 2 additions & 2 deletions tests/Random/test_loguniform.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_loguniform_positive():
shutil.rmtree(dir)

# Run vspace with fixed seed for reproducibility
subprocess.check_output(["vspace", "vspace_loguniform.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_loguniform.in"], cwd=path)

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down Expand Up @@ -102,7 +102,7 @@ def test_loguniform_negative():
shutil.rmtree(dir)

# Run vspace with fixed seed for reproducibility
subprocess.check_output(["vspace", "vspace_loguniform_neg.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_loguniform_neg.in"], cwd=path)

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down
8 changes: 4 additions & 4 deletions tests/Random/test_seed_reproducibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_seed_reproduces_identical_values():
if dir1.exists():
shutil.rmtree(dir1)

subprocess.check_output(["vspace", "vspace_seed_test.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_seed_test.in"], cwd=path)

# Extract values from first run
folders1 = sorted([f.path for f in os.scandir(dir1) if f.is_dir()])
Expand All @@ -39,7 +39,7 @@ def test_seed_reproduces_identical_values():
shutil.rmtree(dir1)

# Second run with same seed=12345
subprocess.check_output(["vspace", "vspace_seed_test.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_seed_test.in"], cwd=path)

# Extract values from second run
folders2 = sorted([f.path for f in os.scandir(dir1) if f.is_dir()])
Expand Down Expand Up @@ -85,7 +85,7 @@ def test_different_seeds_produce_different_values():
if dir1.exists():
shutil.rmtree(dir1)

subprocess.check_output(["vspace", "vspace_seed_test.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_seed_test.in"], cwd=path)

folders1 = sorted([f.path for f in os.scandir(dir1) if f.is_dir()])
values1 = []
Expand All @@ -103,7 +103,7 @@ def test_different_seeds_produce_different_values():
if dir2.exists():
shutil.rmtree(dir2)

subprocess.check_output(["vspace", "vspace_seed_test2.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_seed_test2.in"], cwd=path)

folders2 = sorted([f.path for f in os.scandir(dir2) if f.is_dir()])
values2 = []
Expand Down
4 changes: 2 additions & 2 deletions tests/Random/test_sine.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_sine_degrees():
shutil.rmtree(dir)

# Run vspace with fixed seed for reproducibility
subprocess.check_output(["vspace", "vspace_sine_deg.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_sine_deg.in"], cwd=path)

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_sine_radians():
if dir.exists():
shutil.rmtree(dir)

subprocess.check_output(["vspace", "vspace_sine_rad.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_sine_rad.in"], cwd=path)

folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
angles = []
Expand Down
2 changes: 1 addition & 1 deletion tests/Random/test_uniform.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_uniform_distribution():
shutil.rmtree(dir)

# Run vspace with fixed seed for reproducibility
subprocess.check_output(["vspace", "vspace.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace.in"], cwd=path)

# Grab the output folders
folders = sorted([f.path for f in os.scandir(dir) if f.is_dir()])
Expand Down
2 changes: 1 addition & 1 deletion tests/Vspace_Explicit/test_vspace_explicit.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_vspace_explicit():
shutil.rmtree(dir)

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

# Grab the output
folders = sorted(
Expand Down
2 changes: 1 addition & 1 deletion tests/Vspace_Linear/test_vspace_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_vspace_linear():
shutil.rmtree(dir)

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

# Grab the output
folders = sorted(
Expand Down
2 changes: 1 addition & 1 deletion tests/Vspace_Log/test_vspace_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_vspace_log():
shutil.rmtree(dir)

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

# Grab the output
folders = sorted(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_vspace_predefprior_npy():
shutil.rmtree(dir)

# Run vspace
subprocess.check_output(["vspace", "vspace_npy.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_npy.in"], cwd=path, stderr=subprocess.STDOUT)

# Grab the dat list of randomly selected priors
priors = ascii.read(str(dir)+'/rand_list.dat')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_vspace_predefprior_txt():
shutil.rmtree(dir)

# Run vspace
subprocess.check_output(["vspace", "vspace_txt.in"], cwd=path)
subprocess.check_output(["vspace", "-f", "vspace_txt.in"], cwd=path, stderr=subprocess.STDOUT)

# Grab the dat list of randomly selected priors
priors = ascii.read(str(dir)+'/rand_list.dat')
Expand Down
Loading