Skip to content

Commit fb9b8e3

Browse files
Merge pull request #78 from smithlabcode/submodule-update
Several major updates
2 parents 70666f4 + dbcf158 commit fb9b8e3

26 files changed

+2681
-1190
lines changed

.cppcheck_suppress

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file is part of preseq
2+
#
3+
# Copyright (C) 2024: Andrew D. Smith
4+
#
5+
# Authors: Andrew D. Smith
6+
#
7+
# This is free software: you can redistribute it and/or modify it
8+
# under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This software is distributed in the hope that it will be useful, but
13+
# WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
# General Public License for more details.
16+
17+
missingIncludeSystem
18+
constVariablePointer
19+
checkersReport
20+
unusedFunction:src/bam_record_utils.hpp
21+
unusedFunction:src/bam_record_utils.cpp
22+
*:src/smithlab_cpp*
23+
unusedStructMember:src/*.hpp

.github/workflows/cppcheck.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This file is part of preseq
2+
#
3+
# Copyright (C) 2024: Andrew D. Smith
4+
#
5+
# Authors: Andrew D. Smith
6+
#
7+
# This is free software: you can redistribute it and/or modify it
8+
# under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation, either version 3 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This software is distributed in the hope that it will be useful, but
13+
# WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
# General Public License for more details.
16+
17+
name: Linting with cppcheck
18+
19+
on:
20+
push:
21+
branches: [ "master" ]
22+
pull_request:
23+
branches: [ "master" ]
24+
workflow_dispatch:
25+
26+
jobs:
27+
cppcheck:
28+
runs-on: ubuntu-24.04
29+
strategy:
30+
matrix:
31+
python-version: ["3.12"]
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
37+
- name: Python setup ${{ matrix.python-version }}
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: ${{ matrix.python-version }}
41+
42+
- name: Install cppcheck
43+
run: |
44+
conda install -c conda-forge cppcheck
45+
46+
- name: Run cppcheck
47+
run: |
48+
${CONDA}/bin/cppcheck \
49+
--std=c++17 \
50+
--enable=all \
51+
--check-level=exhaustive \
52+
--suppressions-list=.cppcheck_suppress \
53+
-I src/smithlab_cpp \
54+
$(git ls-files '*.*pp')

.github/workflows/cpplint.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ jobs:
4444
python -m pip install --upgrade pip
4545
pip install cpplint
4646
47-
- name: Check cpplint version
48-
run: cpplint --version
49-
5047
- name: Run cpplint
5148
run: |
5249
cpplint --quiet --repository=. $(git ls-files '*.*pp')

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "src/smithlab_cpp"]
55
path = src/smithlab_cpp
66
url = ../smithlab_cpp.git
7+
[submodule "src/bamxx"]
8+
path = src/bamxx
9+
url = ../bamxx.git

Makefile.am

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ ACLOCAL_AMFLAGS = -I m4
1818

1919
SUBDIRS := src/smithlab_cpp
2020
install installdirs: SUBDIRS := $(filter-out src/smithlab_cpp, $(SUBDIRS))
21-
AM_CPPFLAGS = -I $(top_srcdir)/src/smithlab_cpp
21+
AM_CPPFLAGS = -I $(top_srcdir)/src/smithlab_cpp -I $(top_srcdir)/src/bamxx
2222
AM_CPPFLAGS += -Wall -Wextra -Wpedantic -Wno-unknown-attributes
2323

24-
CXXFLAGS = -O2 # default has optimization on
24+
CXXFLAGS = -O2 -DNDEBUG # default w/ optimization; careful for math
2525

2626
EXTRA_DIST = \
2727
README.md \
@@ -48,7 +48,6 @@ LDADD = src/smithlab_cpp/libsmithlab_cpp.a
4848

4949
bin_PROGRAMS = preseq
5050
if ENABLE_HTS
51-
bin_PROGRAMS += to-mr
5251
AM_CPPFLAGS += -DHAVE_HTSLIB
5352
endif
5453

@@ -64,14 +63,14 @@ preseq_SOURCES = \
6463
src/lc_extrap.cpp \
6564
src/bound_pop.hpp \
6665
src/bound_pop.cpp \
66+
src/bamxx/bamxx.hpp \
6767
src/pop_size.hpp \
6868
src/pop_size.cpp \
6969
src/continued_fraction.hpp \
7070
src/continued_fraction.cpp \
71+
src/bam_record_utils.hpp \
72+
src/bam_record_utils.cpp \
7173
src/load_data_for_complexity.hpp \
7274
src/load_data_for_complexity.cpp \
7375
src/moment_sequence.hpp \
7476
src/moment_sequence.cpp
75-
76-
to_mr_SOURCES = \
77-
src/to-mr.cpp

0 commit comments

Comments
 (0)