Skip to content

Commit

Permalink
Merge branch 'released'
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Dec 9, 2024
2 parents c174ae7 + 7c0367f commit d53bd7d
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 18 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,26 @@ jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest, macos-11, macos-latest, windows-2019, windows-latest]
python-version: [ '3.8', '3.x' ]
os: [ubuntu-20.04, ubuntu-latest, macos-13, macos-latest, windows-2019, windows-latest]
python-version: [ '3.9', '3.x' ]

steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install libhdf5 (macOS)
# See https://stackoverflow.com/questions/73029883
if: runner.os == 'macOS'
run: |
brew install hdf5
brew install c-blosc
export HDF5_DIR=/opt/homebrew/opt/hdf5
export BLOSC_DIR=/opt/homebrew/opt/c-blosc
export LZO_DIR=/opt/homebrew/opt/lzo
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Build and install flydra_core
Expand All @@ -37,8 +47,9 @@ jobs:
test-ubuntu-system-python:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
os: [ubuntu-24.04, ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Update package index
Expand Down
8 changes: 8 additions & 0 deletions flydra_analysis/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import numpy as np
import pytest


@pytest.fixture(scope="session", autouse=True)
def set_numpy_printoptions():
np.set_printoptions(legacy="1.25")

2 changes: 1 addition & 1 deletion flydra_analysis/flydra_analysis/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.18" # keep in sync with pyproject.toml
__version__ = "0.7.19" # keep in sync with pyproject.toml
4 changes: 2 additions & 2 deletions flydra_analysis/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "flydra_analysis"
version = "0.7.18" # keep in sync with flydra_analysis/version.py
version = "0.7.19" # keep in sync with flydra_analysis/version.py
description = "flydra analysis tools"
readme = "README.md"
requires-python = ">= 3.8"
Expand Down Expand Up @@ -106,7 +106,7 @@ wt0803 = "flydra_analysis.a2.conditions_draw:wt0803"

[build-system]
# following advice in https://stackoverflow.com/a/66479252
requires = ["setuptools >= 61", "cython >= 0.29", "numpy"]
requires = ["setuptools >= 61", "cython >= 0.29.32", "numpy"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
Expand Down
8 changes: 8 additions & 0 deletions flydra_core/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import numpy as np
import pytest


@pytest.fixture(scope="session", autouse=True)
def set_numpy_printoptions():
np.set_printoptions(legacy="1.25")

17 changes: 9 additions & 8 deletions flydra_core/flydra_core/reconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,8 @@ def SingleCameraCalibration_from_xml(elem, helper=None):
assert ET.iselement(elem)
assert elem.tag == "single_camera_calibration"
cam_id = elem.find("cam_id").text
pmat = numpy.array(numpy.mat(elem.find("calibration_matrix").text))
res = numpy.array(numpy.mat(elem.find("resolution").text))[0, :]
pmat = numpy.array(np.asmatrix(elem.find("calibration_matrix").text))
res = numpy.array(np.asmatrix(elem.find("resolution").text))[0, :]
scale_elem = elem.find("scale_factor")
if NO_BACKWARDS_COMPAT:
assert scale_elem is None, "XML file has outdated <scale_factor>"
Expand Down Expand Up @@ -2102,12 +2102,13 @@ def add_element(self, parent):
for cam_id in self.cam_ids:
scc = self.get_SingleCameraCalibration(cam_id)
scc.add_element(elem)
if 1:
me_elem = ET.SubElement(elem, "minimum_eccentricity")
me_elem.text = repr(self.minimum_eccentricity)
if self.wateri is not None:
water_elem = ET.SubElement(elem, "water")
water_elem.text = repr(self.wateri.n2)
with np.printoptions(legacy='1.25'):
if 1:
me_elem = ET.SubElement(elem, "minimum_eccentricity")
me_elem.text = repr(self.minimum_eccentricity)
if self.wateri is not None:
water_elem = ET.SubElement(elem, "water")
water_elem.text = repr(self.wateri.n2)


def align_calibration():
Expand Down
2 changes: 1 addition & 1 deletion flydra_core/flydra_core/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.16" # keep in sync with pyproject.toml
__version__ = "0.7.18" # keep in sync with pyproject.toml
6 changes: 3 additions & 3 deletions flydra_core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "flydra_core"
version = "0.7.16" # keep in sync with flydra_core/version.py
version = "0.7.18" # keep in sync with flydra_core/version.py
description = "flydra mainbrain and core lib"
readme = "README.md"
requires-python = ">= 3.8"
Expand All @@ -13,7 +13,7 @@ urls.homepage = "https://github.com/strawlab/flydra"
dependencies = [
"numpy >= 1.19",

"tables",
"tables>=3.9.0",
"cgkit1 >= 1.3.0",
"pymvg >= 2.1.0",
"adskalman",
Expand All @@ -29,7 +29,7 @@ flydra_analysis_flip_calibration = "flydra_core.reconstruct:flip_calibration"

[build-system]
# following advice in https://stackoverflow.com/a/66479252
requires = ["setuptools >= 61", "cython >= 0.29", "numpy"]
requires = ["setuptools >= 61", "cython >= 0.29.32", "numpy"]
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
Expand Down

0 comments on commit d53bd7d

Please sign in to comment.