Skip to content

Commit

Permalink
Merge branch 'master' into fix/bgzf_thread_count_variable
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Dec 7, 2021
2 parents 4c9a758 + b56ac8f commit b778975
Show file tree
Hide file tree
Showing 17 changed files with 221 additions and 57 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: 🐞 Bug report
description: Create a report to help us improve SeqAn3.
labels: [bug]
body:
- type: checkboxes
attributes:
label: Does this problem persist on the current master?
description: Update to the latest master branch of SeqAn and see if the issue persists.
options:
- label: I have verified the issue on the current master
required: true
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this code...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
attributes:
label: Environment
description: |
examples:
- **Operating system**: Ubuntu 20.04
- **SeqAn version**: 3.1.0 or 8a4f31cb7 (provide tag or commit as applicable)
- **Compiler**: gcc 11.2
value: |
- Operating system:
- SeqAn version:
- Compiler:
render: markdown
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
If you already know how to fix the issue, you can directly create a pull-request instead of an issue.
See the [contributor guide](https://docs.seqan.de/seqan/3-master-user/about_contributing.html) for more details.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Questions and Answers
url: https://github.com/seqan/seqan3/discussions
about: Ask us about installing and using SeqAn3 in our GitHub Discussions forum!
- name: Documentation
url: https://docs.seqan.de/
about: See our extensive documentation for usage examples and more!
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Question
name: Question (alternative to Discussions)
about: Ask us about anything SeqAn-related that you would like to know.
title: ''
labels: 'question'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Runs the [API-Stability](https://github.com/seqan/seqan3/blob/master/test/api_st

In case of failure, creates an issue containing error logs.

## avx2.yml

Will run all test suites on all compiler with AVX2 enabled:
* Every Sunday on master
* Manually on any branch

In case of failure, creates an issue containing error logs.

## cancel.yml

Cancels ongoing and queued runs for a branch if a new push is made:
Expand Down
127 changes: 127 additions & 0 deletions .github/workflows/avx2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: SeqAn3 AVX2 CI

on:
# Will always run on the default branch
schedule:
- cron: "0 6 * * SUN"
# Enables a manual trigger, may run on any branch
workflow_dispatch:

concurrency:
group: avx2-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CMAKE_VERSION: 3.10.3
SEQAN3_NO_VERSION_CHECK: 1
TZ: Europe/Berlin
ISSUE: 2905 # Issue number to use for reporting failures

defaults:
run:
shell: bash -exo pipefail {0}

jobs:
build:
name: ${{ matrix.build }} gcc${{ matrix.compiler }}
runs-on: ubuntu-20.04
timeout-minutes: 300
strategy:
fail-fast: false
matrix:
compiler: [9, 10, 11]
build: [unit, snippet, performance, header]

steps:
- name: Checkout SeqAn3
uses: actions/checkout@v2
with:
path: seqan3
submodules: true

- name: Checkout SeqAn2
uses: actions/checkout@v2
with:
repository: seqan/seqan
ref: develop
path: seqan3/submodules/seqan

- name: Configure APT
continue-on-error: true
run: bash ./seqan3/.github/workflows/scripts/configure_apt.sh

- name: Install CMake
run: bash ./seqan3/.github/workflows/scripts/install_cmake.sh

- name: Install compiler g++-${{ matrix.compiler }}
run: sudo apt-get install --yes g++-${{ matrix.compiler }}

- name: Configure tests
env:
CXX: g++-${{ matrix.compiler }}
CC: gcc-${{ matrix.compiler }}
run: |
mkdir seqan3-build
cd seqan3-build
cmake ../seqan3/test/${{ matrix.build }} -DCMAKE_BUILD_TYPE=Release \
-DSEQAN3_VERBOSE_TESTS=OFF \
-DSEQAN3_BENCHMARK_MIN_TIME=0.01 \
-DCMAKE_CXX_FLAGS="-mavx2"
case "${{ matrix.build }}" in
unit) make -j2 gtest_build;;
snippet) make -j2 gtest_build;;
performance) make -j2 gbenchmark_build;;
header) make -j2 gtest_build gbenchmark_build;;
esac
- name: Build tests
run: |
cd seqan3-build
make -k -j2 2>&1 | tee build.log
- name: Setup Python
if: ${{ failure() }}
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Process Log
if: ${{ failure() }}
run: |
FILE="seqan3/.github/ISSUE_TEMPLATE/cron_comment_template.md"
python3 seqan3/.github/workflows/scripts/process_compiler_error_log.py seqan3-build/build.log >> $FILE
- name: Create comment body
if: ${{ failure() }}
id: comment-body
run: |
FILE="seqan3/.github/ISSUE_TEMPLATE/cron_comment_template.md"
URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
sed -i "s@{{ build }}@${{ matrix.build }}@" $FILE
sed -i "s@{{ compiler }}@${{ matrix.compiler }}@" $FILE
sed -i "s@{{ url }}@$URL@" $FILE
body=$(cat $FILE)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
- name: Reopen issue
if: ${{ failure() }}
uses: octokit/request-action@v2.x
with:
route: PATCH /repos/{owner}/{repo}/issues/{issue_number}
owner: ${{ github.repository_owner }}
repo: seqan3
issue_number: ${{ env.ISSUE }}
state: "open"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create comment
if: ${{ failure() }}
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ env.ISSUE }}
body: ${{ steps.comment-body.outputs.body }}

2 changes: 0 additions & 2 deletions include/seqan3/alignment/pairwise/edit_distance_algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class edit_distance_algorithm
* \param[in] callback The callback function to be invoked with the alignment result; must model
* std::invocable with the respective seqan3::alignment_result type.
*
* \returns A std::vector over seqan3::alignment_result.
*
* \details
*
* Computes for each contained sequence pair the respective alignment and invokes the given callback for each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ class affine_gap_policy
/*!\brief Initialise the alignment state for affine gap computation.
* \tparam alignment_configuration_t The type of alignment configuration.
* \param[in] config The alignment configuration.
* \returns The initialised seqan3::detail::alignment_algorithm_state.
*
* \details
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class simd_affine_gap_policy
/*!\brief Initialise the alignment state for affine gap computation.
* \tparam alignment_configuration_t The type of alignment configuration.
* \param[in] config The alignment configuration.
* \returns The initialised seqan3::detail::alignment_algorithm_state.
*
* \details
*
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/alphabet/aminoacid/aminoacid_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class aminoacid_base : public alphabet_base<derived_type, size, char>, public am
detail::writable_constexpr_alphabet<other_aa_type>)
{
static_cast<derived_type &>(*this) =
detail::convert_through_char_representation<derived_type, other_aa_type>[seqan3::to_rank(other)];
detail::convert_through_char_representation<other_aa_type, derived_type>[seqan3::to_rank(other)];
}
else
{
Expand Down
1 change: 0 additions & 1 deletion include/seqan3/alphabet/container/bitpacked_sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ class bitpacked_sequence
* \{
*/
/*!\brief Removes all elements from the container.
* \returns The number of elements in the container.
*
* ### Complexity
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ class concatenated_sequences
* \{
*/
/*!\brief Removes all elements from the container.
* \returns The number of elements in the container.
*
* ### Complexity
*
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/alphabet/detail/convert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ namespace seqan3::detail

/*!\brief A precomputed conversion table for two alphabets based on their char representations.
* \ingroup alphabet
* \tparam out_t The type of the output, must satisfy seqan3::alphabet.
* \tparam in_t The type of the input, must satisfy seqan3::alphabet.
* \tparam out_t The type of the output, must satisfy seqan3::alphabet.
* \hideinitializer
*/
template <alphabet out_t, alphabet in_t>
template <alphabet in_t, alphabet out_t>
constexpr std::array<out_t, alphabet_size<in_t>> convert_through_char_representation
{
[] () constexpr
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/alphabet/nucleotide/nucleotide_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class nucleotide_base : public alphabet_base<derived_type, size, char>
explicit constexpr nucleotide_base(other_nucl_type const & other) noexcept
{
static_cast<derived_type &>(*this) =
detail::convert_through_char_representation<derived_type, other_nucl_type>[seqan3::to_rank(other)];
detail::convert_through_char_representation<other_nucl_type, derived_type>[seqan3::to_rank(other)];
}
//!\}

Expand Down
2 changes: 0 additions & 2 deletions include/seqan3/argument_parser/validators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ class file_validator_base

/*!\brief Checks if the given path is readable.
* \param path The path to check.
* \returns `true` if readable, otherwise `false`.
* \throws seqan3::validation_error if the path is not readable, or
* std::filesystem::filesystem_error on underlying OS API errors.
*/
Expand Down Expand Up @@ -436,7 +435,6 @@ class file_validator_base

/*!\brief Checks if the given path is writable.
* \param path The path to check.
* \returns `true` if writable, otherwise `false`.
* \throws seqan3::validation_error if the file could not be opened for writing, or
* std::filesystem::filesystem_error on underlying OS API errors.
*/
Expand Down
5 changes: 2 additions & 3 deletions include/seqan3/contrib/stream/bgzf_stream_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@
namespace seqan3::contrib
{

/*!\brief A global variable indicating the number of threads to use for the bgzf-streams.
* Defaults to std::thread::hardware_concurrency.
/*!\brief A static variable indicating the number of threads to use for the bgzf-streams. Defaults to 4.
*/
inline uint64_t bgzf_thread_count = std::thread::hardware_concurrency();
[[maybe_unused]] inline uint64_t bgzf_thread_count = 4;

// ============================================================================
// Forwards
Expand Down
6 changes: 3 additions & 3 deletions include/seqan3/io/sam_file/format_bam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ inline void format_bam::read_alignment_record(stream_type & stream,
{
assert(core.l_seq == (seq_length + offset_tmp + soft_clipping_end)); // sanity check
using alph_t = std::ranges::range_value_t<decltype(get<1>(align))>;
constexpr auto from_dna16 = detail::convert_through_char_representation<alph_t, dna16sam>;
constexpr auto from_dna16 = detail::convert_through_char_representation<dna16sam, alph_t>;

get<1>(align).reserve(seq_length);

Expand Down Expand Up @@ -501,7 +501,7 @@ inline void format_bam::read_alignment_record(stream_type & stream,
else
{
using alph_t = std::ranges::range_value_t<decltype(seq)>;
constexpr auto from_dna16 = detail::convert_through_char_representation<alph_t, dna16sam>;
constexpr auto from_dna16 = detail::convert_through_char_representation<dna16sam, alph_t>;

for (auto [d1, d2] : seq_stream)
{
Expand Down Expand Up @@ -891,7 +891,7 @@ inline void format_bam::write_alignment_record([[maybe_unused]] stream_type & s

// write seq (bit-compressed: dna16sam characters go into one byte)
using alph_t = std::ranges::range_value_t<seq_type>;
constexpr auto to_dna16 = detail::convert_through_char_representation<dna16sam, alph_t>;
constexpr auto to_dna16 = detail::convert_through_char_representation<alph_t, dna16sam>;

auto sit = std::ranges::begin(seq);
for (int32_t sidx = 0; sidx < ((core.l_seq & 1) ? core.l_seq - 1 : core.l_seq); ++sidx, ++sit)
Expand Down

0 comments on commit b778975

Please sign in to comment.