Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
34 changes: 16 additions & 18 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Pace repository
uses: actions/checkout@v3.5.2
with:
submodules: 'recursive'
- name: Step Python 3.11.7
uses: actions/setup-python@v4.6.0
with:
python-version: '3.11.7'
- name: Install OpenMPI for gt4py
run: |
sudo apt-get install libopenmpi-dev
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt -r requirements_lint.txt
- name: Run lint via pre-commit
run: |
pre-commit run --all-files
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Step Python 3.11.9
uses: actions/setup-python@v5
with:
python-version: '3.11.9'

- name: Install pre-commit
run: pip install pre-commit

- name: Run lint via pre-commit
run: |
pre-commit run --all-files
28 changes: 11 additions & 17 deletions .github/workflows/main_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,29 @@ jobs:
submodules: 'recursive'
path: pace/${{inputs.component_name}}

- name: install packages
if: ${{ ! inputs.component_trigger }}
- name: Print versions
run: |
cd ${GITHUB_WORKSPACE}/pace
pip3 install --upgrade pip setuptools wheel
pip3 install -r requirements_dev.txt -c constraints.txt
python --version
pip --version
pip list

- name: "External trigger: Install packages"
if: ${{ inputs.component_trigger }}
# Ignore `constraints.txt` when running as part of the NDSL pipeline
# to avoid false positives in package dependency resolution.
- name: Install packages
run: |
cd ${GITHUB_WORKSPACE}/pace
pip3 install --upgrade pip setuptools wheel
pip3 install -r requirements_dev.txt
pip install .[prod,test]

- name: prepare input files
- name: Prepare input files
run: |
cd ${GITHUB_WORKSPACE}/pace
mkdir tests/main/input
python3 examples/generate_eta_files.py
mv *eta*.nc tests/main/input
python examples/generate_eta_files.py tests/main/input

- name: run tests
- name: Run tests
run: |
cd ${GITHUB_WORKSPACE}/pace
pytest -x tests/main
python -m pytest -x tests/main

- name: run baroclinic
- name: Run baroclinic test case
run: |
cd ${GITHUB_WORKSPACE}/pace
mpiexec -np 6 --oversubscribe python -m pace.run examples/configs/baroclinic_c12.yaml
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ git submodule update --init --recursive
We recommend creating a python `venv` or `conda` environment specifically for Pace.

```shell
python3 -m venv venv_name
source venv_name/bin/activate
python -m venv .venv
source .venv/bin/activate
```

Inside of your pace `venv` or conda environment pip install the Python requirements, GT4Py, and Pace:
Inside of your pace `venv` or `conda` environment, pip install the Python requirements, GT4Py, and Pace:

```shell
pip3 install -r requirements_dev.txt -c constraints.txt
pip install -r requirements_dev.txt
```

Shell scripts to install Pace on specific machines such as Gaea can be found in `examples/build_scripts/`.
Expand All @@ -80,8 +80,7 @@ Before starting any run, including unit tests, the user must ensure that the pro

```shell
mkdir tests/main/input
python3 examples/generate_eta_files.py
mv *eta*.nc tests/main/input
python examples/generate_eta_files.py tests/main/input
```

These commands will generate the files necessary and place them in the `tests/main/input` directory. Once the files are generated the `baroclinic_c12.yaml` configuration can be used to generate a run:
Expand All @@ -93,7 +92,7 @@ mpirun -n 6 python3 -m pace.run examples/configs/baroclinic_c12.yaml
mpirun -n 6 --oversubscribe python3 -m pace.run examples/configs/baroclinic_c12.yaml
```

After the run completes, you will see an output direcotry `output.zarr`. An example to visualize the output is provided in `examples/plot_output.py`. See the [driver example](examples/README.md) section for more details.
After the run completes, you will see an output directory `output.zarr`. An example to visualize the output is provided in `examples/plot_output.py`. See the [driver example](examples/README.md) section for more details.

### Environment variable configuration

Expand Down
Loading