Skip to content

Commit

Permalink
MNT: Python3.13 and minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
greglucas committed Nov 14, 2024
1 parent d30ab27 commit bbc68b4
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.13'

- name: Download source files
run: |
Expand All @@ -38,7 +38,7 @@ jobs:
cd docs
make html
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: DocumentationHTML
path: docs/build/html/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
defaults:
run:
shell: bash
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ jobs:
steps:
- uses: actions/checkout@v4

# Used to host cibuildwheel
- uses: actions/setup-python@v3

- name: Download source files
run: |
python .github/workflows/download_mirror.py
Expand Down Expand Up @@ -78,12 +75,9 @@ jobs:
echo "PYTHONUTF8=1" >> $GITHUB_ENV
- name: Build wheels
uses: pypa/cibuildwheel@v2.17.0
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_BUILD: "cp310-* cp311-* cp312-*"
# skip 32 bit windows and linux builds because numpy
# does not provide wheels for these platforms
CIBW_SKIP: "*-win32 *_i686"
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.os == 'macos-13' && '13' || '14' }}"

- uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:
autoupdate_schedule: 'quarterly'
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.5.0'
rev: 'v0.7.3'
hooks:
- id: ruff
args: [--fix]
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors:
Atmospheric and Space Physics (LASP)
orcid: "https://orcid.org/0000-0003-1331-1863"
title: "pymsis"
version: v0.9.0
version: v0.10.0
doi: 10.5281/zenodo.5348502
date-released: 2024-04-04
url: "https://github.com/SWxTREC/pymsis"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ models (MSISE-00, MSIS2.0, MSIS2.1).

## Quickstart

[Web viewer](https://swx-trec.com/msis): An interactive website using pymsis through cloud-based serverless functions.
[Project homepage](https://swxtrec.github.io/pymsis/): Location for all documentation.
[API Reference](https://swxtrec.github.io/pymsis/reference/index.html): Details about the various options and configurations available in the functions.
[Examples](https://swxtrec.github.io/pymsis/examples/index.html): Demo for how to access and plot the data.
- [Documentation](https://swxtrec.github.io/pymsis/)
- [API Reference](https://swxtrec.github.io/pymsis/reference/index.html): Details about the various options and configurations available in the functions.
- [Examples](https://swxtrec.github.io/pymsis/examples/index.html): Demo for how to access and plot the data.
- [Web viewer](https://swx-trec.com/msis): An interactive website using pymsis through cloud-based serverless functions.

**A few short lines of code to get started quickly with pymsis.**

Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

# Autosummary
autosummary_generate = True
autodoc_typehints = "none"

# Sphinx gallery
sphinx_gallery_conf = {
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(
'pymsis',
'c',
# Note that the git commit hash cannot be added dynamically here
version: '0.9.0',
version: '0.10.0',
license: 'MIT',
meson_version: '>=1.2.99',
default_options: [
Expand Down
2 changes: 1 addition & 1 deletion pymsis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Python interface to the MSIS codes."""

__version__ = "0.9.0"
__version__ = "0.10.0"
2 changes: 1 addition & 1 deletion pymsis/msis.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def run(
-------
ndarray (ndates, nlons, nlats, nalts, 11) or (ndates, 11)
| The data calculated at each grid point:
| [Total mass density (kg/m3)
| [Total mass density (kg/m3),
| N2 # density (m-3),
| O2 # density (m-3),
| O # density (m-3),
Expand Down
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
build-backend = "mesonpy"
requires = [
"meson-python>=0.10.0",
"numpy>=2.0.0rc1",
"numpy>=2",
]

[project]
name = "pymsis"
version = "0.9.0"
version = "0.10.0"
description = "A Python wrapper around the NRLMSIS model."
readme = "README.md"
license = {file = "LICENSE"}
Expand All @@ -22,6 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Operating System :: Microsoft :: Windows",
Expand All @@ -39,7 +40,7 @@ tests = [
]
docs = [
"matplotlib",
"sphinx<6",
"sphinx",
"sphinx_gallery",
"pydata-sphinx-theme",
]
Expand All @@ -64,6 +65,9 @@ addopts = [
]

[tool.cibuildwheel]
build = "cp310-* cp311-* cp312-* cp313-*"
# skip 32 bit windows and linux builds for lack of numpy wheels
skip = "*-win32 *_i686"
test-requires = "pytest"
test-command = "pytest --pyargs pymsis"

Expand Down
10 changes: 5 additions & 5 deletions tests/test_msis.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pymsis import msis, msis00f, msis20f, msis21f


@pytest.fixture()
@pytest.fixture
def input_data():
date = np.datetime64("2010-01-01T12:00")
lon = 0
Expand All @@ -17,12 +17,12 @@ def input_data():
return (date, lon, lat, alt, f107, f107a, ap)


@pytest.fixture()
@pytest.fixture
def expected_input():
return [1.0, 86400 / 2, 0, 0, 200, 150, 150] + [3] * 7


@pytest.fixture()
@pytest.fixture
def expected_output():
return np.array(
[
Expand All @@ -42,7 +42,7 @@ def expected_output():
)


@pytest.fixture()
@pytest.fixture
def expected_output00():
return np.array(
[
Expand All @@ -62,7 +62,7 @@ def expected_output00():
)


@pytest.fixture()
@pytest.fixture
def input_auto_f107_ap():
return (
np.datetime64("2000-07-01T12:00"),
Expand Down

0 comments on commit bbc68b4

Please sign in to comment.