1
1
#include < map>
2
- #include < algorithm>
3
- #include < functional>
4
2
#include < memory>
5
3
#include < stdexcept>
4
+ #include < functional>
6
5
#include < string>
7
6
8
7
#include < pybind11/pybind11.h>
@@ -21,19 +20,18 @@ void bind_bdsg_graph_proxy_1(std::function< pybind11::module &(std::string const
21
20
void bind_bdsg_internal_wang_hash (std::function< pybind11::module &(std::string const &namespace_) > &M);
22
21
void bind_bdsg_internal_mapped_structs (std::function< pybind11::module &(std::string const &namespace_) > &M);
23
22
void bind_bdsg_internal_mapped_structs_1 (std::function< pybind11::module &(std::string const &namespace_) > &M);
24
- void bind_bdsg_internal_hash_map (std::function< pybind11::module &(std::string const &namespace_) > &M);
23
+ void bind_bdsg_internal_utility (std::function< pybind11::module &(std::string const &namespace_) > &M);
25
24
void bind_handlegraph_expanding_overlay_graph (std::function< pybind11::module &(std::string const &namespace_) > &M);
26
25
void bind_bdsg_overlays_strand_split_overlay (std::function< pybind11::module &(std::string const &namespace_) > &M);
27
26
void bind_bdsg_internal_is_single_stranded (std::function< pybind11::module &(std::string const &namespace_) > &M);
28
27
void bind_bdsg_internal_eades_algorithm (std::function< pybind11::module &(std::string const &namespace_) > &M);
29
- void bind_bdsg_internal_base_packed_graph (std::function< pybind11::module &(std::string const &namespace_) > &M);
30
28
void bind_handlegraph_path_position_handle_graph (std::function< pybind11::module &(std::string const &namespace_) > &M);
31
29
void bind_bdsg_overlays_packed_path_position_overlay (std::function< pybind11::module &(std::string const &namespace_) > &M);
32
30
void bind_bdsg_overlays_packed_path_position_overlay_1 (std::function< pybind11::module &(std::string const &namespace_) > &M);
33
31
void bind_bdsg_overlays_path_position_overlays (std::function< pybind11::module &(std::string const &namespace_) > &M);
34
32
void bind_bdsg_overlays_path_subgraph_overlay (std::function< pybind11::module &(std::string const &namespace_) > &M);
33
+ void bind_bdsg_overlays_reference_path_overlay (std::function< pybind11::module &(std::string const &namespace_) > &M);
35
34
void bind_bdsg_overlays_vectorizable_overlays (std::function< pybind11::module &(std::string const &namespace_) > &M);
36
- void bind_bdsg_overlays_vectorizable_overlays_1 (std::function< pybind11::module &(std::string const &namespace_) > &M);
37
35
void bind_handlegraph_trivially_serializable (std::function< pybind11::module &(std::string const &namespace_) > &M);
38
36
void bind_bdsg_packed_graph (std::function< pybind11::module &(std::string const &namespace_) > &M);
39
37
void bind_bdsg_snarl_distance_index (std::function< pybind11::module &(std::string const &namespace_) > &M);
@@ -51,22 +49,13 @@ PYBIND11_MODULE(bdsg, root_module) {
51
49
52
50
modules[" " ] = root_module;
53
51
54
- static std::vector<std::string> const reserved_python_words {" nonlocal" , " global" , };
55
-
56
- auto mangle_namespace_name (
57
- [](std::string const &ns) -> std::string {
58
- if ( std::find (reserved_python_words.begin (), reserved_python_words.end (), ns) == reserved_python_words.end () ) return ns;
59
- else return ns+' _' ;
60
- }
61
- );
62
-
63
52
std::vector< std::pair<std::string, std::string> > sub_modules {
64
53
{" " , " bdsg" },
65
54
{" bdsg" , " algorithms" },
66
55
{" " , " handlegraph" },
67
56
{" " , " std" },
68
57
};
69
- for (auto &p : sub_modules ) modules[p.first .size () ? p.first +" ::" +p.second : p.second ] = modules[p.first ].def_submodule ( mangle_namespace_name ( p.second ) .c_str (), (" Bindings for " + p.first + " ::" + p.second + " namespace" ).c_str () );
58
+ for (auto &p : sub_modules ) modules[p.first .size () ? p.first +" ::" +p.second : p.second ] = modules[p.first ].def_submodule (p.second .c_str (), (" Bindings for " + p.first + " ::" + p.second + " namespace" ).c_str () );
70
59
71
60
// pybind11::class_<std::shared_ptr<void>>(M(""), "_encapsulated_data_");
72
61
@@ -82,19 +71,18 @@ PYBIND11_MODULE(bdsg, root_module) {
82
71
bind_bdsg_internal_wang_hash (M);
83
72
bind_bdsg_internal_mapped_structs (M);
84
73
bind_bdsg_internal_mapped_structs_1 (M);
85
- bind_bdsg_internal_hash_map (M);
74
+ bind_bdsg_internal_utility (M);
86
75
bind_handlegraph_expanding_overlay_graph (M);
87
76
bind_bdsg_overlays_strand_split_overlay (M);
88
77
bind_bdsg_internal_is_single_stranded (M);
89
78
bind_bdsg_internal_eades_algorithm (M);
90
- bind_bdsg_internal_base_packed_graph (M);
91
79
bind_handlegraph_path_position_handle_graph (M);
92
80
bind_bdsg_overlays_packed_path_position_overlay (M);
93
81
bind_bdsg_overlays_packed_path_position_overlay_1 (M);
94
82
bind_bdsg_overlays_path_position_overlays (M);
95
83
bind_bdsg_overlays_path_subgraph_overlay (M);
84
+ bind_bdsg_overlays_reference_path_overlay (M);
96
85
bind_bdsg_overlays_vectorizable_overlays (M);
97
- bind_bdsg_overlays_vectorizable_overlays_1 (M);
98
86
bind_handlegraph_trivially_serializable (M);
99
87
bind_bdsg_packed_graph (M);
100
88
bind_bdsg_snarl_distance_index (M);
0 commit comments