File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 - name : Install dependencies
2222 run : |
2323 python -m pip install --upgrade pip
24- pip install -e .
24+ pip install -e .[raster]
2525
2626 - name : Build C extensions
2727 run : |
Original file line number Diff line number Diff line change 1313- fixed history tracking bug
1414- fixed a bug in the rng algorithm that impacted reproducibility in some cases
1515- odd-sized grids are now supported
16- - fixed a bug preventing early exit in some situations during optimization when the convergence criterion is met
16+ - fixed a bug preventing early exit in some situations during optimization when the convergence criterion is met
17+
18+ # 1.3.20251010
19+ - fixed critical bug preventing export to xarray datasets
Original file line number Diff line number Diff line change 1414project = 'PyOCN'
1515copyright = '2025, Alexander S. Fox'
1616author = 'Alexander S. Fox'
17- release = '1.2 .20251010'
17+ release = '1.3 .20251010'
1818
1919# -- General configuration ---------------------------------------------------
2020# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " PyOCN"
7- version = " 1.2 .20251010"
7+ version = " 1.3 .20251010"
88description = " Optimal Channel Networks (OCN) in Python with a C core"
99readme = " readme.md"
1010requires-python = " >=3.10"
Original file line number Diff line number Diff line change 1111class TestBasicOCN (unittest .TestCase ):
1212 """Basic tests for OCN creation and energy computation."""
1313
14+ def test_ocn_to_xarray (self ):
15+ """Test that OCN can be converted to xarray and back."""
16+ ocn = po .OCN .from_net_type (
17+ net_type = "V" ,
18+ dims = (32 , 32 ),
19+ random_state = 1234 ,
20+ )
21+ ocn .to_xarray ()
22+
23+ ocn = po .OCN .from_net_type (
24+ net_type = "V" ,
25+ dims = (32 , 32 ),
26+ random_state = 1234 ,
27+ wrap = True ,
28+ )
29+ ocn .to_xarray ()
30+
1431 def test_ocn_energy (self ):
1532 """Test that OCN creation produces expected energy value."""
1633 ocn = po .OCN .from_net_type (
You can’t perform that action at this time.
0 commit comments