Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into section-change-error
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeplf committed Oct 11, 2024
2 parents 85344eb + 4375467 commit dac03be
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 25 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/publish-sdist-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:

CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: 'cp*'
CIBW_SKIP: 'cp35-* cp36-* cp37-* cp313-* *-manylinux_i686 *-musllinux_* *-win32'
CIBW_SKIP: 'cp35-* cp36-* cp37-* cp38-* *-manylinux_i686 *-musllinux_* *-win32'
CIBW_BEFORE_TEST: pip install -r {project}/tests/requirement_tests.txt
CIBW_TEST_COMMAND: pytest -s -v {project}/tests
UNIXY_HDF5_VERSION: 1.14.3
Expand All @@ -21,7 +21,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-2022]
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-20.04, windows-2022, macos-13, macos-14]

steps:
- uses: actions/checkout@v4
Expand All @@ -39,7 +40,7 @@ jobs:
- name: Cache HDF5 On Linux/macOS
if: runner.os == 'Linux' || runner.os == 'macOS'
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-hdf5-posix
env:
cache-name: cache-hdf5-posix
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
- name: Build wheels Mac OS
if: runner.os == 'macOS'
env:
CIBW_ENVIRONMENT_PASS: "STATIC_HDF5 CMAKE_PREFIX_PATH CMAKE_OSX_ARCHITECTURES MACOSX_DEPLOYMENT_TARGET"
CIBW_ENVIRONMENT_PASS: "STATIC_HDF5 CMAKE_PREFIX_PATH"
CIBW_BEFORE_BUILD: |
# CMake complains if the dependencies come from within the same tree
# as the source, so we'll just pretend they are elsewhere
Expand All @@ -80,25 +81,13 @@ jobs:
# used by setup.py to decide if to set `FindHDF5` to use static hdf5 libraries
export STATIC_HDF5=True
# x86_64 macOS allows for cross compilation; first we do arm64,
# only for the 11.0 target; and store in the cache the compiled code...
export CIBW_ARCHS_MACOS="arm64"
export CMAKE_OSX_ARCHITECTURES="arm64"
export MACOSX_DEPLOYMENT_TARGET="11.0"
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-$CIBW_ARCHS_MACOS/install
python -m cibuildwheel --output-dir dist
# ...and now we do both targets for x86_64
export CIBW_ARCHS_MACOS="x86_64"
export CMAKE_OSX_ARCHITECTURES="x86_64"
unset MACOSX_DEPLOYMENT_TARGET
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-$CIBW_ARCHS_MACOS/install
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-`uname -m`/install
python -m cibuildwheel --output-dir dist
- name: Cache HDF5 On Windows
if: runner.os == 'Windows'
id: cache-hdf5-windows
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-hdf5-windows
with:
Expand All @@ -122,7 +111,7 @@ jobs:
# this has a partial table:
# https://devblogs.microsoft.com/cppblog/side-by-side-minor-version-msvc-toolsets-in-visual-studio-2017/
run: |
# vc141 was removed, add it back here: https://github.com/actions/runner-images/issues/9701
# vc141 was removed, add it back here: https://github.com/actions/runner-images/issues/9701
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd= @(
Expand Down Expand Up @@ -198,7 +187,7 @@ jobs:
- name: Download artifacts produced during the build_wheels and build_sdist jobs
uses: actions/download-artifact@v4
with:
name: dist-*
pattern: dist-*
path: dist/
merge-multiple: true

Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/HighFive
Submodule HighFive updated 134 files
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,29 @@ Improvements:
* New SWC parser:
* handles `locale` correctly, so decimal numbers using comma are allowed
* ~800 line SWC parse time goes from 0.976 to 0.699
* Doesn't create changes to bifurcations at the root nodes of SWC fils
* Doesn't create changes to bifurcations at the root nodes of SWC files
* More strict Neuromorpho 3 point soma checks
* disallow repeated Sample IDs
* Follow https://swc-specification.readthedocs.io/en/latest/swc.html more closely
* Allow only positive integer Sample IDs
* Allow for the type of neurite to change at bifurcation points
* Allow Window style `End of Lines`
* allow trailing spaces on sample lines

* Since this is a large change to the SWC parser, the minor release was increased

v3.3.10
=======
* This is primarily so that 3.13 wheels exist before the new SWC parser is put into production.
* try to work around removal of older MSVC tools
* Remove Errorlevel::Info; it's not an error if it's only informative
* Update upload/download actions to v4.
* update HDF5 url
* Update HighFive to 2.10.0

v3.3.9
======
* remove embarrassing debug print; Hat-tip SarahM

v3.3.8
======
Expand Down
2 changes: 1 addition & 1 deletion ci/hdf5-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function download_unpack_hdf5 {
local name=CMake-hdf5-$UNIXY_HDF5_VERSION.tar.gz
if [[ ! -e $name ]]; then
echo "Downloading & unpacking HDF5 ${UNIXY_HDF5_VERSION}"
curl -fsSLO "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${UNIXY_HDF5_VERSION%.*}/hdf5-$UNIXY_HDF5_VERSION/src/$name"
curl -fsSLO "https://hdf-wordpress-1.s3.amazonaws.com/wp-content/uploads/manual/HDF5/HDF5_${UNIXY_HDF5_VERSION//\./_}/src/$name"
fi
tar xzf "$name"
popd
Expand Down
3 changes: 1 addition & 2 deletions src/readers/morphologySWC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class SWCBuilder
if (children_.count(s.id) > 0 && children_.at(s.id).size() > 1) {
std::vector<SWCSample> soma_bifurcations;
for (auto id : children_.at(s.id)) {
if (samples_[id].type == SECTION_SOMA) {
if (samples_[id].type == SECTION_SOMA && s.parentId != SWC_ROOT) {
soma_bifurcations.push_back(samples_[id]);
}
}
Expand Down Expand Up @@ -528,7 +528,6 @@ class SWCBuilder
WarningHandler* warning_handler_;
unsigned int options_;
};

} // namespace details

namespace readers {
Expand Down
3 changes: 3 additions & 0 deletions src/readers/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ namespace morphio {

#endif

// Only create the `locale` to facilitate number handling once
StringToNumber::StringToNumber()
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
// On windows, use their locale handling for their runtime
: locale(_create_locale(LC_ALL, "C")) {
}
#else
// On other platforms, use the POSIX version
: locale(newlocale(LC_NUMERIC_MASK, "POSIX", nullptr)) {
}
#endif
Expand Down

0 comments on commit dac03be

Please sign in to comment.