[med-svn] [Git][med-team/libbioparser-dev][master] 7 commits: New upstream version 3.1.0

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Fri Mar 22 16:20:47 GMT 2024



Michael R. Crusoe pushed to branch master at Debian Med / libbioparser-dev


Commits:
b9a7fc37 by Michael R. Crusoe at 2024-03-21T14:31:03+01:00
New upstream version 3.1.0
- - - - -
82251eb2 by Michael R. Crusoe at 2024-03-21T14:31:06+01:00
Update upstream source from tag 'upstream/3.1.0'

Update to upstream version '3.1.0'
with Debian dir 45e0eacfd86c17a5b5cd4453d54a0ad6bc9440f5
- - - - -
74556150 by Michael R. Crusoe at 2024-03-21T14:31:53+01:00
New upstream version

- - - - -
e6cbdc4d by Michael R. Crusoe at 2024-03-21T18:37:24+01:00
d/control: needs at least version 0.11.0 of libbiosoup-dev.

- - - - -
f6b2f04d by Michael R. Crusoe at 2024-03-22T17:08:45+01:00
d/rules: Don't install the Meson build file into /usr/include.

- - - - -
6e1e434c by Michael R. Crusoe at 2024-03-22T17:16:27+01:00
routine-update: Standards-Version: 4.6.2

- - - - -
3204fb91 by Michael R. Crusoe at 2024-03-22T17:16:50+01:00
routine-update: Ready to upload to unstable

- - - - -


20 changed files:

- .github/workflows/bioparser.yml
- .gitignore
- CMakeLists.txt
- README.md
- debian/changelog
- debian/control
- debian/rules
- + include/meson.build
- + meson.build
- + meson_options.txt
- + subprojects/biosoup.wrap
- + subprojects/gtest.wrap
- + subprojects/zlib.wrap
- + test/bioparser_test_config.h.in
- test/fasta_parser_test.cpp
- test/fastq_parser_test.cpp
- + test/meson.build
- test/mhap_parser_test.cpp
- test/paf_parser_test.cpp
- test/sam_parser_test.cpp


Changes:

=====================================
.github/workflows/bioparser.yml
=====================================
@@ -14,38 +14,53 @@ jobs:
     strategy:
       matrix:
         compiler:
+          - g++-7
           - g++
-          - g++-4.8
+          - clang++-6.0
           - clang++
-          - clang++-4.0
 
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04
 
     steps:
-      - uses: actions/checkout at v2
+      - uses: actions/checkout at v3
 
-      - if: ${{ matrix.compiler == 'g++-4.8' }}
+      - if: ${{ contains(matrix.compiler, '-') }}
+        name: Get compiler version
+        id: get-compiler-version
+        run: |
+          version=$(echo ${{ matrix.compiler }} | cut -d- -f2)
+          echo "version=$version" >> $GITHUB_OUTPUT
+
+      - if: ${{ startsWith(matrix.compiler, 'g++-') }}
         name: Setup GCC
         uses: egor-tensin/setup-gcc at v1
         with:
-          version: "4.8"
+          version: "${{ steps.get-compiler-version.outputs.version }}"
           platform: x64
 
-      - if: ${{ matrix.compiler == 'clang++-4.0' }}
+      - if: ${{ startsWith(matrix.compiler, 'clang++-') }}
         name: Setup Clang
         uses: egor-tensin/setup-clang at v1
         with:
-          version: "4.0"
+          version: "${{ steps.get-compiler-version.outputs.version }}"
           platform: x64
 
       - name: Configure CMake
-        run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
+        run: |
+          cmake -B ${{ github.workspace }}/build_cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
+          cmake --build ${{ github.workspace }}/build_cmake
         env:
           CXX: ${{ matrix.compiler }}
 
-      - name: Build
-        run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }}
+      - name: Configure Meson
+        uses: BSFishy/meson-build at v1.0.3
+        with:
+          action: build
+          directory: build_meson
+          meson-version: 0.60.0
 
       - name: Test
-        working-directory: ${{ github.workspace }}/build
-        run: bin/bioparser_test
+        working-directory: ${{ github.workspace }}
+        run: |
+          build_cmake/bin/bioparser_test
+          build_meson/test/bioparser_test


=====================================
.gitignore
=====================================
@@ -1,2 +1,5 @@
 # Compiled Object files
 build/
+
+/subprojects/*
+!/subprojects/*.wrap


=====================================
CMakeLists.txt
=====================================
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.11)
 
-project(bioparser VERSION 3.0.15
+project(bioparser VERSION 3.1.0
                   LANGUAGES CXX
                   DESCRIPTION "Bioparser is a c++ header only parsing library for several formats in bioinformatics (FASTA/Q, MHAP/PAF/SAM), with support for zlib compressed files.")
 
@@ -22,7 +22,7 @@ option(bioparser_build_tests "Build unit tests" ${bioparser_main_project})
 find_package(ZLIB 1.2.8 REQUIRED)
 
 if (bioparser_build_tests)
-  find_package(biosoup 0.10.0 QUIET)
+  find_package(biosoup 0.11.0 QUIET)
   find_package(GTest 1.10.0 QUIET)
 
   if (NOT biosoup_FOUND)
@@ -31,7 +31,7 @@ if (bioparser_build_tests)
     FetchContent_Declare(
       biosoup
       GIT_REPOSITORY https://github.com/rvaser/biosoup
-      GIT_TAG 0.10.0)
+      GIT_TAG 0.11.0)
 
     FetchContent_GetProperties(biosoup)
     if (NOT biosoup_POPULATED)
@@ -102,6 +102,9 @@ if (bioparser_install)
 endif ()
 
 if (bioparser_build_tests)
+  set(BIOPARSER_TEST_DATA "${PROJECT_SOURCE_DIR}/test/data/")
+  configure_file(test/bioparser_test_config.h.in bioparser_test_config.h)
+
   add_executable(bioparser_test
     test/parser_test.cpp
     test/fasta_parser_test.cpp
@@ -115,6 +118,6 @@ if (bioparser_build_tests)
     biosoup::biosoup
     GTest::Main)
 
-  target_compile_definitions(bioparser_test
-    PRIVATE TEST_DATA="${PROJECT_SOURCE_DIR}/test/data/")
+  target_include_directories(bioparser_test PUBLIC
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
 endif ()


=====================================
README.md
=====================================
@@ -5,41 +5,42 @@
 
 Bioparser is a c++ header only parsing library for several bioinformatics formats (FASTA/Q, MHAP/PAF/SAM), with support for zlib compressed files.
 
-## Usage
+## Build
+
+### Dependencies
+
+- gcc 4.8+ | clang 3.5+
+- zlib 1.2.8+
+
+#### Hidden
+
+- (bioparser_test) rvaser/biosoup 0.11.0
+- (bioparser_test) google/googletest 1.10.0
+
+### CMake (3.11+)
 
-To build bioparser run the following commands:
 ```bash
-git clone https://github.com/rvaser/bioparser && cd bioparser && mkdir build && cd build
-cmake -DCMAKE_BUILD_TYPE=Release .. && make
-```
-which will create install targets and unit tests. Running `make install` will create a package on your system that can be searched and linked with:
-```cmake
-find_package(bioparser)
-target_link_libraries(<target> bioparser::bioparser)
+git clone https://github.com/rvaser/bioparser && cd bioparser
+cmake -B build -DCMAKE_BUILD_TYPE=Release
+make -C build
 ```
-On the other hand, you can include bioparser as a submodule and add it to your project with the following:
-```cmake
-if (NOT TARGET bioparser)
-  add_subdirectory(<path_to_submodules>/bioparser EXCLUDE_FROM_ALL)
-endif ()
-target_link_libraries(<target> bioparser::bioparser)
-```
-
-If you are not using CMake, include the appropriate header file directly to your project and link with zlib.
 
-#### Build options
+#### Options
 
 - `bioparser_install`: generate install target
 - `bioparser_build_tests`: build unit tests
 
-#### Dependencies
-- gcc 4.8+ | clang 3.5+
-- zlib 1.2.8+
-- (optional) cmake 3.11+
+### Meson (0.60.0+)
 
-###### Hidden
-- (bioparser_test) rvaser/biosoup 0.10.0
-- (bioparser_test) google/googletest 1.10.0
+```bash
+git clone https://github.com/rvaser/bioparser && cd bioparser
+meson setup build
+ninja -C build
+```
+
+#### Options
+
+- `tests`: build unit tests
 
 ## Examples
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+libbioparser-dev (3.1.0-1) unstable; urgency=medium
+
+  * Team upload
+  * New upstream version
+  * d/control: needs at least version 0.11.0 of libbiosoup-dev.
+  * d/rules: Don't install the Meson build file into /usr/include.
+  * Standards-Version: 4.6.2 (routine-update)
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Fri, 22 Mar 2024 17:16:50 +0100
+
 libbioparser-dev (3.0.15-3) unstable; urgency=medium
 
   * Fix watch file


=====================================
debian/control
=====================================
@@ -7,8 +7,8 @@ Build-Depends: debhelper-compat (= 13),
                cmake,
                zlib1g-dev,
                libgtest-dev,
-               libbiosoup-dev
-Standards-Version: 4.6.1
+               libbiosoup-dev (>> 0.11.0)
+Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/libbioparser-dev
 Vcs-Git: https://salsa.debian.org/med-team/libbioparser-dev.git
 Homepage: https://github.com/rvaser/bioparser/


=====================================
debian/rules
=====================================
@@ -15,7 +15,7 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	set -e -x; for f in obj-*/bin/*_test; do [ ! -x $$f ] || $$f; done
 endif
 
-override_dh_install:
-	dh_install
+execute_after_dh_install:
 	mv debian/`dh_listpackages`/usr/lib/*/cmake debian/`dh_listpackages`/usr/share
 	rm -rf debian/`dh_listpackages`/usr/lib
+	find debian -name meson.build -delete


=====================================
include/meson.build
=====================================
@@ -0,0 +1,20 @@
+###########
+# Headers #
+###########
+
+bioparser_include_directories = include_directories(['.'])
+
+if meson.is_subproject()
+  subdir_done()
+endif
+
+install_headers(
+  files([
+    'bioparser/fasta_parser.hpp',
+    'bioparser/fastq_parser.hpp',
+    'bioparser/mhap_parser.hpp',
+    'bioparser/paf_parser.hpp',
+    'bioparser/parser.hpp',
+    'bioparser/sam_parser.hpp',
+  ]),
+  subdir : 'bioparser')


=====================================
meson.build
=====================================
@@ -0,0 +1,61 @@
+project(
+  'bioparser',
+  ['cpp'],
+  version : '3.1.0',
+  default_options : [
+    'buildtype=release',
+    'warning_level=3',
+    'cpp_std=c++11',
+    'b_ndebug=if-release'],
+  license : 'MIT',
+  meson_version : '>=0.60.0'
+)
+
+################
+# Dependencies #
+################
+
+# zlib
+bioparser_zlib_dep = dependency('zlib', include_type : 'system', fallback : ['zlib', 'zlib_dep'])
+
+bioparser_lib_deps = [
+  bioparser_zlib_dep,
+]
+
+###########
+# Headers #
+###########
+
+subdir('include')
+
+#########
+# Tests #
+#########
+
+if (not meson.is_subproject()) and get_option('tests')
+  # biosoup
+  bioparser_biosoup_dep = dependency('biosoup', version : '>= 0.11.0', fallback : ['biosoup', 'biosoup_dep'])
+
+  # gtest
+  bioparser_gtest_dep = dependency('gtest', version : '>= 1.10.0', main : true, fallback : ['gtest', 'gtest_main_dep'])
+
+  subdir('test')
+endif
+
+###################
+# Dependency info #
+###################
+
+if (not meson.is_subproject())
+  import('pkgconfig').generate(
+    name : 'bioparser',
+    version : meson.project_version(),
+    filebase : 'bioparser',
+    description : 'C++ header only parsing library for bioinformatics formats (FASTA/Q, MHAP/PAF/SAM), with support for zlib compressed files.')
+endif
+
+bioparser_dep = declare_dependency(
+  include_directories : bioparser_include_directories,
+  dependencies : bioparser_lib_deps,
+  version : meson.project_version()
+)


=====================================
meson_options.txt
=====================================
@@ -0,0 +1,8 @@
+#########
+# Tests #
+#########
+
+option('tests',
+  type : 'boolean',
+  value : true,
+  description : 'Enable dependencies required for testing')


=====================================
subprojects/biosoup.wrap
=====================================
@@ -0,0 +1,5 @@
+[wrap-git]
+directory = biosoup
+
+url = https://github.com/rvaser/biosoup
+revision = 0.11.0


=====================================
subprojects/gtest.wrap
=====================================
@@ -0,0 +1,16 @@
+[wrap-file]
+directory = googletest-release-1.10.0
+
+source_url = https://github.com/google/googletest/archive/release-1.10.0.zip
+source_filename = gtest-1.10.0.zip
+source_hash = 94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91
+
+patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.10.0-1/get_patch
+patch_filename = gtest-1.10.0-1-wrap.zip
+patch_hash = 04ff14e8880e4e465f6260221e9dfd56fea6bc7cce4c4aff0dc528e4a2c8f514
+
+wrapdb_version = 1.10.0-1
+
+[provide]
+gtest = gtest_dep
+gtest_main = gtest_main_dep


=====================================
subprojects/zlib.wrap
=====================================
@@ -0,0 +1,15 @@
+[wrap-file]
+directory = zlib-1.2.8
+
+source_url = http://zlib.net/fossils/zlib-1.2.8.tar.gz
+source_filename = zlib-1.2.8.tar.gz
+source_hash = 36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d
+
+patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.2.8-8/get_patch
+patch_filename = zlib-1.2.8-8-wrap.zip
+patch_hash = 17c52a0e0c59ce926d3959005d5cd8178c6c7e2c9a4a1304279a8320c955ac60
+
+wrapdb_version = 1.2.8-8
+
+[provide]
+zlib = zlib_dep


=====================================
test/bioparser_test_config.h.in
=====================================
@@ -0,0 +1,14 @@
+// Copyright (c) 2023 Robert Vaser
+
+#ifndef BIOPARSER_TEST_CONFIG_H_
+#define BIOPARSER_TEST_CONFIG_H_
+
+namespace bioparser {
+namespace test {
+
+constexpr char BIOPARSER_TEST_DATA[] = "@BIOPARSER_TEST_DATA@";
+
+}  // namespace test
+}  // namespace bioparser
+
+#endif  // BIOPARSER_TEST_CONFIG_H_


=====================================
test/fasta_parser_test.cpp
=====================================
@@ -7,6 +7,8 @@
 #include "biosoup/sequence.hpp"
 #include "gtest/gtest.h"
 
+#include "bioparser_test_config.h"
+
 std::atomic<std::uint32_t> biosoup::Sequence::num_objects{0};
 
 namespace bioparser {
@@ -15,7 +17,7 @@ namespace test {
 class BioparserFastaTest: public ::testing::Test {
  public:
   void Setup(const std::string& file) {
-    p = Parser<biosoup::Sequence>::Create<FastaParser>(TEST_DATA + file);
+    p = Parser<biosoup::Sequence>::Create<FastaParser>(BIOPARSER_TEST_DATA + file);
   }
 
   void Check(bool is_trimmed = true) {


=====================================
test/fastq_parser_test.cpp
=====================================
@@ -7,13 +7,15 @@
 #include "biosoup/sequence.hpp"
 #include "gtest/gtest.h"
 
+#include "bioparser_test_config.h"
+
 namespace bioparser {
 namespace test {
 
 class BioparserFastqTest: public ::testing::Test {
  public:
   void Setup(const std::string& file) {
-    p = Parser<biosoup::Sequence>::Create<FastqParser>(TEST_DATA + file);
+    p = Parser<biosoup::Sequence>::Create<FastqParser>(BIOPARSER_TEST_DATA + file);
   }
 
   void Check() {


=====================================
test/meson.build
=====================================
@@ -0,0 +1,35 @@
+bioparser_test_config = configuration_data()
+bioparser_test_config.set('BIOPARSER_TEST_DATA',  meson.project_source_root() + '/test/data/')
+
+###########
+# Sources #
+###########
+
+bioparser_test_config_headers = [
+  configure_file(
+    input : 'bioparser_test_config.h.in',
+    output : 'bioparser_test_config.h',
+    configuration : bioparser_test_config)
+]
+
+bioparser_test_sources = files([
+  'fasta_parser_test.cpp',
+  'fastq_parser_test.cpp',
+  'mhap_parser_test.cpp',
+  'paf_parser_test.cpp',
+  'parser_test.cpp',
+  'sam_parser_test.cpp',
+]) + bioparser_test_config_headers
+
+bioparser_test = executable(
+  'bioparser_test',
+  bioparser_test_sources,
+  dependencies : [bioparser_lib_deps, bioparser_biosoup_dep, bioparser_gtest_dep],
+  include_directories : bioparser_include_directories,
+  install : false)
+
+#########
+# Tests #
+#########
+
+test('bioparser gtest unit tests', bioparser_test)


=====================================
test/mhap_parser_test.cpp
=====================================
@@ -8,6 +8,8 @@
 #include "biosoup/overlap.hpp"
 #include "gtest/gtest.h"
 
+#include "bioparser_test_config.h"
+
 namespace bioparser {
 namespace test {
 
@@ -43,7 +45,7 @@ struct MhapOverlap: public biosoup::Overlap {
 class BioparserMhapTest: public ::testing::Test {
  public:
   void Setup(const std::string& file) {
-    p = Parser<MhapOverlap>::Create<MhapParser>(TEST_DATA + file);
+    p = Parser<MhapOverlap>::Create<MhapParser>(BIOPARSER_TEST_DATA + file);
   }
 
   void Check() {


=====================================
test/paf_parser_test.cpp
=====================================
@@ -8,6 +8,8 @@
 #include "biosoup/overlap.hpp"
 #include "gtest/gtest.h"
 
+#include "bioparser_test_config.h"
+
 namespace bioparser {
 namespace test {
 
@@ -49,7 +51,7 @@ struct PafOverlap: public biosoup::Overlap {
 class BioparserPafTest: public ::testing::Test {
  public:
   void Setup(const std::string& file) {
-    p = Parser<PafOverlap>::Create<PafParser>(TEST_DATA + file);
+    p = Parser<PafOverlap>::Create<PafParser>(BIOPARSER_TEST_DATA + file);
   }
 
   void Check() {


=====================================
test/sam_parser_test.cpp
=====================================
@@ -8,6 +8,8 @@
 #include "biosoup/overlap.hpp"
 #include "gtest/gtest.h"
 
+#include "bioparser_test_config.h"
+
 namespace bioparser {
 namespace test {
 
@@ -54,7 +56,7 @@ struct SamOverlap: public biosoup::Overlap {
 class BioparserSamTest: public ::testing::Test {
  public:
   void Setup(const std::string& file) {
-    p = Parser<SamOverlap>::Create<SamParser>(TEST_DATA + file);
+    p = Parser<SamOverlap>::Create<SamParser>(BIOPARSER_TEST_DATA + file);
   }
 
   void Check() {



View it on GitLab: https://salsa.debian.org/med-team/libbioparser-dev/-/compare/566242023a482a0fc3aff5844313a0559ae804aa...3204fb918b0684b123e146394eb548735a60291f

-- 
View it on GitLab: https://salsa.debian.org/med-team/libbioparser-dev/-/compare/566242023a482a0fc3aff5844313a0559ae804aa...3204fb918b0684b123e146394eb548735a60291f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240322/115cd3ad/attachment-0001.htm>


More information about the debian-med-commit mailing list