Skip to content

Commit

Permalink
update supported Python version (#89)
Browse files Browse the repository at this point in the history
Co-authored-by: Timo Metzger <39711796+tcmetzger@users.noreply.github.com>
  • Loading branch information
giancastro and tcmetzger authored Feb 18, 2025
1 parent ed0cdc6 commit 9f57cce
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest]
python-version: ["3.12"]
python-version: ["3.11", "3.12"]
# when updating the tested Python versions, please also update README.md

runs-on: ${{ matrix.platform }}

Expand All @@ -35,15 +36,15 @@ jobs:
- uses: actions/checkout@v4

- name: Get conda
uses: conda-incubator/setup-miniconda@v3.0.0
uses: conda-incubator/setup-miniconda@v3.1.1
with:
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
channels: conda-forge
auto-activate-base: true

- name: Prepare
run: conda install conda-build conda-verify pytest
run: conda install conda-build conda-verify pytest liblief=0.14.1

- name: Build
run: conda build conda.recipe
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ For platforms other than Linux for x64 processors, you can build the package fro

If you are using a system other than Linux (x86_64) or want to build the package from source, you need to have a compatible Fortran compiler, a C++ compiler and CMake installed on your system.

pyRTE-RRTMGP is compatible with POSIX systems and is tested on Linux and macOS using the GNU Fortran compiler (gfortran) and the GNU C++ compiler (g++). The package should also work with the Intel Fortran compiler (ifort) but was not tested with it. If you use ``conda``, the system packages are installed automatically. If you use ``pip``, you need to install those packages yourself (see below).
pyRTE-RRTMGP is compatible with POSIX systems and is tested on Linux and macOS using Python 3.11/3.12, the GNU Fortran compiler (gfortran), and the GNU C++ compiler (g++). The package should also work with the Intel Fortran compiler (ifort) but was not tested with it. If you use ``conda``, the system packages are installed automatically. If you use ``pip``, you need to install those packages yourself (see below).

The package source code is hosted [on GitHub](https://github.com/earth-system-radiation/pyRTE-RRTMGP). The easiest way to install pyRTE-RRTMGP is to use `git`. You can install git from [here](https://git-scm.com/downloads).

Expand Down
14 changes: 7 additions & 7 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# based on https://github.com/pybind/scikit_build_example
# setting the requirements https://docs.conda.io/projects/conda-build/en/stable/resources/define-metadata.html#export-runtime-requirements
package:
name: pyrte_rrtmgp
version: 0.0.6
Expand All @@ -11,7 +9,6 @@ build:
number: 0
script: {{ PYTHON }} -m pip install . -vv


requirements:
build:
- {{ compiler('c') }}
Expand All @@ -24,22 +21,25 @@ requirements:
- cmake==3.26.4
- git
- make
- liblief==0.14.1 # Ensure compatibility with conda-build

host:
- python
- python >=3.11,<3.13
- pip
- scikit-build-core
- pybind11 >=2.10.0
- numpy >=1.21.0
- pytest>=7.4
- liblief==0.14.1

run:
- python
- python >=3.11,<3.13
- numpy >=1.21.0
- xarray >=2023.5.0
- netcdf4 >=1.5.7
- netcdf4 >=1.7.2
- requests>=2.4.0
- pytest>=7.4
- liblief==0.14.1

test:
imports:
Expand All @@ -48,7 +48,7 @@ test:
- numpy>=1.21
- pytest>=7.4
- xarray >=2023.5.0
- netcdf4 >=1.5.7
- netcdf4 >=1.7.2
- requests>=2.4.0
commands:
- pyrte_rrtmgp run_tests
Expand Down
13 changes: 4 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,28 @@ name = "pyrte_rrtmgp"
version = "0.0.6"
description = "A Python interface to the RTE+RRTMGP Fortran software package."
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.11,<3.13"
dependencies = [
"numpy>=2.0.0",
"xarray>=2023.5.0",
"netcdf4>=1.5.7",
"netcdf4>=1.7.2",
"requests>=2.4.0",
"pytest>=6.0.0"
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.12"
]

[project.optional-dependencies]
test = [
"pytest>=6.0.0",
"numpy>=2.0.0",
"xarray>=2023.5.0",
"netcdf4>=1.5.7",
"netcdf4>=1.7.2",
"requests>=2.4.0"
]

Expand Down

0 comments on commit 9f57cce

Please sign in to comment.