Skip to content

Commit

Permalink
Merge pull request #39 from csdms/mcflugen/improve-testing
Browse files Browse the repository at this point in the history
Clean up CI testing
  • Loading branch information
mcflugen authored Feb 4, 2024
2 parents e3acb82 + f9e153c commit 2b6b8ef
Show file tree
Hide file tree
Showing 67 changed files with 732 additions and 5,058 deletions.
42 changes: 8 additions & 34 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
name: Documentation

on:
push:
paths:
- "docs/**"
- "AUTHORS.rst"
- "CHANGES.rst"
- "CONTRIBUTING.rst"
- "LICENSE.rst"
- "README.rst"
pull_request:
paths:
- "docs/**"
- "AUTHORS.rst"
- "CHANGES.rst"
- "CONTRIBUTING.rst"
- "LICENSE.rst"
- "README.rst"
on: [push, pull_request]

jobs:
build:
name: Build documentation
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
Expand All @@ -35,24 +20,13 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
environment-file: environment.yml
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true

- name: Show conda installation info
run: |
mamba info
mamba list
python-version: 3.11

- name: Install package
run: |
make install
- name: Install dependencies
run: pip install nox

- name: Build documentation
run: |
make docs
run: nox -s build-docs
44 changes: 28 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,44 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true

- name: Show conda installation info
run: |
mamba info
mamba list
miniforge-variant: Mambaforge
miniforge-version: latest

- name: Build and install package
- name: Test
run: |
make install
pip install nox
nox -s test --force-pythons="${{ matrix.python-version }}"
- name: Test
- name: Test CLI
run: |
python -c 'import bmi_tester; print(bmi_tester.__version__)'
pytest --cov=bmi_tester --cov-report=xml:$(pwd)/coverage.xml -vvv
nox -s test-cli --force-pythons="${{ matrix.python-version }}"
# pip install model-metadata
# conda install gimli.units pymt_hydrotrend -c conda-forge
# pip install .
# bmi-test pymt_hydrotrend:Hydrotrend
- 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*.egg-info/
*.py[cod]
.coverage
.nox/
__pycache__/
build/
dist/
docs/_generated/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
- id: forbid-new-submodules
- id: mixed-line-ending
- id: trailing-whitespace
# - id: name-tests-test
- id: name-tests-test
- id: file-contents-sorter
files: |
(?x)^(
Expand Down
10 changes: 6 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "mambaforge-22.9"

conda:
environment: environment.yml
python: "3.11"
jobs:
pre_build:
- pip install nox
- nox -s build-generated-docs

sphinx:
builder: html
Expand All @@ -15,5 +16,6 @@ sphinx:

python:
install:
- requirements: requirements-docs.txt
- method: pip
path: .
12 changes: 12 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Credits

## Development Leads

- [Eric Hutton](https://github.com/mcflugen)
- [Mark Piper](https://github.com/mdpiper)

## Contributors

- [Tian Gan](https://github.com/gantian127)
- [Scott Stewart](https://github.com/sc0tts)
- [Mike Taves](https://github.com/mwtoews)
14 changes: 0 additions & 14 deletions AUTHORS.rst

This file was deleted.

91 changes: 21 additions & 70 deletions CHANGES.rst → CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,124 +1,75 @@
Changelog for bmi-tester
========================
# Changelog for bmi-tester

0.5.7 (unreleased)
------------------
## 0.5.7 (unreleased)

- Nothing changed yet.


0.5.6 (2023-12-15)
------------------
## 0.5.6 (2023-12-15)

- Fix docs build (#36)

- Updates for Python 3.12 (#35)

- Move static metadata to setup.cfg; update requirements; update CI workflows (#32)


0.5.5 (2021-03-31)
------------------
## 0.5.5 (2021-03-31)

- Fixed documentation builds on readthedocs (#31)

- Added usage and installation instructions to the README,
and did a general cleaning up of the docs (#30)

- Fixed a bug when validating some cf-compliant units (#29)

- Added gimli.units as a requirement for unit parsing (#29)

- Added GitHub actions for continuous integration (#28)


0.5.4 (2020-10-31)
------------------
## 0.5.4 (2020-10-31)

- Removed the test for set_value as it's just too dangerous (#26)

- Fixed tests that use get_grid_node_count on grids that
are not unstructured (#27)


0.5.3 (2020-10-19)
------------------
## 0.5.3 (2020-10-19)

- Change tests that use ID arrays (e.g. face_nodes, edge_nodes, etc.) to
allocate those array buffers as int32 (#25)


0.5.2 (2020-10-09)
------------------
## 0.5.2 (2020-10-09)

- Fixed a bug in the unstructured grid tests (#24)


0.5.1 (2020-09-10)
------------------
## 0.5.1 (2020-09-10)

- Fixed the time units check to allow dimensionless units (#22)

- Fixed remaining bmi version strings to 2.0 (#23)

0.5 (2020-09-02)
----------------
## 0.5 (2020-09-02)

- Fixed an error with empty_var_buffer where it returned a read-only array (#20)

- Fixed MANIFEST.in to include necessary source files (#21)

- Added test stages where successive stages depend on one another (#19)

- Cleaned up continuous integration and added Python 3.8 builds (#18)


0.4.4 (2020-03-23)
------------------
## 0.4.4 (2020-03-23)

- Added test for get_grid_node_count (#17)

0.4.3 (2019-11-12)
------------------


0.4.2 (2019-07-24)
------------------


0.4.1 (2019-05-16)
------------------


0.4.0 (2018-10-25)
------------------


0.3.1 (2018-10-16)
------------------


0.3.0 (2018-09-30)
------------------
## 0.4.3 (2019-11-12)

## 0.4.2 (2019-07-24)

0.2.4 (2018-07-04)
------------------
## 0.4.1 (2019-05-16)

## 0.4.0 (2018-10-25)

0.2.2 (2018-07-03)
------------------
## 0.3.1 (2018-10-16)

## 0.3.0 (2018-09-30)

0.2.1 (2018-06-04)
------------------
## 0.2.4 (2018-07-04)

## 0.2.2 (2018-07-03)

0.2 (2018-06-04)
----------------
## 0.2.1 (2018-06-04)

## 0.2 (2018-06-04)

0.1.0 (2018-04-14)
------------------
## 0.1.0 (2018-04-14)

- Initial release
15 changes: 0 additions & 15 deletions CREDITS.rst

This file was deleted.

5 changes: 2 additions & 3 deletions LICENSE.rst → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
The MIT License (MIT)
=====================
# The MIT License (MIT)

Copyright © `2020` `Community Surface Dynamics Modeling System`
Copyright (c) `2020` `Community Surface Dynamics Modeling System`

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
15 changes: 0 additions & 15 deletions MANIFEST.in

This file was deleted.

Loading

0 comments on commit 2b6b8ef

Please sign in to comment.