cf-streamfind 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: cf-streamfind
3
+ Version: 0.1.0
4
+ Summary: CogniFlow package with processing steps based on the StreamFind native algorithms.
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ Provides-Extra: test
8
+ Requires-Dist: pytest<9.0,>=8.0; extra == "test"
9
+
10
+ # cf-streamfind
11
+
12
+ Generated CogniFlow step-package scaffold.
13
+
14
+ - Package id: `cf.streamfind`
15
+ - Python module: `cf_streamfind`
16
+ - Manifest: `src/cf_streamfind/steps.nq`
17
+ - C++ source: `src/cf_streamfind/cpp/steps.cpp`
18
+
19
+ Install locally:
20
+
21
+ ```bash
22
+ pip install .
23
+ ```
@@ -0,0 +1,14 @@
1
+ # cf-streamfind
2
+
3
+ Generated CogniFlow step-package scaffold.
4
+
5
+ - Package id: `cf.streamfind`
6
+ - Python module: `cf_streamfind`
7
+ - Manifest: `src/cf_streamfind/steps.nq`
8
+ - C++ source: `src/cf_streamfind/cpp/steps.cpp`
9
+
10
+ Install locally:
11
+
12
+ ```bash
13
+ pip install .
14
+ ```
@@ -0,0 +1,28 @@
1
+ [build-system]
2
+ requires = ["setuptools>=70", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "cf-streamfind"
7
+ version = "0.1.0"
8
+ description = "CogniFlow package with processing steps based on the StreamFind native algorithms."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ dependencies = []
12
+
13
+ [project.optional-dependencies]
14
+ test = [
15
+ "pytest>=8.0,<9.0",
16
+ ]
17
+
18
+ [project.entry-points."cogniflow.steps"]
19
+ "cf.streamfind" = "cf_streamfind:steps.nq"
20
+
21
+ [tool.setuptools]
22
+ package-dir = {"" = "src"}
23
+
24
+ [tool.setuptools.packages.find]
25
+ where = ["src"]
26
+
27
+ [tool.setuptools.package-data]
28
+ cf_streamfind = ["steps.nq", "cpp/*.cpp", "cpp/CMakeLists.txt"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """Generated CogniFlow step package (cf.streamfind)."""
2
+
3
+ __all__ = ["steps"]
@@ -0,0 +1,78 @@
1
+ cmake_minimum_required(VERSION 3.20)
2
+ project(cf_streamfind_steps LANGUAGES CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
+
7
+ get_filename_component(_CF_REPO_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../" ABSOLUTE)
8
+ include("${_CF_REPO_ROOT}/tools/cmake/cf_contracts_include.cmake")
9
+
10
+ set(GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated)
11
+ file(MAKE_DIRECTORY ${GENERATED_DIR})
12
+
13
+ set(STEPS_DOCUMENT ${CMAKE_CURRENT_SOURCE_DIR}/../steps.nq)
14
+ set(SIG_HEADER ${GENERATED_DIR}/cf_streamfind_signature_hashes.h)
15
+
16
+ set(CF_SIGGEN_COMMAND ${Python3_EXECUTABLE} -m cf_step_tooling.siggen)
17
+ execute_process(
18
+ COMMAND ${Python3_EXECUTABLE} -c
19
+ "import inspect, pathlib, cf_step_tooling.siggen as sig, cf_step_tooling._signatures as impl, cf_step_tooling._step_document as doc, cf_step_tooling._rdf as rdf; print(pathlib.Path(inspect.getsourcefile(sig)).resolve()); print(pathlib.Path(inspect.getsourcefile(impl)).resolve()); print(pathlib.Path(inspect.getsourcefile(doc)).resolve()); print(pathlib.Path(inspect.getsourcefile(rdf)).resolve())"
20
+ OUTPUT_VARIABLE CF_SIGGEN_DEPENDENCY_OUTPUT
21
+ OUTPUT_STRIP_TRAILING_WHITESPACE
22
+ )
23
+ string(REPLACE "\r\n" "\n" CF_SIGGEN_DEPENDENCY_OUTPUT "${CF_SIGGEN_DEPENDENCY_OUTPUT}")
24
+ string(REPLACE "\n" ";" CF_SIGGEN_DEPENDENCIES "${CF_SIGGEN_DEPENDENCY_OUTPUT}")
25
+
26
+ add_custom_command(
27
+ OUTPUT ${SIG_HEADER}
28
+ COMMAND ${CF_SIGGEN_COMMAND} --steps ${STEPS_DOCUMENT} --out ${SIG_HEADER} --scratch
29
+ DEPENDS ${STEPS_DOCUMENT} ${CF_SIGGEN_DEPENDENCIES}
30
+ COMMENT "Generating cf_streamfind signature hashes"
31
+ )
32
+
33
+ find_package(ZLIB QUIET)
34
+ if(ZLIB_FOUND)
35
+ set(CF_STREAMFIND_ZLIB_LIBS ZLIB::ZLIB)
36
+ set(CF_STREAMFIND_HAS_ZLIB TRUE)
37
+ else()
38
+ find_library(ZLIB_LIBRARY z PATHS $ENV{ZLIB_ROOT}/lib)
39
+ find_path(ZLIB_INCLUDE_DIR zlib.h PATHS $ENV{ZLIB_ROOT}/include)
40
+ if(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
41
+ set(CF_STREAMFIND_ZLIB_LIBS ${ZLIB_LIBRARY})
42
+ set(CF_STREAMFIND_HAS_ZLIB TRUE)
43
+ else()
44
+ set(CF_STREAMFIND_HAS_ZLIB FALSE)
45
+ message(WARNING "zlib not found; mzML zlib decompression will not be available.")
46
+ endif()
47
+ endif()
48
+
49
+ add_library(${PROJECT_NAME} SHARED
50
+ ${CMAKE_CURRENT_SOURCE_DIR}/steps.cpp
51
+ ${SIG_HEADER}
52
+ )
53
+
54
+ target_include_directories(${PROJECT_NAME} PRIVATE
55
+ ${CF_CONTRACTS_INCLUDE}
56
+ ${GENERATED_DIR}
57
+ ${CMAKE_CURRENT_SOURCE_DIR}
58
+ )
59
+
60
+ if(CF_STREAMFIND_HAS_ZLIB)
61
+ target_include_directories(${PROJECT_NAME} PRIVATE ${ZLIB_INCLUDE_DIR})
62
+ target_link_libraries(${PROJECT_NAME} PRIVATE ${CF_STREAMFIND_ZLIB_LIBS})
63
+ target_compile_definitions(${PROJECT_NAME} PRIVATE CF_STREAMFIND_HAS_ZLIB=1)
64
+ endif()
65
+
66
+ target_compile_definitions(${PROJECT_NAME} PRIVATE CF_STEP_ABI_EXPORTS)
67
+
68
+ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
69
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/../bin
70
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}> ${CMAKE_CURRENT_SOURCE_DIR}/../bin
71
+ )
72
+
73
+ if(DEFINED SKBUILD_PLATLIB_DIR AND NOT SKBUILD_PLATLIB_DIR STREQUAL "")
74
+ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
75
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${SKBUILD_PLATLIB_DIR}/cf_streamfind/bin
76
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}> ${SKBUILD_PLATLIB_DIR}/cf_streamfind/bin
77
+ )
78
+ endif()