Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core setup in documentation missing some requirements. #71

Open
joshuak94 opened this issue Apr 28, 2023 · 3 comments
Open

Core setup in documentation missing some requirements. #71

joshuak94 opened this issue Apr 28, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@joshuak94
Copy link

Hello! I'm using biocpp core/io for a new project and realized some setup steps seem to be missing/unclear.

  1. If I only need the IO module (biocpp-io), I still need to have biocpp-core as well, right?
  2. Do both of them need to be added as submodules separately? It gives a weird directory structure as a result (project/submodule/biocpp-io/include/biocpp/io/ and project/submodule/biocpp-core/include/biocpp/alphabet etc/). If biocpp-core is a requirement of biocpp-io, why not just have them in the same project?
  3. I realized while following the core-setup, I need the fmt library. I added it as another submodule and then added it into my CMakeLists.txt file, but this wasn't explicitly mentioned anywhere. Is it a necessary submodule?

Thanks for your help!

@joshuak94 joshuak94 added the bug Something isn't working label Apr 28, 2023
@h-2
Copy link
Member

h-2 commented Apr 29, 2023

Hey!

If I only need the IO module (biocpp-io), I still need to have biocpp-core as well, right?

Yes, the core library is required by the io-library. This should be documented in the README (https://github.com/biocpp/biocpp-io/blob/main/README.md#dependencies)! The IO-library hasn't had a release, yet, so it's not in the doxygen, but I hope to get a release done in the next week or two.

Do both of them need to be added as submodules separately?

Yes, they are separate repositories.

It gives a weird directory structure as a result (project/submodule/biocpp-io/include/biocpp/io/ and project/submodule/biocpp-core/include/biocpp/alphabet etc/).

You can have them "beside" each other in your project, they don't need to be nested within each other!

If biocpp-core is a requirement of biocpp-io, why not just have them in the same project?

The core-library is aiming for a stable release fairly soon and will then receive mostly bug-fixes and small improvements; it will follow a more conservative approach (no API breaks, more stringent code-reviews...).
The IO-library, on the other hand, will have a more lively development. And more libraries are planned that would make use of core but not IO. That's why they are separate.

I realized while following the core-setup, I need the fmt library. I added it as another submodule and then added it into my CMakeLists.txt file, but this wasn't explicitly mentioned anywhere. Is it a necessary submodule?

It's not required, but it is recommended. The core-setup tutorial is unfortunately not fully up-to-date :( But it is mentioned in the README: https://github.com/biocpp/biocpp-core#easy-to-use

Here is an example of a project of mine that uses the libraries:
https://github.com/h-2/decovar/
This is all you need in the CMake for biocpp-core, biocpp-io, sharg-parser and fmt:

find_package (biocpp REQUIRED COMPONENTS core io
              HINTS "${CMAKE_SOURCE_DIR}/submodules/biocpp-core/build_system")
find_package (sharg REQUIRED
              HINTS "${CMAKE_SOURCE_DIR}/submodules/sharg-parser/build_system")

set(FMT_DOC OFF)
set(FMT_INSTALL OFF)
set(FMT_TEST OFF)
add_subdirectory(submodules/fmt)

For BioC++, it is enough to add the core-library's CMake-stuff and tell it the COMPONENTS you want. As long as the other components (in this case io) are either "beside" the core-library (biocpp-io is in same folder as biocpp-core) or within biocpp-core/submodules it should "just work". Actually, it should also work, if biocpp-core is in biocpp-io/submodules/, but then you have to do find_package(biocpp_io) and not find_package(biocpp COMPONENTS io)...

@h-2
Copy link
Member

h-2 commented Apr 29, 2023

P.S: You are very invited to submit a PR for core-setup tutorial 😇

@h-2
Copy link
Member

h-2 commented Apr 29, 2023

Instead of having the modules include each other as submodules, the plan is to have a biocpp/biocpp meta repository that includes the other ones and also fmt. Then, you can just clone from that and get everything. But I haven't set it up, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants