Repository: radis/radis (language: python)

Issue:
Upper bound version constraint on Numpy?
I was wondering why does `radis` sets an upper bound version constraint on Numpy in its setup file?

### 🐛 Describe the issue
When adding `radis` to a Python environment where a version of Numpy larger than `1.22.3` is required (either from the current project, or from other dependencies), the package manager is going to run into a resolution error as [`radis` requires `numpy<=1.22.3`](https://github.com/radis/radis/blob/b928f3e2f6956a2b50cc202b5968ca73cfc42f2c/setup.py#L256).

### 🎯 Expected behavior
Usually, it is [not recommended](https://iscinumpy.dev/post/bound-version-constraints/) to have upper bound version constraint for dependencies, but I don't know there are specific reasons here to avoid Numpy versions larger than `1.22.3`?

### 💡 Possible solutions
Unless `radis` is incompatible with `numpy>1.22.3`, we could simply update the constraint set by [this line in the setup.py file](https://github.com/radis/radis/blob/b928f3e2f6956a2b50cc202b5968ca73cfc42f2c/setup.py#L256)  (similarly in the [development conda environment file](https://github.com/radis/radis/blob/b928f3e2f6956a2b50cc202b5968ca73cfc42f2c/environment.yml#L18)) to:
```python
"numpy>=1.22.3"
```
(perhaps a typo changed `>` into `<`?)

If I change `numpy>=1.22.3` to `numpy`, in `environment.yml` and let conda determine what version of Numpy to install, it picks `1.23.5` (latest version at the time of writing is `1.24.2`). If I run the tests with this change, I have all tests passing.






---
<sub>*Tip : you can vote for [New Features](https://github.com/radis/radis/issues/79) on https://feathub.com/radis/radis*
*Also check for the [Long Term Todo List](https://github.com/radis/radis/issues/53)*
</sub>


Upper bound version constraint on Numpy?
I was wondering why does `radis` sets an upper bound version constraint on Numpy in its setup file?

### 🐛 Describe the issue
When adding `radis` to a Python environment where a version of Numpy larger than `1.22.3` is required (either from the current project, or from other dependencies), the package manager is going to run into a resolution error as [`radis` requires `numpy<=1.22.3`](https://github.com/radis/radis/blob/b928f3e2f6956a2b50cc202b5968ca73cfc42f2c/setup.py#L256).

### 🎯 Expected behavior
Usually, it is [not recommended](https://iscinumpy.dev/post/bound-version-constraints/) to have upper bound version constraint for dependencies, but I don't know there are specific reasons here to avoid Numpy versions larger than `1.22.3`?

### 💡 Possible solutions
Unless `radis` is incompatible with `numpy>1.22.3`, we could simply update the constraint set by [this line in the setup.py file](https://github.com/radis/radis/blob/b928f3e2f6956a2b50cc202b5968ca73cfc42f2c/setup.py#L256)  (similarly in the [development conda environment file](https://github.com/radis/radis/blob/b928f3e2f6956a2b50cc202b5968ca73cfc42f2c/environment.yml#L18)) to:
```python
"numpy>=1.22.3"
```
(perhaps a typo changed `>` into `<`?)

If I change `numpy>=1.22.3` to `numpy`, in `environment.yml` and let conda determine what version of Numpy to install, it picks `1.23.5` (latest version at the time of writing is `1.24.2`). If I run the tests with this change, I have all tests passing.






---
<sub>*Tip : you can vote for [New Features](https://github.com/radis/radis/issues/79) on https://feathub.com/radis/radis*
*Also check for the [Long Term Todo List](https://github.com/radis/radis/issues/53)*
</sub>




Discussion / hints:
This was due to an old incompatibility with Vaex few months ago    https://github.com/radis/radis/pull/490
In october we still didn't have confirmation of compatibility with vaex https://github.com/vaexio/vaex/issues/2062  ; I just asked there for an update. 


That your tests are working seems to suggest Vaex was also updated, and that we could lift the constraint



This was due to an old incompatibility with Vaex few months ago    https://github.com/radis/radis/pull/490
In october we still didn't have confirmation of compatibility with vaex https://github.com/vaexio/vaex/issues/2062  ; I just asked there for an update. 


That your tests are working seems to suggest Vaex was also updated, and that we could lift the constraint




Fix patch:
diff --git a/environment.yml b/environment.yml
index cbf224e04..b57863da0 100644
--- a/environment.yml
+++ b/environment.yml
@@ -15,7 +15,7 @@ dependencies:
 - h5py   # load HDF5
 - joblib  # for parallel loading of SpecDatabase
 - matplotlib
-- numpy<=1.22.3
+- numpy
 - numba  # just-in-time compiler
 - pandas>=1.0.5
 - plotly>=2.5.1  # for line survey HTML output


Test patch:
diff --git a/radis/test/lbl/test_calc.py b/radis/test/lbl/test_calc.py
index 0bd28b532..01a5aaf8b 100644
--- a/radis/test/lbl/test_calc.py
+++ b/radis/test/lbl/test_calc.py
@@ -953,39 +953,39 @@ def test_diluents_for_molecule():
 
 def _run_testcases(plot=True, verbose=True, warnings=True, *args, **kwargs):
 
-    # # Test sPlanck and conversion functions
-    # test_sPlanck_conversions()
-
-    # # Test calc_spectrum function
-    # test_calc_spectrum()
-
-    # # Test calc_spectrum with overpopulation
-    # test_calc_spectrum_overpopulations(
-    #     verbose=verbose, plot=plot, warnings=warnings, *args, **kwargs
-    # )
-
-    # # Compare all calc methods
-    # #    test_all_calc_methods_CO2(
-    # #        verbose=verbose, plot=plot, warnings=warnings, *args, **kwargs
-    # #    )
-    # test_all_calc_methods_CO2pcN(
-    #     verbose=verbose, plot=plot, warnings=warnings, *args, **kwargs
-    # )
-
-    # # Compare same spectrum with two calculation methods
-    # test_eq_vs_noneq_isotope(
-    #     verbose=verbose, plot=plot, warnings=warnings, *args, **kwargs
-    # )
-
-    # # Run test for multiple molecules
-    # test_calc_spectrum_multiple_molecules()
-    # test_calc_spectrum_multiple_molecules_otherinputs()
-    # test_calc_spectrum_multiple_molecules_inputerror()
+    # Test sPlanck and conversion functions
+    test_sPlanck_conversions()
+
+    # Test calc_spectrum function
+    test_calc_spectrum()
+
+    # Test calc_spectrum with overpopulation
+    test_calc_spectrum_overpopulations(
+        verbose=verbose, plot=plot, warnings=warnings, *args, **kwargs
+    )
+
+    # Compare all calc methods
+    #    test_all_calc_methods_CO2(
+    #        verbose=verbose, plot=plot, warnings=warnings, *args, **kwargs
+    #    )
+    test_all_calc_methods_CO2pcN(
+        verbose=verbose, plot=plot, warnings=warnings, *args, **kwargs
+    )
+
+    # Compare same spectrum with two calculation methods
+    test_eq_vs_noneq_isotope(
+        verbose=verbose, plot=plot, warnings=warnings, *args, **kwargs
+    )
+
+    # Run test for multiple molecules
+    test_calc_spectrum_multiple_molecules()
+    test_calc_spectrum_multiple_molecules_otherinputs()
+    test_calc_spectrum_multiple_molecules_inputerror()
     test_calc_spectrum_multiple_molecules_wstep_auto()
 
-    # test_check_wavelength_range()
-    # test_non_air_diluent_calc()
-    # test_diluents_for_molecule()
+    test_check_wavelength_range()
+    test_non_air_diluent_calc()
+    test_diluents_for_molecule()
 
     return True