Skip to content

Commit b3feae9

Browse files
committed
Merge 1-release-2025 into main
2 parents 4e17d71 + c3f36f1 commit b3feae9

192 files changed

Lines changed: 15018 additions & 2947 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/conda-package-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,5 @@ on:
1919
jobs:
2020
build:
2121
uses: openalea/action-build-publish-anaconda/.github/workflows/openalea_ci.yml@main
22-
with:
23-
conda-directory: "./stat_tool/conda"
2422
secrets:
2523
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}

.gitignore

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
*.py[cod]
2+
.DS_Store
3+
# C extensions
4+
*.so
5+
6+
# Packages
7+
*.egg
8+
*.egg-info
9+
build
10+
eggs
11+
.eggs
12+
parts
13+
var
14+
sdist
15+
debian/
16+
develop-eggs
17+
.installed.cfg
18+
lib
19+
lib64
20+
MANIFEST
21+
**/__pycache__
22+
**/vpsequence_analysis
23+
CMakeFiles
24+
25+
# Installer logs
26+
pip-log.txt
27+
npm-debug.log
28+
pip-selfcheck.json
29+
30+
# Unit test / coverage reports
31+
.coverage
32+
.tox
33+
nosetests.xml
34+
htmlcov
35+
.cache
36+
.pytest_cache
37+
.mypy_cache
38+
39+
# Translations
40+
*.mo
41+
42+
# Mr Developer
43+
.mr.developer.cfg
44+
.project
45+
.pydevproject
46+
47+
# SQLite
48+
test_exp_framework
49+
50+
# npm
51+
node_modules/
52+
53+
# dolphin
54+
.directory
55+
libpeerconnection.log
56+
57+
# setuptools
58+
dist
59+
60+
# IDE Files
61+
atlassian-ide-plugin.xml
62+
.idea/
63+
*.swp
64+
*.kate-swp
65+
.ropeproject/
66+
67+
# Python3 Venv Files
68+
.venv/
69+
bin/
70+
include/
71+
lib/
72+
lib64
73+
pyvenv.cfg
74+
share/
75+
venv/
76+
.python-version
77+
78+
# Cython
79+
*.c
80+
81+
# Emacs backup
82+
*~
83+
84+
# VSCode
85+
/.vscode
86+
87+
# Automatically generated files
88+
docs/preconvert
89+
site/
90+
out
91+
92+
# Sphinx
93+
_static

CMakeLists.txt

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
# Initialize the CMake project
2+
cmake_minimum_required(VERSION 3.20)
3+
4+
##################################################
5+
# If we are running in a Conda environment, we automatically
6+
# add the Conda env prefix to the CMAKE_PREFIX_PATH
7+
8+
if(DEFINED ENV{CONDA_PREFIX})
9+
list(APPEND CMAKE_PREFIX_PATH "$ENV{CONDA_PREFIX}")
10+
#TODO: Windows Conda environments are structured differently,
11+
# how unfortunate is this?
12+
list(APPEND CMAKE_PREFIX_PATH "$ENV{CONDA_PREFIX}/Library")
13+
endif()
14+
15+
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
16+
include("Anaconda")
17+
18+
##################################################
19+
# Define the version
20+
21+
if(SKBUILD)
22+
set(SEQANA_TOOL_VERSION ${SKBUILD_PROJECT_VERSION})
23+
else()
24+
set(SEQANA_VERSION "2.0.0")
25+
endif()
26+
27+
project(openalea.sequence_analysis
28+
VERSION ${SEQANA_VERSION}
29+
LANGUAGES CXX
30+
DESCRIPTION "Statistical analysis of plant architecture sequences")
31+
32+
##################################################
33+
# Set CMake policies for this project
34+
35+
# We allow <Package>_ROOT (env) variables for locating dependencies using find_paclage
36+
cmake_policy(SET CMP0074 NEW)
37+
# We allow target_sources to convert relative paths to absolute paths
38+
cmake_policy(SET CMP0076 NEW)
39+
# for Python*_FIND_STRATEGY=LOCATION
40+
cmake_policy(SET CMP0094 NEW)
41+
cmake_policy(SET CMP0167 NEW)
42+
##################################################
43+
# Initialize some default paths
44+
# See https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
45+
include(GNUInstallDirs)
46+
47+
##################################################
48+
# Set C++ standard and compile options
49+
50+
set(CMAKE_CXX_STANDARD 14)
51+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
52+
# set(CMAKE_CXX_EXTENSIONS ON)
53+
54+
# This may be set in pyproject.toml
55+
set(CMAKE_VERBOSE_MAKEFILE ON)
56+
57+
##################################################
58+
# For Python bindings, we need to enable position-independent code
59+
set(CMAKE_POSITION_INDEPENDENT_CODE ON) # For shared libs
60+
61+
##################################################
62+
# TODO : REMOVE?
63+
# if(WIN32)
64+
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -enable-stdcall-fixup -enable-auto-import -enable-runtime-pseudo-reloc -s")
65+
# endif()
66+
67+
68+
# RPath settings
69+
set(CMAKE_SKIP_BUILD_RPATH FALSE)
70+
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
71+
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
72+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
73+
list(
74+
FIND
75+
CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
76+
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
77+
isSystemDir
78+
)
79+
if("${isSystemDir}" STREQUAL "-1")
80+
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
81+
endif("${isSystemDir}" STREQUAL "-1")
82+
83+
84+
if (WIN32)
85+
string(REGEX REPLACE "/W3" "/W0" ${CMAKE_CXX_FLAGS} "${${CMAKE_CXX_FLAGS}}")
86+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD")
87+
88+
# To fix compilation error with vc14 and boost
89+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DHAVE_SNPRINTF")
90+
endif()
91+
92+
# Options
93+
option(WITH_EFENCE "Build with efence library" OFF)
94+
option(WITH_TEST "Build tests" OFF)
95+
96+
##################################################
97+
# Add a library for sequence_analysis and its Python wrappers
98+
add_library(oasequence_analysis SHARED)
99+
100+
##################################################
101+
# Find external dependencies
102+
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
103+
find_package(Boost REQUIRED COMPONENTS python)
104+
# TODO
105+
106+
find_library(STAT_TOOL_LIB NAMES oastat_tool)
107+
108+
#find_package(openalea.stat_tool REQUIRED)
109+
110+
##################################################
111+
# Setup lib, inc, defines for C++ oastat_tool lib
112+
113+
target_link_libraries(oasequence_analysis PUBLIC ${STAT_TOOL_LIB})
114+
115+
target_include_directories(oasequence_analysis
116+
PUBLIC
117+
${Boost_INCLUDE_DIRS}
118+
${CONDA_ENV}include
119+
)
120+
121+
# Export symbols on Windows
122+
# if (WIN32 OR MSVC)
123+
# target_compile_definitions(oasequence_analysis PUBLIC STAT_TOOL_MAKEDLL)
124+
# endif()
125+
126+
# Optionally add efence
127+
if(WITH_EFENCE)
128+
find_library(EFENCE_LIBRARY NAMES efence)
129+
if(EFENCE_LIBRARY)
130+
target_link_libraries(oasequence_analysis PUBLIC efence)
131+
target_compile_definitions(oasequence_analysis PUBLIC DEBUG)
132+
else()
133+
message(WARNING "Could not find efence library, disabling it")
134+
endif()
135+
endif()
136+
137+
# Add files to build
138+
add_subdirectory(src/cpp/sequence_analysis)
139+
140+
141+
##################################################
142+
# Add a Python binding library
143+
python_add_library(_sequence_analysis MODULE)
144+
145+
target_include_directories(oasequence_analysis
146+
PUBLIC
147+
"src/cpp"
148+
)
149+
150+
target_link_libraries(_sequence_analysis
151+
PRIVATE
152+
${OASTAT_LIB}
153+
oasequence_analysis
154+
Boost::python
155+
Python::Module
156+
)
157+
158+
target_compile_definitions(_sequence_analysis PRIVATE BOOST_ALL_NO_LIB)
159+
160+
# Control the output name of the produced shared library
161+
set_target_properties(_sequence_analysis PROPERTIES PREFIX "")
162+
set_target_properties(_sequence_analysis PROPERTIES OUTPUT_NAME "_sequence_analysis")
163+
if(WIN32)
164+
set_target_properties(_sequence_analysis PROPERTIES SUFFIX ".pyd")
165+
elseif(APPLE)
166+
set_target_properties(_sequence_analysis PROPERTIES SUFFIX ".so")
167+
endif()
168+
169+
add_subdirectory("src/wrapper/")
170+
171+
172+
if(APPLE)
173+
set_target_properties(_sequence_analysis PROPERTIES INSTALL_RPATH "@loader_path/.")
174+
elseif(UNIX)
175+
set_target_properties(_sequence_analysis PROPERTIES INSTALL_RPATH "$ORIGIN/.")
176+
endif()
177+
178+
##################################################
179+
# Install targets and headers for sequence_analysis lib
180+
install(TARGETS oasequence_analysis
181+
RUNTIME DESTINATION "${CONDA_ENV}bin/"
182+
LIBRARY DESTINATION "${CONDA_ENV}lib/"
183+
ARCHIVE DESTINATION "${CONDA_ENV}lib/"
184+
)
185+
186+
install(
187+
TARGETS
188+
_sequence_analysis
189+
DESTINATION "${SKBUILD_PLATLIB_DIR}/openalea/sequence_analysis"
190+
)
191+
192+
# Optionally handle tests
193+
# TODO TO TEST
194+
if(WITH_TEST)
195+
enable_testing()
196+
add_subdirectory(test/cpp)
197+
endif()
198+

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Sequence Analysis
2+
3+
_________________
4+
5+
[![Docs](https://readthedocs.org/projects/sequence_analysis/badge/?version=latest)](https://sequence_analysis.readthedocs.io/)
6+
[![Build Status](https://github.com/openalea/sequence_analysis/actions/workflows/conda-package-build.yml/badge.svg?branch=main)](https://github.com/openalea/sequence_analysis/actions/workflows/conda-package-build.yml?query=branch%3Amaster)
7+
[![License](https://img.shields.io/badge/License--CeCILL-C-blue)](https://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html)
8+
[![Anaconda-Server Badge](https://anaconda.org/openalea3/sequence_analysis/badges/version.svg)](https://anaconda.org/openalea3/sequence_analysis)
9+
10+
_________________
11+
12+
[Read Latest Documentation](https://sequence_analysis.readthedocs.io/) - [Browse GitHub Code Repository](https://github.com/openalea/sequence_analysis/)
13+
14+
_________________
15+
16+
**sequence analysis** Basic Statistical tools used by different Structure Analysis libraries.
17+
18+
### Contributors
19+
20+
Thanks to all that ontribute making this package what it is !
21+
22+
</a>
23+
<a href="https://github.com/openalea/sequence_analysis/graphs/contributors">
24+
<img src="https://contrib.rocks/image?repo=openalea/sequence_analysis" />
25+
</a>

README.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
vplants.stat_tool
1+
openalea.sequence_analysis
22
-----------------
33

44
Description
@@ -31,5 +31,4 @@ qt >= 4.2 (on windows)
3131
Dependencies
3232
---------------------
3333

34-
vplants.tool
35-
vplants.stat_tool
34+
openalea.stat_tool

SConstruct

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)