Unverified Commit 53e3bc01 authored by Kelvin Rodriguez's avatar Kelvin Rodriguez Committed by GitHub
Browse files

added findfeaturesSegment script (#5091)

* added findfeaturesSegment script

* now parrallelized

* updated logging code

* added help string

* added help string

* added envs and fixed progress bar output

* staging things

* added python stuff, fixed segment issues, addressed coments

* addressing comments

* added more doc strings

* made pybindings on by default

* addressing comments

* fixed some things, local testing

* updated install steps

* added basic tests

* reverting ale pin

* changed license

* turn on pybindings in jenkins

* renamed script

* shadow rename?
parent 3d77a879
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ pipeline {
                cd build
                cmake -GNinja -DJP2KFLAG=ON  \
                      -DKAKADU_INCLUDE_DIR=${KAKADU_HEADERS} \
                      -Dpybindings=OFF \
                      -Dpybindings=ON \
                      -DCMAKE_BUILD_TYPE=RELEASE \
                      -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
                      ../isis
@@ -117,6 +117,8 @@ pipeline {
                    cd $WORKSPACE/isis/pytests 
                    pytest .

                    cd $WORKSPACE/isis/python_bindings/tests  
                    pytest .
                    '''
                }
            }
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ channels:
  - defaults

dependencies:
  - kalasiris 
  - ale=0.9.1
  - armadillo
  - boost=1.72
@@ -48,6 +49,7 @@ dependencies:
  - opencv>=4.5.2
  - openssl>=1.1.1k
  - pcl >= 1.10.0
  - plio
  - protobuf<3.20
  - python>=3.7.11
  - pytest
+4 −5
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ option(buildMissions "Build the mission specific modules" ON )
option(buildStaticCore "Build libisis static as well as dynamic"        OFF )
option(buildTests      "Set up unit, application, and module tests."    ON  )
option(JP2KFLAG        "Whether or not to build using JPEG2000 support" OFF )
option(pybindings      "Turn on to build Python bindings"               OFF )
option(pybindings      "Turn on to build Python bindings"               ON )

# if cmake install prefix is not set, and conda env is activated, use the
# conda env as the install directory.
@@ -309,10 +309,6 @@ if(APPLE)
  find_package(OpenGL REQUIRED)
endif(APPLE)

if(pybindings)
 find_package(Python REQUIRED)
endif()

# Iterate through all variables and extract the libraries and include directories
get_cmake_property(_variableNames VARIABLES) # Get All VARIABLES

@@ -378,6 +374,9 @@ include_directories(${CMAKE_BINARY_DIR}/inc)
set(CORE_LIB_NAME isis)
message(STATUS "CORE LIB:  ${CORE_LIB_NAME}")

if(pybindings)
 add_subdirectory(python_bindings)
endif()

# Specify relative library include paths which will be set up on
#  the installed files.
+0 −1
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ include(CodeGeneration)

# Incorporate an application folder
function(add_isis_app folder libDependencies)

  # The internal build name will be different than the output name
  # - This deals with problems compiling same-named targets on case-insensitive machines.
  get_filename_component(appName ${folder}  NAME)
+49 −0
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.14)

# Setup for SWIG
set(CMAKE_SWIG_FLAGS)
find_package(SWIG REQUIRED)
include(UseSWIG)
list(APPEND CMAKE_SWIG_FLAGS "-py3;-DPY3")

message(STATUS "SWIG flags: " ${CMAKE_SWIG_FLAGS} )

# Setup for Python linking
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)

# Setup for wrapper library
set(ASTROSET_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/astroset")
set(ASTROSET_SOURCES astroset.i
                   UserInterface.i 
                   )

set(ASTROSET_APPS apps/)

set_source_files_properties(${ASTROSET_SOURCES} PROPERTIES CPLUSPLUS ON)
swig_add_library(astroset
                 LANGUAGE python
                 SOURCES ${ASTROSET_SOURCES}
                 OUTPUT_DIR ${ASTROSET_OUTPUT_DIR})
swig_link_libraries(astroset isis Python3::Module)
set_target_properties(astroset PROPERTIES SWIG_USE_TARGET_INCLUDE_DIRECTORIES TRUE)
set_target_properties(astroset PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${ASTROSET_OUTPUT_DIR})

# Create the files to install the Python wrapper
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
               ${CMAKE_CURRENT_BINARY_DIR}/setup.py)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
               ${ASTROSET_OUTPUT_DIR}/__init__.py
               COPYONLY)

file(COPY ${ASTROSET_APPS}
          DESTINATION
          ${ASTROSET_OUTPUT_DIR}/apps/)

set(ASTROSET_APP_XML_FILES "apps/findFeaturesSegment/findFeaturesSegment.xml")
file(COPY ${ASTROSET_APP_XML_FILES} DESTINATION ${CMAKE_BINARY_DIR}/bin/xml/ )
install(FILES ${ASTROSET_APP_XML_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/xml/)

# Setup to run setup tools on install 
install(CODE "execute_process(COMMAND $ENV{CONDA_PREFIX}/bin/pip install ${CMAKE_CURRENT_BINARY_DIR}/ --prefix=${CMAKE_INSTALL_PREFIX}
                              WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
Loading