Skip to content
1 change: 1 addition & 0 deletions CLAUDE.md
29 changes: 29 additions & 0 deletions README_BOTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Useful Commands

## Building
To build the project (for most code changes):

```
(mkdir -p build && cd build && cmake .. -DRUN_DOXYGEN=OFF -DBUILD_PYTHON_BINDINGS=OFF && make -j8)
```

If something looks weirdly wrong with the CMake configuration, you can `rm -Rf build` and try the build again.

## Testing

To run the tests after building:

```
./bin/test_libbdsg
```

The test code is in `bdsg/src/test_libbdsg.cpp`. It doesn't use a unit test framework, just a convention of test functions that check things with asserts. The tests should be ordered from low-level to high-level because we stop at the first failure.

If you want to run just a single test, you need to comment out the calls to all the other test functions in the main function with `/* */` and rebuild.

# Layout

All the code is in `bdsg/src` and `bdsg/include/bdsg`. Dependencies (like the HandleGraph headers) are in `bdsg/deps`.

The `*.classfragment` files in `bdsg/include/bdsg/internal` are used to assemble "proxy" objects that wrap and expose all the methods of a contained object which for technical reasons isn't actually allowed to inherit from a base class, in order to provide something that does actually inherit from that base class. Try not to fiddle with this system.

4 changes: 2 additions & 2 deletions bdsg/cmake_bindings/bdsg/internal/mapped_structs_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ void bind_bdsg_internal_mapped_structs_1(std::function< pybind11::module &(std::
cl.def("assign", (class bdsg::PackedDeque<> & (bdsg::PackedDeque<bdsg::STLBackend>::*)(const class bdsg::PackedDeque<> &)) &bdsg::PackedDeque<>::operator=, "C++: bdsg::PackedDeque<>::operator=(const class bdsg::PackedDeque<> &) --> class bdsg::PackedDeque<> &", pybind11::return_value_policy::automatic, pybind11::arg("other"));
cl.def("set", (void (bdsg::PackedDeque<bdsg::STLBackend>::*)(const unsigned long &, const unsigned long &)) &bdsg::PackedDeque<>::set, "C++: bdsg::PackedDeque<>::set(const unsigned long &, const unsigned long &) --> void", pybind11::arg("i"), pybind11::arg("value"));
cl.def("get", (unsigned long (bdsg::PackedDeque<bdsg::STLBackend>::*)(const unsigned long &) const) &bdsg::PackedDeque<>::get, "C++: bdsg::PackedDeque<>::get(const unsigned long &) const --> unsigned long", pybind11::arg("i"));
cl.def("append_front", (void (bdsg::PackedDeque<bdsg::STLBackend>::*)(const unsigned long &)) &bdsg::PackedDeque<>::append_front, "C++: bdsg::PackedDeque<>::append_front(const unsigned long &) --> void", pybind11::arg("value"));
cl.def("append_back", (void (bdsg::PackedDeque<bdsg::STLBackend>::*)(const unsigned long &)) &bdsg::PackedDeque<>::append_back, "C++: bdsg::PackedDeque<>::append_back(const unsigned long &) --> void", pybind11::arg("value"));
cl.def("push_front", (void (bdsg::PackedDeque<bdsg::STLBackend>::*)(const unsigned long &)) &bdsg::PackedDeque<>::push_front, "C++: bdsg::PackedDeque<>::push_front(const unsigned long &) --> void", pybind11::arg("value"));
cl.def("push_back", (void (bdsg::PackedDeque<bdsg::STLBackend>::*)(const unsigned long &)) &bdsg::PackedDeque<>::push_back, "C++: bdsg::PackedDeque<>::push_back(const unsigned long &) --> void", pybind11::arg("value"));
cl.def("pop_front", (void (bdsg::PackedDeque<bdsg::STLBackend>::*)()) &bdsg::PackedDeque<>::pop_front, "C++: bdsg::PackedDeque<>::pop_front() --> void");
cl.def("pop_back", (void (bdsg::PackedDeque<bdsg::STLBackend>::*)()) &bdsg::PackedDeque<>::pop_back, "C++: bdsg::PackedDeque<>::pop_back() --> void");
cl.def("reserve", (void (bdsg::PackedDeque<bdsg::STLBackend>::*)(const unsigned long &)) &bdsg::PackedDeque<>::reserve, "C++: bdsg::PackedDeque<>::reserve(const unsigned long &) --> void", pybind11::arg("future_size"));
Expand Down
Loading