Skip to content

Commit 2b6b8ef

Browse files
authored
Merge pull request #39 from csdms/mcflugen/improve-testing
Clean up CI testing
2 parents e3acb82 + f9e153c commit 2b6b8ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+732
-5058
lines changed

.github/workflows/docs.yml

+8-34
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
name: Documentation
22

3-
on:
4-
push:
5-
paths:
6-
- "docs/**"
7-
- "AUTHORS.rst"
8-
- "CHANGES.rst"
9-
- "CONTRIBUTING.rst"
10-
- "LICENSE.rst"
11-
- "README.rst"
12-
pull_request:
13-
paths:
14-
- "docs/**"
15-
- "AUTHORS.rst"
16-
- "CHANGES.rst"
17-
- "CONTRIBUTING.rst"
18-
- "LICENSE.rst"
19-
- "README.rst"
3+
on: [push, pull_request]
204

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

3621
steps:
3722
- uses: actions/checkout@v4
38-
39-
- uses: conda-incubator/setup-miniconda@v3
23+
- name: Set up Python 3.11
24+
uses: actions/setup-python@v4
4025
with:
41-
python-version: "3.11"
42-
environment-file: environment.yml
43-
mamba-version: "*"
44-
channels: conda-forge,defaults
45-
channel-priority: true
46-
47-
- name: Show conda installation info
48-
run: |
49-
mamba info
50-
mamba list
26+
python-version: 3.11
5127

52-
- name: Install package
53-
run: |
54-
make install
28+
- name: Install dependencies
29+
run: pip install nox
5530

5631
- name: Build documentation
57-
run: |
58-
make docs
32+
run: nox -s build-docs

.github/workflows/test.yml

+28-16
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,44 @@ jobs:
2121
matrix:
2222
os: [ubuntu-latest, macos-latest, windows-latest]
2323
python-version: ["3.10", "3.11", "3.12"]
24+
fail-fast: false
2425

2526
steps:
2627
- uses: actions/checkout@v4
27-
2828
- uses: conda-incubator/setup-miniconda@v3
2929
with:
3030
python-version: ${{ matrix.python-version }}
31-
environment-file: environment.yml
32-
mamba-version: "*"
33-
channels: conda-forge,defaults
34-
channel-priority: true
35-
36-
- name: Show conda installation info
37-
run: |
38-
mamba info
39-
mamba list
31+
miniforge-variant: Mambaforge
32+
miniforge-version: latest
4033

41-
- name: Build and install package
34+
- name: Test
4235
run: |
43-
make install
36+
pip install nox
37+
nox -s test --force-pythons="${{ matrix.python-version }}"
4438
45-
- name: Test
39+
- name: Test CLI
4640
run: |
47-
python -c 'import bmi_tester; print(bmi_tester.__version__)'
48-
pytest --cov=bmi_tester --cov-report=xml:$(pwd)/coverage.xml -vvv
41+
nox -s test-cli --force-pythons="${{ matrix.python-version }}"
42+
# pip install model-metadata
43+
# conda install gimli.units pymt_hydrotrend -c conda-forge
44+
# pip install .
45+
# bmi-test pymt_hydrotrend:Hydrotrend
4946
5047
- name: Coveralls
51-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
48+
if: matrix.os == 'ubuntu-latest'
5249
uses: AndreMiras/coveralls-python-action@develop
50+
with:
51+
parallel: true
52+
flag-name: py${{ matrix.python-version }}-${{ matrix.os }}
53+
54+
debug: true
55+
56+
coveralls_finish:
57+
needs: build-and-test
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Coveralls Finished
61+
uses: AndreMiras/coveralls-python-action@develop
62+
with:
63+
parallel-finished: true
64+
debug: true

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*.egg-info/
22
*.py[cod]
33
.coverage
4+
.nox/
45
__pycache__/
56
build/
67
dist/
8+
docs/_generated/

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ repos:
4747
- id: forbid-new-submodules
4848
- id: mixed-line-ending
4949
- id: trailing-whitespace
50-
# - id: name-tests-test
50+
- id: name-tests-test
5151
- id: file-contents-sorter
5252
files: |
5353
(?x)^(

.readthedocs.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "mambaforge-22.9"
7-
8-
conda:
9-
environment: environment.yml
6+
python: "3.11"
7+
jobs:
8+
pre_build:
9+
- pip install nox
10+
- nox -s build-generated-docs
1011

1112
sphinx:
1213
builder: html
@@ -15,5 +16,6 @@ sphinx:
1516

1617
python:
1718
install:
19+
- requirements: requirements-docs.txt
1820
- method: pip
1921
path: .

AUTHORS.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Credits
2+
3+
## Development Leads
4+
5+
- [Eric Hutton](https://github.com/mcflugen)
6+
- [Mark Piper](https://github.com/mdpiper)
7+
8+
## Contributors
9+
10+
- [Tian Gan](https://github.com/gantian127)
11+
- [Scott Stewart](https://github.com/sc0tts)
12+
- [Mike Taves](https://github.com/mwtoews)

AUTHORS.rst

-14
This file was deleted.

CHANGES.rst CHANGES.md

+21-70
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,75 @@
1-
Changelog for bmi-tester
2-
========================
1+
# Changelog for bmi-tester
32

4-
0.5.7 (unreleased)
5-
------------------
3+
## 0.5.7 (unreleased)
64

75
- Nothing changed yet.
86

9-
10-
0.5.6 (2023-12-15)
11-
------------------
7+
## 0.5.6 (2023-12-15)
128

139
- Fix docs build (#36)
14-
1510
- Updates for Python 3.12 (#35)
16-
1711
- Move static metadata to setup.cfg; update requirements; update CI workflows (#32)
1812

19-
20-
0.5.5 (2021-03-31)
21-
------------------
13+
## 0.5.5 (2021-03-31)
2214

2315
- Fixed documentation builds on readthedocs (#31)
24-
2516
- Added usage and installation instructions to the README,
2617
and did a general cleaning up of the docs (#30)
27-
2818
- Fixed a bug when validating some cf-compliant units (#29)
29-
3019
- Added gimli.units as a requirement for unit parsing (#29)
31-
3220
- Added GitHub actions for continuous integration (#28)
3321

34-
35-
0.5.4 (2020-10-31)
36-
------------------
22+
## 0.5.4 (2020-10-31)
3723

3824
- Removed the test for set_value as it's just too dangerous (#26)
39-
4025
- Fixed tests that use get_grid_node_count on grids that
4126
are not unstructured (#27)
4227

43-
44-
0.5.3 (2020-10-19)
45-
------------------
28+
## 0.5.3 (2020-10-19)
4629

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

50-
51-
0.5.2 (2020-10-09)
52-
------------------
33+
## 0.5.2 (2020-10-09)
5334

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

56-
57-
0.5.1 (2020-09-10)
58-
------------------
37+
## 0.5.1 (2020-09-10)
5938

6039
- Fixed the time units check to allow dimensionless units (#22)
61-
6240
- Fixed remaining bmi version strings to 2.0 (#23)
6341

64-
0.5 (2020-09-02)
65-
----------------
42+
## 0.5 (2020-09-02)
6643

6744
- Fixed an error with empty_var_buffer where it returned a read-only array (#20)
68-
6945
- Fixed MANIFEST.in to include necessary source files (#21)
70-
7146
- Added test stages where successive stages depend on one another (#19)
72-
7347
- Cleaned up continuous integration and added Python 3.8 builds (#18)
7448

75-
76-
0.4.4 (2020-03-23)
77-
------------------
49+
## 0.4.4 (2020-03-23)
7850

7951
- Added test for get_grid_node_count (#17)
8052

81-
0.4.3 (2019-11-12)
82-
------------------
83-
84-
85-
0.4.2 (2019-07-24)
86-
------------------
87-
88-
89-
0.4.1 (2019-05-16)
90-
------------------
91-
92-
93-
0.4.0 (2018-10-25)
94-
------------------
95-
96-
97-
0.3.1 (2018-10-16)
98-
------------------
99-
100-
101-
0.3.0 (2018-09-30)
102-
------------------
53+
## 0.4.3 (2019-11-12)
10354

55+
## 0.4.2 (2019-07-24)
10456

105-
0.2.4 (2018-07-04)
106-
------------------
57+
## 0.4.1 (2019-05-16)
10758

59+
## 0.4.0 (2018-10-25)
10860

109-
0.2.2 (2018-07-03)
110-
------------------
61+
## 0.3.1 (2018-10-16)
11162

63+
## 0.3.0 (2018-09-30)
11264

113-
0.2.1 (2018-06-04)
114-
------------------
65+
## 0.2.4 (2018-07-04)
11566

67+
## 0.2.2 (2018-07-03)
11668

117-
0.2 (2018-06-04)
118-
----------------
69+
## 0.2.1 (2018-06-04)
11970

71+
## 0.2 (2018-06-04)
12072

121-
0.1.0 (2018-04-14)
122-
------------------
73+
## 0.1.0 (2018-04-14)
12374

12475
- Initial release

CREDITS.rst

-15
This file was deleted.

LICENSE.rst LICENSE.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
The MIT License (MIT)
2-
=====================
1+
# The MIT License (MIT)
32

4-
Copyright © `2020` `Community Surface Dynamics Modeling System`
3+
Copyright (c) `2020` `Community Surface Dynamics Modeling System`
54

65
Permission is hereby granted, free of charge, to any person
76
obtaining a copy of this software and associated documentation

MANIFEST.in

-15
This file was deleted.

0 commit comments

Comments
 (0)