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
7 changes: 5 additions & 2 deletions .github/workflows/marscalendar_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ on:
- 'bin/MarsCalendar.py'
- 'tests/test_marscalendar.py'
- '.github/workflows/marscalendar_test.yml'

jobs:
test:
# Run on multiple OS and Python versions for comprehensive testing
Expand All @@ -32,22 +31,26 @@ jobs:
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Set up the specified Python version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

# Install dependencies
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install numpy
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

# Install the package in editable mode
- name: Install package
run: pip install -e .
# Run the tests

# Run the tests
- name: Run MarsCalendar tests
run: |
cd tests
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/marsfiles_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Set up the specified Python version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}


# Cache pip dependencies
- name: Cache pip dependencies
uses: actions/cache@v3
with:
Expand All @@ -62,13 +65,15 @@ jobs:
sudo apt-get update
sudo apt-get install -y libfftw3-dev
pip install pyshtools


# Install pyshtools for spatial analysis capabilities (macos)
- name: Install pyshtools and spectral dependencies (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
pip install pyshtools

# Install pyshtools for spatial analysis capabilities (Windows)
- name: Install pyshtools and spectral dependencies (Windows)
if: runner.os == 'Windows'
shell: pwsh
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/marsformat_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ on:
- '.github/workflows/marsformat_test.yml'
jobs:
test:
# Run on multiple OS and Python versions for comprehensive testing
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -31,40 +30,47 @@ jobs:
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Set up the specified Python version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# Install dependencies

# Install dependencies
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install numpy netCDF4 xarray
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Install the package in editable mode

# Install the package in editable mode
- name: Install package
run: pip install -e .
# Set HOME for Windows since it might be used by the script

# Set HOME for Windows since it might be used by the script
- name: Set HOME environment variable for Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
echo "HOME=$env:USERPROFILE" >> $env:GITHUB_ENV

# Set up AmesCAP configuration - handle platform differences
- name: Set up AmesCAP configuration
shell: bash
run: |
mkdir -p $HOME/.amescap
cp mars_templates/amescap_profile $HOME/.amescap_profile

# Print out environment info
- name: Show environment info
run: |
python -c "import os, sys, numpy, netCDF4, xarray; print(f'Python: {sys.version}, NumPy: {numpy.__version__}, NetCDF4: {netCDF4.__version__}, xarray: {xarray.__version__}')"
echo "Working directory: $(pwd)"
echo "Home directory: $HOME"
echo "Environment variables: $(env)"

# Free up disk space
- name: Free up disk space
if: runner.os == 'Linux'
Expand All @@ -73,23 +79,28 @@ jobs:
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost

# Create temporary directory for tests
- name: Create temporary test directory
shell: bash
run: |
mkdir -p $HOME/marsformat_tests
echo "TMPDIR=$HOME/marsformat_tests" >> $GITHUB_ENV

# Run the integration tests with cleanup between tests
- name: Run MarsFormat tests
run: |
cd tests
python -m unittest -v test_marsformat.py

# Clean up temporary files to avoid disk space issues - OS specific
- name: Clean up temp files (Unix)
if: runner.os != 'Windows' && always()
shell: bash
run: |
rm -rf $HOME/marsformat_tests || true

# Clean up temporary files (Windows)
- name: Clean up temp files (Windows)
if: runner.os == 'Windows' && always()
shell: pwsh
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/marsinterp_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ jobs:
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Set up the specified Python version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

# Cache pip dependencies
- name: Cache pip dependencies
uses: actions/cache@v3
with:
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/marsplot_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ on:
- '.github/workflows/marsplot_test.yml'
jobs:
test:
# Run on multiple OS and Python versions for comprehensive testing
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -31,40 +30,47 @@ jobs:
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Set up the specified Python version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
# Install dependencies

# Install dependencies
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install numpy netCDF4 xarray
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

# Install the package in editable mode
- name: Install package
run: pip install -e .

# Set HOME for Windows since it might be used by the script
- name: Set HOME environment variable for Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
echo "HOME=$env:USERPROFILE" >> $env:GITHUB_ENV

# Set up AmesCAP configuration - handle platform differences
- name: Set up AmesCAP configuration
shell: bash
run: |
mkdir -p $HOME/.amescap
cp mars_templates/amescap_profile $HOME/.amescap_profile

# Print out environment info
- name: Show environment info
run: |
python -c "import os, sys, numpy, netCDF4, xarray; print(f'Python: {sys.version}, NumPy: {numpy.__version__}, NetCDF4: {netCDF4.__version__}, xarray: {xarray.__version__}')"
echo "Working directory: $(pwd)"
echo "Home directory: $HOME"
echo "Environment variables: $(env)"

# Free up disk space
- name: Free up disk space
if: runner.os == 'Linux'
Expand All @@ -73,23 +79,28 @@ jobs:
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost

# Create temporary directory for tests
- name: Create temporary test directory
shell: bash
run: |
mkdir -p $HOME/marsplot_tests
echo "TMPDIR=$HOME/marsplot_tests" >> $GITHUB_ENV

# Run the integration tests with cleanup between tests
- name: Run MarsPlot tests
run: |
cd tests
python -m unittest -v test_marsplot.py
# Clean up temporary files to avoid disk space issues - OS specific

# Clean up temporary files to avoid disk space issues - unix
- name: Clean up temp files (Unix)
if: runner.os != 'Windows' && always()
shell: bash
run: |
rm -rf $HOME/marsplot_tests || true

# Clean up temporary files to avoid disk space issues - windows
- name: Clean up temp files (Windows)
if: runner.os == 'Windows' && always()
shell: pwsh
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/marspull_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ on:

jobs:
test:
# Run on multiple OS and Python versions for comprehensive testing
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/marsvars_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ jobs:
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Set up the specified Python version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}


# Cache pip dependencies
- name: Cache pip dependencies
uses: actions/cache@v3
with:
Expand Down
Loading
Loading