Skip to content

Commit bc23d79

Browse files
authored
Merge pull request #101 from cropsinsilico/minor
Minor
2 parents 70ad737 + e4a5540 commit bc23d79

File tree

24 files changed

+426
-251
lines changed

24 files changed

+426
-251
lines changed

.github/workflows/test-install.yml

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,17 @@ jobs:
432432
run: python utils/setup_test_env.py verify
433433
- name: Compile libraries
434434
run: yggcompile
435-
- if: runner.os == 'Windows'
436-
name: Run cmake test in command prompt
437-
run: 'cmake -h
438-
439-
pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
440-
441-
'
435+
- if: runner.os == 'Windows' && (matrix.install-method == 'conda' || matrix.install-method
436+
== 'mamba')
437+
name: Run cmake test in command prompt (CONDA)
438+
run: conda activate test && pytest --import-mode=importlib --ci --cov-append
439+
--nocapture tests/drivers/test_CMakeModelDriver.py
440+
shell: cmd /C CALL {0}
441+
timeout-minutes: 180
442+
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
443+
!= 'mamba'
444+
name: Run cmake test in command prompt (PIP)
445+
run: pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
442446
shell: cmd /C CALL {0}
443447
timeout-minutes: 180
444448
- continue-on-error: true
@@ -779,13 +783,17 @@ jobs:
779783
run: python utils/setup_test_env.py verify
780784
- name: Compile libraries
781785
run: yggcompile
782-
- if: runner.os == 'Windows'
783-
name: Run cmake test in command prompt
784-
run: 'cmake -h
785-
786-
pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
787-
788-
'
786+
- if: runner.os == 'Windows' && (matrix.install-method == 'conda' || matrix.install-method
787+
== 'mamba')
788+
name: Run cmake test in command prompt (CONDA)
789+
run: conda activate test && pytest --import-mode=importlib --ci --cov-append
790+
--nocapture tests/drivers/test_CMakeModelDriver.py
791+
shell: cmd /C CALL {0}
792+
timeout-minutes: 180
793+
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
794+
!= 'mamba'
795+
name: Run cmake test in command prompt (PIP)
796+
run: pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
789797
shell: cmd /C CALL {0}
790798
timeout-minutes: 180
791799
- continue-on-error: true
@@ -1118,13 +1126,17 @@ jobs:
11181126
run: python utils/setup_test_env.py verify
11191127
- name: Compile libraries
11201128
run: yggcompile
1121-
- if: runner.os == 'Windows'
1122-
name: Run cmake test in command prompt
1123-
run: 'cmake -h
1124-
1125-
pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
1126-
1127-
'
1129+
- if: runner.os == 'Windows' && (matrix.install-method == 'conda' || matrix.install-method
1130+
== 'mamba')
1131+
name: Run cmake test in command prompt (CONDA)
1132+
run: conda activate test && pytest --import-mode=importlib --ci --cov-append
1133+
--nocapture tests/drivers/test_CMakeModelDriver.py
1134+
shell: cmd /C CALL {0}
1135+
timeout-minutes: 180
1136+
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
1137+
!= 'mamba'
1138+
name: Run cmake test in command prompt (PIP)
1139+
run: pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
11281140
shell: cmd /C CALL {0}
11291141
timeout-minutes: 180
11301142
- continue-on-error: true
@@ -1440,13 +1452,17 @@ jobs:
14401452
run: python utils/setup_test_env.py verify
14411453
- name: Compile libraries
14421454
run: yggcompile
1443-
- if: runner.os == 'Windows'
1444-
name: Run cmake test in command prompt
1445-
run: 'cmake -h
1446-
1447-
pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
1448-
1449-
'
1455+
- if: runner.os == 'Windows' && (matrix.install-method == 'conda' || matrix.install-method
1456+
== 'mamba')
1457+
name: Run cmake test in command prompt (CONDA)
1458+
run: conda activate test && pytest --import-mode=importlib --ci --cov-append
1459+
--nocapture tests/drivers/test_CMakeModelDriver.py
1460+
shell: cmd /C CALL {0}
1461+
timeout-minutes: 180
1462+
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
1463+
!= 'mamba'
1464+
name: Run cmake test in command prompt (PIP)
1465+
run: pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
14501466
shell: cmd /C CALL {0}
14511467
timeout-minutes: 180
14521468
- continue-on-error: true
@@ -1761,13 +1777,17 @@ jobs:
17611777
run: python utils/setup_test_env.py verify
17621778
- name: Compile libraries
17631779
run: yggcompile
1764-
- if: runner.os == 'Windows'
1765-
name: Run cmake test in command prompt
1766-
run: 'cmake -h
1767-
1768-
pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
1769-
1770-
'
1780+
- if: runner.os == 'Windows' && (matrix.install-method == 'conda' || matrix.install-method
1781+
== 'mamba')
1782+
name: Run cmake test in command prompt (CONDA)
1783+
run: conda activate test && pytest --import-mode=importlib --ci --cov-append
1784+
--nocapture tests/drivers/test_CMakeModelDriver.py
1785+
shell: cmd /C CALL {0}
1786+
timeout-minutes: 180
1787+
- if: runner.os == 'Windows' && matrix.install-method != 'conda' && matrix.install-method
1788+
!= 'mamba'
1789+
name: Run cmake test in command prompt (PIP)
1790+
run: pytest --import-mode=importlib --ci --cov-append --nocapture tests/drivers/test_CMakeModelDriver.py
17711791
shell: cmd /C CALL {0}
17721792
timeout-minutes: 180
17731793
- continue-on-error: true

HISTORY.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
History
33
=======
44

5+
1.10.2 (2023-10-12) Minor bug fixes and dependency updates
6+
-------------------
7+
8+
* Updated rapidjson version to include normalization of units in human readable strings
9+
* Fix CI R dependency installation bug by pinning vdiffr to 1.0.5
10+
* Fix bug in types test that assumed different directory structure
11+
512
1.10.1 (2023-06-27) New map transformation, composite function wrapping example, and various refactoring of internal methods
613
-------------------
714

_vendor/python_rapidjson/units.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,18 @@ static PyObject* quantity_array__array_ufunc__(PyObject* self, PyObject* args, P
13681368
goto cleanup;
13691369
}
13701370
}
1371+
} else if (ufunc_name == "exp") {
1372+
if (_has_units(i0)) {
1373+
tmp2 = _get_units(i0);
1374+
if (((UnitsObject*)tmp2)->units->is_null()) {
1375+
Py_DECREF(tmp2);
1376+
convert_units = get_empty_units();
1377+
} else {
1378+
// Allow radians here?
1379+
Py_DECREF(tmp2);
1380+
goto cleanup;
1381+
}
1382+
}
13711383
} else if (ufunc_name == "sin" ||
13721384
ufunc_name == "cos" ||
13731385
ufunc_name == "tan" ||

docs/source/development/todo.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Documentation
2020
* Expand development section into contributing guide
2121
* Go through and update/prune interface documentation
2222
* Docs on default_file/default_value
23+
* Docs on use of YggInterface.h vs YggLibrary.h in main source vs. other source files when a module has more than one
2324

2425
Refactor
2526
--------

recipe/meta.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "yggdrasil" %}
2-
{% set version = "1.10.1" %}
2+
{% set version = "1.10.2" %}
33
{% set PY_VER_MAJOR = PY_VER.split('.')[0] %}
44
{% set PY_VER_MINOR = PY_VER.split('.')[1] %}
55

@@ -122,6 +122,7 @@ outputs:
122122
- python
123123
- r-base
124124
- r-bit64
125+
- r-devtools # [not win]
125126
- r-r6
126127
- r-reticulate
127128
- r-units
@@ -130,6 +131,7 @@ outputs:
130131
- {{ pin_subpackage('yggdrasil', exact=True) }}
131132
- r-base
132133
- r-bit64
134+
- r-devtools # [not win]
133135
- r-r6
134136
- r-reticulate
135137
- r-units

tests/drivers/test_CompiledModelDriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def test_get_flags(self, python_class):
197197
from yggdrasil import __version__ as yggver
198198
yggver = yggver.split('+')[0].split('v')[-1].split('.')
199199
assert (python_class.get_flags(flags='hello', libtype='object')
200-
== ['hello', '-DWITH_YGGDRASIL',
200+
== ['hello', '-DWITH_YGGDRASIL', '-D_USE_MATH_DEFINES',
201201
f'-DYGGVER_MAJOR={yggver[0]}'])
202202

203203
def test_get_executable_command(self, python_class):

tests/examples/types/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22
import argparse
3-
from yggdrasil.examples.tests.test_types import TestExampleTypes
3+
from tests.examples.test_types import TestExampleTypes
44
from yggdrasil.languages import get_language_ext
55
from yggdrasil.runner import run
66
_this_dir = os.path.dirname(__file__)

utils/requirements/requirements.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,53 @@
218218
]
219219
}
220220
},
221+
{
222+
"r-devtools": {
223+
"options": [
224+
{
225+
"method": "conda",
226+
"host": true,
227+
"os": "unix"
228+
},
229+
{
230+
"method": "cran"
231+
},
232+
{
233+
"method": "skip",
234+
"os": "win"
235+
}
236+
]
237+
}
238+
},
239+
{
240+
"harfbuzz": {
241+
"options": [
242+
{
243+
"name": "libharfbuzz-dev",
244+
"method": "apt",
245+
"add": [
246+
"libfribidi-dev",
247+
"r-cran-devtools"
248+
]
249+
},
250+
{
251+
"name": "harfbuzz",
252+
"add": [
253+
"fribidi",
254+
"libgit2"
255+
],
256+
"method": "brew"
257+
},
258+
{
259+
"method": "skip",
260+
"os": "win"
261+
},
262+
{
263+
"method": "conda_skip"
264+
}
265+
]
266+
}
267+
},
221268
{
222269
"r-bit64": [
223270
{

utils/requirements/requirements.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,25 @@ extras:
133133
add: [r-base-dev]
134134
- name: r
135135
method: brew
136+
- r-devtools:
137+
options:
138+
- method: conda
139+
host: True
140+
os: unix
141+
- method: cran
142+
- method: skip
143+
os: win
144+
- harfbuzz:
145+
options:
146+
- name: libharfbuzz-dev
147+
method: apt
148+
add: [libfribidi-dev, r-cran-devtools]
149+
- name: harfbuzz
150+
add: [fribidi, libgit2]
151+
method: brew
152+
- method: skip
153+
os: win
154+
- method: conda_skip
136155
- r-bit64:
137156
- method: conda
138157
host: True

utils/requirements/requirements_condaonly.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ msmpi; platform_system == 'Windows' # [conda,mpi]
1515
openmpi; platform_system == 'Darwin' # [conda,mpi]
1616
r-base # [conda,r]
1717
r-bit64 # [conda,r]
18+
r-devtools; platform_system != 'Windows' # [conda,r]
1819
r-r6 # [conda,r]
1920
r-reticulate # [conda,r]
2021
r-units # [conda,r]

0 commit comments

Comments
 (0)