Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a3b703b
clean up pyproject.toml
mcflugen Jan 30, 2024
499c054
remove the manifest
mcflugen Jan 30, 2024
75c530a
remove the makefile
mcflugen Jan 30, 2024
b192c81
remove some lint
mcflugen Jan 30, 2024
00f9beb
add type annotations and test with mypy
mcflugen Jan 30, 2024
dc7bcaf
require bmi-tester >=0.5.7
mcflugen Jan 30, 2024
5387aa4
need to install bmi-tester from conda
mcflugen Jan 30, 2024
767f93d
fix typo
mcflugen Jan 30, 2024
e6bc619
run tests with nox, run bmi-test outside of virtualenv
mcflugen Jan 31, 2024
fd38073
don't need to force a python version
mcflugen Jan 31, 2024
ca59cb2
remove bmi-tester as a testing requirement
mcflugen Jan 31, 2024
8c9d99e
pip install bmi-tester
mcflugen Jan 31, 2024
a4be30b
pip install gimli.units; fix path to heat.yaml
mcflugen Feb 22, 2024
1f300d7
use setup-python instead of mambaforge
mcflugen Feb 22, 2024
368e530
pip-install testing requirements and gimli.units
mcflugen Oct 18, 2024
a960e60
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
16d6c11
remove extra requires_python from pyproject.toml
mcflugen Oct 18, 2024
3c29b7b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 18, 2024
1aaaa4c
add bmi-tester to testing requirements
mcflugen Oct 18, 2024
300f4f6
Use nox session to test examples
mdpiper Sep 27, 2026
f6b9814
Bump version of actions/setup-python
mdpiper Sep 27, 2026
ce8cb69
Use 'mappings' instead of 'bindings'
mdpiper Sep 27, 2026
ede6872
Remove unused ruff config
mdpiper Sep 27, 2026
f5c0b20
Update testing instructions
mdpiper Sep 27, 2026
876a657
Provide Python through miniconda
mdpiper Sep 27, 2026
22cd2d4
Restore accidentally deleted checkout action
mdpiper Sep 27, 2026
6ad99cd
update testing requirements in pyproject.toml
mcflugen Jan 30, 2024
37cd4b0
back to setup-python for testing
mcflugen Oct 5, 2026
7582548
add nbmake to testing requirements
mcflugen Oct 5, 2026
354ea60
remove repeated imports
mcflugen Oct 5, 2026
850c737
require python<7.4
mcflugen Oct 5, 2026
5ae185f
drop python 3.10, add python3.14
mcflugen Oct 5, 2026
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
42 changes: 27 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,42 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
miniforge-version: latest
python-version: ${{ matrix.python-version }}

- name: Show conda installation info
- name: Test code and examples
run: |
conda info
conda list

- name: Build and install package
run: pip install -e .[testing]
pip install nox
nox -s test
nox -s test-examples

- name: Test
- name: Run bmi-test
run: |
pytest --cov=heat --cov-report=xml:./coverage.xml -vvv
pip install .[testing] gimli.units
bmi-test heat:BmiHeat --config-file=${GITHUB_WORKSPACE}/examples/heat.yaml --root-dir=examples -vvv
pytest examples --nbmake --nbmake-timeout=3000 --nbmake-kernel=python3 -v

- name: Coveralls
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
if: matrix.os == 'ubuntu-latest'
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: py${{ matrix.python-version }}-${{ matrix.os }}

debug: true

coveralls_finish:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
debug: true
7 changes: 0 additions & 7 deletions MANIFEST.in

This file was deleted.

92 changes: 0 additions & 92 deletions Makefile

This file was deleted.

10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
bmi-example-python
==================

An example of implementing the `Python bindings`_
An example of implementing the `Python mappings`_
for the CSDMS `Basic Model Interface`_ (BMI).

Overview
Expand Down Expand Up @@ -49,7 +49,7 @@ This example can be built and installed on Linux, macOS, and Windows.
**Prerequisites:**

* Python 3
* The Python BMI bindings. Follow the build and install directions
* The Python BMI mappings. Follow the build and install directions
given in the `README`_ in that repository. You can choose to install
them from source, or through `pip` or `conda`.

Expand All @@ -64,10 +64,10 @@ To run the tests,

.. code-block:: bash

$ pip install -r requirements-testing.txt
$ make test
$ pip install nox
$ nox -s test


.. _Python bindings: https://github.com/csdms/bmi-python
.. _Python mappings: https://github.com/csdms/bmi-python
.. _Basic Model Interface: https://bmi.readthedocs.io
.. _README: https://github.com/csdms/bmi-python/blob/master/README.rst
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test(session: nox.Session) -> None:

if "CI" in os.environ:
args.append(f"--cov-report=xml:{ROOT.absolute()!s}/coverage.xml")
session.run("pytest", *args)
session.run("pytest<7.4", *args)

if "CI" not in os.environ:
session.run("coverage", "report", "--ignore-errors", "--show-missing")
Expand Down Expand Up @@ -100,7 +100,7 @@ def clean(session):

shutil.rmtree("build", ignore_errors=True)
shutil.rmtree("dist", ignore_errors=True)
shutil.rmtree(f"src/{PROJECT}.egg-info", ignore_errors=True)
shutil.rmtree(f"{PROJECT}.egg-info", ignore_errors=True)
shutil.rmtree(".pytest_cache", ignore_errors=True)
shutil.rmtree(".venv", ignore_errors=True)

Expand Down
84 changes: 45 additions & 39 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "bmi-heat"
name = "bmi_heat"
requires-python = ">=3.10"
description = "BMI Python example"
keywords = [
"bmi",
"component modeling",
"csdms",
"earth science",
]
authors = [
{email = "eric.hutton@colorado.edu"},
{name = "Eric Hutton"}
{ email = "eric.hutton@colorado.edu" },
{ name = "Eric Hutton" },
]
maintainers = [
{name = "Mark Piper", email = "mark.piper@colorado.edu"},
{name = "Eric Hutton", email = "eric.hutton@colorado.edu"},
]
keywords = [
"bmi",
"component modeling",
"csdms",
"earth science",
{ name = "Mark Piper", email = "mark.piper@colorado.edu" },
{ name = "Eric Hutton", email = "eric.hutton@colorado.edu" },
]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
Expand All @@ -33,39 +29,56 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Physics",
]
requires-python = ">=3.10"
dependencies = [
"bmipy",
"numpy",
"scipy",
"pyyaml",
"bmipy",
"scipy",
]
dynamic = [
"readme",
"version",
]
dynamic = ["readme", "version"]

[project.license]
text = "MIT"

[project.urls]
Homepage = "https://csdms.colorado.edu"
Changelog = "https://github.com/csdms/bmi-example-python/blob/master/CHANGES.rst"
Documentation = "https://bmi.readthedocs.io"
Homepage = "https://csdms.colorado.edu"
Repository = "https://github.com/csdms/bmi-example-python"
Changelog = "https://github.com/csdms/bmi-example-python/blob/master/CHANGES.rst"

[project.optional-dependencies]
dev = [
"nox",
]
testing = [
"coveralls",
"pytest",
"pytest-cov",
"black",
"isort",
"ruff",
"bmi-tester",
"coveralls",
"nbmake",
"pytest<7.4",
"pytest-cov",
]

[tool.setuptools.dynamic]
readme = {file = ["README.rst", "AUTHORS.rst", "CHANGES.rst"]}
version = {attr = "heat._version.__version__"}
[build-system]
requires = [
"setuptools",
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic.readme]
file = "README.rst"
content-type = "text/x-rst"

[tool.setuptools.dynamic.version]
attr = "heat._version.__version__"

[tool.setuptools.packages.find]
where = ["."]
where = [
".",
]

[tool.coverage.run]
relative_files = true
Expand Down Expand Up @@ -108,13 +121,6 @@ doctest_optionflags = [
"ALLOW_UNICODE",
]

[tool.ruff]
line-length = 88
ignore = [
"E203",
"E501",
]

[tool.zest-releaser]
tag-format = "v{version}"
python-file-with-version = "heat/_version.py"
3 changes: 1 addition & 2 deletions requirements-testing.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
black
bmi-tester
bmi-tester>=0.5.7
coveralls
isort
nbmake
pytest
pytest-cov
ruff
Loading