Skip to content

Commit

Permalink
Merge branch 'main' into develop-175-multi-cell
Browse files Browse the repository at this point in the history
  • Loading branch information
mattldawson committed Aug 8, 2024
2 parents ace2803 + 92b3365 commit dc76c09
Show file tree
Hide file tree
Showing 43 changed files with 2,887 additions and 368 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Publish Python Package

on:
workflow_dispatch:
release:
types:
- published

jobs:
build_sdist:
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build SDist
run: pipx run build --sdist

- name: Check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

build_wheels:
name: Build wheels on ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: pypa/[email protected]
env:
CIBW_ARCHS_MACOS: arm64 x86_64
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* *musllinux*
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-py${{ matrix.python-version }}
path: wheelhouse/*.whl

upload_all:
name: Upload release
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/musica
permissions:
id-token: write

steps:
- uses: actions/setup-python@v5
with:
python-version: "3.x"

- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ number: 10
page: "E1743 - E1760"
doi: "10.1175/BAMS-D-19-0331.1"
url: "https://journals.ametsoc.org/view/journals/bams/101/10/bamsD190331.xml"
version: 0.7.0
version: 0.7.3
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.21)

# must be on the same line so that pyproject.toml can correctly identify the version
project(musica-distribution VERSION 0.7.0)
project(musica-distribution VERSION 0.7.3)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH};${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_MODULE_PATH}/SetDefaults.cmake)
Expand Down
2 changes: 1 addition & 1 deletion cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ if (MUSICA_ENABLE_TUVX AND MUSICA_BUILD_C_CXX_INTERFACE)
set(TUVX_INSTALL_INCLUDE_DIR ${MUSICA_INSTALL_INCLUDE_DIR} CACHE STRING "" FORCE)

set_git_default(TUVX_GIT_REPOSITORY https://github.com/NCAR/tuv-x.git)
set_git_default(TUVX_GIT_TAG 80f896a0fb591987c2a79209377bd6f599b4fb6f)
set_git_default(TUVX_GIT_TAG 674ee1e72853bb44d23c36602fa73c955b2f021d)

FetchContent_Declare(tuvx
GIT_REPOSITORY ${TUVX_GIT_REPOSITORY}
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ RUN dnf -y update \
gfortran \
gdb \
git \
lapack-devel \
lcov \
make \
netcdf-fortran-devel \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.fortran-gcc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RUN dnf -y update \
git \
hdf5-devel \
json-devel \
lapack-devel \
lcov \
libcurl-devel \
m4 \
Expand All @@ -38,6 +37,7 @@ RUN cd musica \
&& cmake -S . \
-B build \
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
-D MUSICA_GIT_TAG=${MUSICA_GIT_TAG} \
-D MUSICA_BUILD_FORTRAN_INTERFACE=ON \
-D MUSICA_ENABLE_MEMCHECK=ON \
&& cd build \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.fortran-gcc.integration
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ RUN dnf -y update \
git \
hdf5-devel \
json-devel \
lapack-devel \
lcov \
libcurl-devel \
m4 \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.memcheck
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ RUN dnf -y update \
gfortran \
gdb \
git \
lapack-devel \
lcov \
make \
netcdf-fortran-devel \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.mpi
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN sudo dnf -y install \
gcc-c++ \
gfortran \
git \
lapack-devel \
lcov \
make \
netcdf-fortran-devel \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.mpi_openmp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN sudo dnf -y install \
gcc-c++ \
gfortran \
git \
lapack-devel \
lcov \
make \
netcdf-fortran-devel \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.openmp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN sudo dnf -y install \
gcc-c++ \
gfortran \
git \
lapack-devel \
lcov \
make \
netcdf-fortran-devel \
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile.python
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ RUN dnf -y update \
gcc-fortran \
gdb \
git \
lapack-devel \
make \
netcdf-fortran-devel \
pip \
Expand Down
2 changes: 1 addition & 1 deletion fortran/test/fetch_content_integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ if (MUSICA_ENABLE_TUVX)
copy_tuvx_data_dir ALL ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/../../../build/_deps/tuvx-src/data ${CMAKE_BINARY_DIR}/data
)
endif()
endif()
15 changes: 5 additions & 10 deletions fortran/test/fetch_content_integration/test_micm_api.F90
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,16 @@ subroutine test_api()
ASSERT( logical( bool_value ) )

string_value = micm%get_species_property_string( "O3", "missing property", error )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_SPECIES, \
MICM_SPECIES_ERROR_CODE_PROPERTY_NOT_FOUND ) )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_SPECIES, MICM_SPECIES_ERROR_CODE_PROPERTY_NOT_FOUND ) )
double_value = micm%get_species_property_double( "O3", "missing property", error )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_SPECIES, \
MICM_SPECIES_ERROR_CODE_PROPERTY_NOT_FOUND ) )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_SPECIES, MICM_SPECIES_ERROR_CODE_PROPERTY_NOT_FOUND ) )
int_value = micm%get_species_property_int( "O3", "missing property", error )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_SPECIES, \
MICM_SPECIES_ERROR_CODE_PROPERTY_NOT_FOUND ) )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_SPECIES, MICM_SPECIES_ERROR_CODE_PROPERTY_NOT_FOUND ) )
bool_value = micm%get_species_property_bool( "O3", "missing property", error )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_SPECIES, \
MICM_SPECIES_ERROR_CODE_PROPERTY_NOT_FOUND ) )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_SPECIES, MICM_SPECIES_ERROR_CODE_PROPERTY_NOT_FOUND ) )
deallocate( micm )
micm => micm_t( "configs/invalid", solver_type, num_grid_cells, error )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_CONFIGURATION, \
MICM_CONFIGURATION_ERROR_CODE_INVALID_FILE_PATH ) )
ASSERT( error%is_error( MICM_ERROR_CATEGORY_CONFIGURATION, MICM_CONFIGURATION_ERROR_CODE_INVALID_FILE_PATH ) )
ASSERT( .not. associated( micm ) )

write(*,*) "[test micm fort api] Finished."
Expand Down
Loading

0 comments on commit dc76c09

Please sign in to comment.