Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ on:

jobs:
test:
name: ${{ matrix.os }} ${{ matrix.python-version }}
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.11]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter doesn't exist (anymore???)


steps:
- name: Checkout
Expand All @@ -25,7 +24,6 @@ jobs:
uses: mamba-org/setup-micromamba@v2
with:
environment-file: .github/workflows/environment.yaml
python-version: ${{ matrix.python-version }}

# this will set the system compiler;
# I don't know how to set the conda compilers for windows
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_unix.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

export PY_BIN="$CONDA_PREFIX/bin/python"
cmake . \
mkdir -p bld
cd bld

cmake .. \
-DWITHIN_TRAVIS=ON \
-DWITH_QPBO=OFF \
-DWITH_HDF5=ON \
Expand All @@ -13,10 +15,8 @@ cmake . \
-DWITH_GUROBI=OFF \
-DBUILD_CPP_TEST=OFF \
-DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \
-DPython_NumPy_INCLUDE_DIRS=$(python -c "import numpy; print(numpy.get_include())") \
-DPYTHON_EXECUTABLE="$PY_BIN" \
-DCMAKE_CXX_FLAGS="-std=c++17" \
-DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX" \
-DPython_EXECUTABLE="${CONDA_PREFIX}/bin/python" \
-DCMAKE_INSTALL_PREFIX="${CONDA_PREFIX}" \
-DBUILD_NIFTY_PYTHON=ON
make -j 4
make install
13 changes: 7 additions & 6 deletions .github/workflows/build_win.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
REM https://stackoverflow.com/questions/6832666/lnk2019-when-including-asio-headers-solution-generated-with-cmake
cmake . -G "NMake Makefiles" ^
mkdir bld
cd bld
cmake .. -G "NMake Makefiles" ^
-DWITH_QPBO=OFF ^
-DWITH_HDF5=OFF ^
-DWITH_GLPK=OFF ^
-DWITH_CPLEX=OFF ^
-DWITH_GUROBI=OFF ^
-DBUILD_CPP_TEST=OFF ^
-DCMAKE_PREFIX_PATH="%CONDA_PREFIX%" ^
-DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%" ^
-DPython_NumPy_INCLUDE_DIRS=$(python -c "import numpy; print(numpy.get_include())") ^
-DCMAKE_CXX_FLAGS="/std:c++17 /EHsc" ^
-DCMAKE_PREFIX_PATH:PATH="%CONDA_PREFIX%" ^
-DCMAKE_INSTALL_PREFIX:PATH="%CONDA_PREFIX%" ^
-DPython_EXECUTABLE:PATH="%CONDA_PREFIX%\python.exe" ^
-DCMAKE_CXX_FLAGS="/EHsc" ^
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you specify /EHsc i'm not familiar with windows but can you remove this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My windows knowledge is also limited... It seems like this is for suppressing some warnings during compilation. Do you think there is a problem in having it here?

-DBUILD_NIFTY_PYTHON=ON ^
-DWITH_HDF5=OFF ^
-DWITH_Z5=ON ^
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: nifty-build-env
channels:
- conda-forge
dependencies:
- boost-cpp>=1.63
- libboost-devel
- cmake
- compilers
- h5py
Expand All @@ -12,4 +12,4 @@ dependencies:
- xtensor
- xtensor-python
- vigra
- z5py
- z5py >=2.0.20
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repos: []
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.10)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)

project(NIFTY)
set(${PROJECT_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
cmake_policy(SET CMP0057 NEW)



Expand Down Expand Up @@ -158,7 +159,7 @@ endif()
#-------------------------------------------------------------------------------------------------------------------
# find boost
#-------------------------------------------------------------------------------------------------------------------
find_package(Boost 1.63.0 REQUIRED)
find_package(Boost 1.63.0 CONFIG REQUIRED)

# see this issue for discussions about the filesystem lib in CMake
# https://gitlab.kitware.com/cmake/cmake/issues/17834
Expand Down
93 changes: 0 additions & 93 deletions cmake/modules/FindNUMPY.cmake

This file was deleted.

22 changes: 11 additions & 11 deletions cmake/modules/PythonLibTest.cmake
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

#message(PYTHON_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
if(PYTHON_VERSION_MAJOR STREQUAL "2")
#message(Python_VERSION_MAJOR ${Python_VERSION_MAJOR})
if(Python_VERSION_MAJOR STREQUAL "2")
#message(STATUS "222222")
find_program(NOSETESTS_PATH NAMES
#"nosetests${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
#"nosetests-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
#"nosetests${PYTHON_VERSION_MAJOR}"
#"nosetests-${PYTHON_VERSION_MAJOR}"
#"nosetests${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}"
#"nosetests-${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}"
#"nosetests${Python_VERSION_MAJOR}"
#"nosetests-${Python_VERSION_MAJOR}"
"nosetests")
else()
find_program(NOSETESTS_PATH NAMES
#"nosetests${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
#"nosetests-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
#"nosetests${PYTHON_VERSION_MAJOR}"
#"nosetests-${PYTHON_VERSION_MAJOR}"
#"nosetests${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}"
#"nosetests-${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}"
#"nosetests${Python_VERSION_MAJOR}"
#"nosetests-${Python_VERSION_MAJOR}"
"nosetests3")
endif()

Expand Down Expand Up @@ -101,4 +101,4 @@ function(add_python_test_target TARGET_NAME)
add_dependencies(${TARGET_NAME} ${COPY_TARGET})


endfunction()
endfunction()
25 changes: 15 additions & 10 deletions environment.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name:
nifty-dev
name: nifty-dev
channels:
- conda-forge
- conda-forge
dependencies:
- boost-cpp>=1.63
- h5py
- nlohmann_json
- scikit-image
- xtensor>=0.21,<0.22
- xtensor-python>=0.24,<0.25
- python 3.12
- numpy
- xtensor >=0.26,<0.27
- xtensor-python >=0.28,<0.29
- libboost-devel
- libvigra
# Vigra Numpy is used at link time too
- vigra
- z5py
- z5py >=2.0.20
# build dependencies needed for z5
- nlohmann_json
- blosc
- bzip2
- zlib
2 changes: 1 addition & 1 deletion include/nifty/array/arithmetic_array.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <array>
#include <vector>

#include "xtensor/xtensor.hpp"
#include "xtensor.hpp"
#include "nifty/tools/runtime_check.hxx"

namespace nifty{
Expand Down
4 changes: 2 additions & 2 deletions include/nifty/distributed/graph_extraction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <set>
#include <boost/functional/hash.hpp>

#include "xtensor/xtensor.hpp"
#include "xtensor/xadapt.hpp"
#include "xtensor.hpp"
#include "xtensor/containers/xadapt.hpp"

#include "z5/factory.hxx"
#include "z5/attributes.hxx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "nifty/graph/agglo/cluster_policies/cluster_policies_common.hxx"
#include <iostream>
#include <algorithm> // std::max
#include <xtensor/xview.hpp>
#include <xtensor/views/xview.hpp>
using namespace xt::placeholders;


Expand Down Expand Up @@ -633,4 +633,3 @@ namespace nifty{
} // namespace agglo
} // namespace nifty::graph
} // namespace nifty

4 changes: 2 additions & 2 deletions include/nifty/graph/label_propagation.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
// #include "nifty/graph/edge_contraction_graph.hxx"
// #include "nifty/graph/agglo/cluster_policies/cluster_policies_common.hxx"
#include <iostream>
#include "xtensor/xarray.hpp"
#include "xtensor/containers/xarray.hpp"

#include "nifty/parallel/threadpool.hxx"
#include <ctime> // Random seed for shuffle
#include <xtensor/xrandom.hpp>
#include <xtensor/generators/xrandom.hpp>


namespace nifty{
Expand Down
Loading