From 3c1ffea6e7ca77eeab43600ba1c4f8f547d184d4 Mon Sep 17 00:00:00 2001 From: toloudis Date: Fri, 22 Mar 2024 16:34:03 -0700 Subject: [PATCH 1/8] update libczi and version --- _aicspylibczi/Reader.cpp | 9 ++++++--- aicspylibczi/_version.py | 2 +- libCZI | 2 +- setup.cfg | 2 +- setup.py | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/_aicspylibczi/Reader.cpp b/_aicspylibczi/Reader.cpp index 94718a2d..ce56d1c1 100644 --- a/_aicspylibczi/Reader.cpp +++ b/_aicspylibczi/Reader.cpp @@ -20,7 +20,7 @@ Reader::Reader(std::shared_ptr istream_) : m_czireader(new CCZIReader) , m_specifyScene(true) { - m_czireader->Open(std::move(istream_)); + m_czireader->Open(std::move(istream_), nullptr); m_statistics = m_czireader->GetStatistics(); m_pixelType = libCZI::PixelType::Invalid; // get the pixeltype of the first readable subblock @@ -34,7 +34,7 @@ Reader::Reader(const wchar_t* file_name_) { std::shared_ptr sp; sp = std::shared_ptr(new StreamImplLockingRead(file_name_)); - m_czireader->Open(sp); + m_czireader->Open(sp, nullptr); m_statistics = m_czireader->GetStatistics(); // create a reference for finding one or more subblock indices from a CDimCoordinate checkSceneShapes(); @@ -516,7 +516,10 @@ Reader::tileBoundingBoxesWith(SubblockSortable& subblocksToFind_) auto extractor = [&](const SubblockIndexVec::value_type& match_) { auto subblk = m_czireader->ReadSubBlock(match_.second); auto sbkInfo = subblk->GetSubBlockInfo(); - return TileBBoxMap::value_type(match_.first, sbkInfo.logicalRect); + libCZI::IntRect sbkRect = sbkInfo.logicalRect; + sbkRect.w = sbkInfo.physicalSize.w; + sbkRect.h = sbkInfo.physicalSize.h; + return TileBBoxMap::value_type(match_.first, sbkRect); }; transform(matches.begin(), matches.end(), std::inserter(ans, ans.end()), extractor); diff --git a/aicspylibczi/_version.py b/aicspylibczi/_version.py index d45e7358..be8c31a9 100644 --- a/aicspylibczi/_version.py +++ b/aicspylibczi/_version.py @@ -1,4 +1,4 @@ """Version information.""" # The following line *must* be the last in the module, exactly as formatted: -__version__ = "3.1.2" +__version__ = "3.1.3" diff --git a/libCZI b/libCZI index 9460669c..b0898cbf 160000 --- a/libCZI +++ b/libCZI @@ -1 +1 @@ -Subproject commit 9460669ce533ffb79be0cf41cd3f9d39efd04d31 +Subproject commit b0898cbf1f90eb2b61791baefce1c6df9ea8fa3d diff --git a/setup.cfg b/setup.cfg index c4877813..cdd8d931 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 3.1.2 +current_version = 3.1.3 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? diff --git a/setup.py b/setup.py index 29acb90c..d35bab7a 100644 --- a/setup.py +++ b/setup.py @@ -107,7 +107,7 @@ def build_extension(self, ext): name='aicspylibczi', # Do not edit this string manually, always use bumpversion # Details in CONTRIBUTING.md - version='3.1.2', + version='3.1.3', author='Jamie Sherman, Paul Watkins', author_email='jamies@alleninstitute.org, pwatkins@gmail.com', description='A python module and a python extension for Zeiss (CZI/ZISRAW) microscopy files.', From d4739ba3b0502fb1eada44b658cc1d774a0c22ae Mon Sep 17 00:00:00 2001 From: toloudis Date: Fri, 22 Mar 2024 16:36:04 -0700 Subject: [PATCH 2/8] restore reader code change --- _aicspylibczi/Reader.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/_aicspylibczi/Reader.cpp b/_aicspylibczi/Reader.cpp index ce56d1c1..73aae63c 100644 --- a/_aicspylibczi/Reader.cpp +++ b/_aicspylibczi/Reader.cpp @@ -516,10 +516,7 @@ Reader::tileBoundingBoxesWith(SubblockSortable& subblocksToFind_) auto extractor = [&](const SubblockIndexVec::value_type& match_) { auto subblk = m_czireader->ReadSubBlock(match_.second); auto sbkInfo = subblk->GetSubBlockInfo(); - libCZI::IntRect sbkRect = sbkInfo.logicalRect; - sbkRect.w = sbkInfo.physicalSize.w; - sbkRect.h = sbkInfo.physicalSize.h; - return TileBBoxMap::value_type(match_.first, sbkRect); + return TileBBoxMap::value_type(match_.first, sbkInfo.logicalRect); }; transform(matches.begin(), matches.end(), std::inserter(ans, ans.end()), extractor); From 91a4a876019e0eac54b603a940ceab8aaa381ebb Mon Sep 17 00:00:00 2001 From: toloudis Date: Fri, 22 Mar 2024 16:56:30 -0700 Subject: [PATCH 3/8] hopefully fix test reader --- c_tests/test_Reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_tests/test_Reader.cpp b/c_tests/test_Reader.cpp index faa648d0..38819d7c 100644 --- a/c_tests/test_Reader.cpp +++ b/c_tests/test_Reader.cpp @@ -99,7 +99,7 @@ class CziCreatorIStream CziCreatorIStream() : m_czi() { - auto fp = std::shared_ptr(new CSimpleStreamImplCppStreams(L"resources/s_1_t_1_c_1_z_1.czi")); + auto fp = std::shared_ptr(new CSimpleInputOutputStreamImpl(L"resources/s_1_t_1_c_1_z_1.czi")); m_czi = std::make_unique(fp); } pylibczi::Reader* get() { return m_czi.get(); } From 7a1ba7b6bdf94047f3c80e4dc56762f605656e2b Mon Sep 17 00:00:00 2001 From: toloudis Date: Fri, 22 Mar 2024 17:11:05 -0700 Subject: [PATCH 4/8] update checkout action version --- .github/workflows/build-docs.yml | 2 +- .github/workflows/cpp-build-main.yml | 2 +- .github/workflows/cpp-build-pr.yml | 2 +- .github/workflows/py-build-main.yml | 8 ++++---- .github/workflows/py-build-pr.yml | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 0a9844b0..88b18b91 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -9,7 +9,7 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Setup Python diff --git a/.github/workflows/cpp-build-main.yml b/.github/workflows/cpp-build-main.yml index c001b23e..fcba02eb 100644 --- a/.github/workflows/cpp-build-main.yml +++ b/.github/workflows/cpp-build-main.yml @@ -35,7 +35,7 @@ jobs: cc: "clang", cxx: "clang++" } steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: build and test diff --git a/.github/workflows/cpp-build-pr.yml b/.github/workflows/cpp-build-pr.yml index 7a57c691..2c39f4b3 100644 --- a/.github/workflows/cpp-build-pr.yml +++ b/.github/workflows/cpp-build-pr.yml @@ -29,7 +29,7 @@ jobs: cc: "clang", cxx: "clang++" } steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: build and test diff --git a/.github/workflows/py-build-main.yml b/.github/workflows/py-build-main.yml index b89eee0a..494eead4 100644 --- a/.github/workflows/py-build-main.yml +++ b/.github/workflows/py-build-main.yml @@ -20,7 +20,7 @@ jobs: python-version: [3.7, 3.8, 3.9, "3.10", 3.11] os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: setup python @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Set up Python @@ -61,7 +61,7 @@ jobs: needs: [python-test, lint] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true @@ -96,7 +96,7 @@ jobs: cibw-arch: win_amd64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/py-build-pr.yml b/.github/workflows/py-build-pr.yml index edb405d2..34d606dc 100644 --- a/.github/workflows/py-build-pr.yml +++ b/.github/workflows/py-build-pr.yml @@ -10,7 +10,7 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: setup python @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Set up Python From 0b37d3598d634a911d2aebd8e8afe53e93e9bcf2 Mon Sep 17 00:00:00 2001 From: toloudis Date: Fri, 22 Mar 2024 17:22:41 -0700 Subject: [PATCH 5/8] use correct platform independent api for test --- c_tests/test_Reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_tests/test_Reader.cpp b/c_tests/test_Reader.cpp index 38819d7c..9d61bb55 100644 --- a/c_tests/test_Reader.cpp +++ b/c_tests/test_Reader.cpp @@ -99,7 +99,7 @@ class CziCreatorIStream CziCreatorIStream() : m_czi() { - auto fp = std::shared_ptr(new CSimpleInputOutputStreamImpl(L"resources/s_1_t_1_c_1_z_1.czi")); + auto fp = std::shared_ptr(libCZI::CreateInputOutputStreamForFile(L"resources/s_1_t_1_c_1_z_1.czi")); m_czi = std::make_unique(fp); } pylibczi::Reader* get() { return m_czi.get(); } From ba85de61f273985fe786c0ac8d1b45e766daf5de Mon Sep 17 00:00:00 2001 From: toloudis Date: Fri, 22 Mar 2024 17:55:02 -0700 Subject: [PATCH 6/8] revert version till after merge --- aicspylibczi/_version.py | 2 +- setup.cfg | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aicspylibczi/_version.py b/aicspylibczi/_version.py index be8c31a9..d45e7358 100644 --- a/aicspylibczi/_version.py +++ b/aicspylibczi/_version.py @@ -1,4 +1,4 @@ """Version information.""" # The following line *must* be the last in the module, exactly as formatted: -__version__ = "3.1.3" +__version__ = "3.1.2" diff --git a/setup.cfg b/setup.cfg index cdd8d931..c4877813 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 3.1.3 +current_version = 3.1.2 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? diff --git a/setup.py b/setup.py index d35bab7a..29acb90c 100644 --- a/setup.py +++ b/setup.py @@ -107,7 +107,7 @@ def build_extension(self, ext): name='aicspylibczi', # Do not edit this string manually, always use bumpversion # Details in CONTRIBUTING.md - version='3.1.3', + version='3.1.2', author='Jamie Sherman, Paul Watkins', author_email='jamies@alleninstitute.org, pwatkins@gmail.com', description='A python module and a python extension for Zeiss (CZI/ZISRAW) microscopy files.', From 5487aea0d06704213316a44a2a23f90bcee4b7b7 Mon Sep 17 00:00:00 2001 From: toloudis Date: Fri, 22 Mar 2024 17:57:02 -0700 Subject: [PATCH 7/8] update actions/setup-python --- .github/workflows/build-docs.yml | 2 +- .github/workflows/py-build-main.yml | 6 +++--- .github/workflows/py-build-pr.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 88b18b91..421f3563 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -13,7 +13,7 @@ jobs: with: submodules: true - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install Dependencies diff --git a/.github/workflows/py-build-main.yml b/.github/workflows/py-build-main.yml index 494eead4..d89549bc 100644 --- a/.github/workflows/py-build-main.yml +++ b/.github/workflows/py-build-main.yml @@ -24,7 +24,7 @@ jobs: with: submodules: true - name: setup python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -45,7 +45,7 @@ jobs: with: submodules: true - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install dependencies @@ -124,7 +124,7 @@ jobs: if: "contains(github.event.head_commit.message, 'Bump version')" steps: - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 - uses: actions/download-artifact@v2 with: diff --git a/.github/workflows/py-build-pr.yml b/.github/workflows/py-build-pr.yml index 34d606dc..19f1e971 100644 --- a/.github/workflows/py-build-pr.yml +++ b/.github/workflows/py-build-pr.yml @@ -14,7 +14,7 @@ jobs: with: submodules: true - name: setup python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install aicspylibczi @@ -42,7 +42,7 @@ jobs: with: submodules: true - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install dependencies From 48c6e45646908078a55bb9fbfe595ad5185cb685 Mon Sep 17 00:00:00 2001 From: toloudis Date: Fri, 22 Mar 2024 17:59:12 -0700 Subject: [PATCH 8/8] update codecov action version --- .github/workflows/py-build-main.yml | 2 +- .github/workflows/py-build-pr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/py-build-main.yml b/.github/workflows/py-build-main.yml index d89549bc..9f371bec 100644 --- a/.github/workflows/py-build-main.yml +++ b/.github/workflows/py-build-main.yml @@ -35,7 +35,7 @@ jobs: run: | pytest --cov-report xml --cov=aicspylibczi aicspylibczi/tests - name: Upload codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 lint: runs-on: ubuntu-latest diff --git a/.github/workflows/py-build-pr.yml b/.github/workflows/py-build-pr.yml index 19f1e971..06ae0888 100644 --- a/.github/workflows/py-build-pr.yml +++ b/.github/workflows/py-build-pr.yml @@ -32,7 +32,7 @@ jobs: pip install dist/aicspylibczi-$MY_VERSION.tar.gz shell: bash - name: Upload codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 lint: runs-on: ubuntu-latest