diff --git a/.github/workflows/reuse.yaml b/.github/workflows/reuse.yaml new file mode 100644 index 0000000..df29bbc --- /dev/null +++ b/.github/workflows/reuse.yaml @@ -0,0 +1,36 @@ +name: REUSE + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +permissions: + contents: read + +jobs: + reuse-check: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v6 + with: + args: lint + + - name: Generate REUSE SPDX SBOM + uses: fsfe/reuse-action@v6 + with: + args: spdx --output timeq.spdx + + - name: Upload REUSE SPDX SBOM + uses: actions/upload-artifact@v7 + with: + name: timeq-spdx + path: timeq.spdx + if-no-files-found: error + retention-days: 14 diff --git a/LICENSES/BSD-2-Clause.txt b/LICENSES/BSD-2-Clause.txt new file mode 100644 index 0000000..5f662b3 --- /dev/null +++ b/LICENSES/BSD-2-Clause.txt @@ -0,0 +1,9 @@ +Copyright (c) + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000..2071b23 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index d510cec..4b51dbb 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ [![CMake](https://github.com/Quicr/timeq/actions/workflows/cmake.yml/badge.svg)](https://github.com/Quicr/timeq/actions/workflows/cmake.yml) +[![REUSE status](https://api.reuse.software/badge/github.com/fsfe/reuse-action)](https://api.reuse.software/info/github.com/fsfe/reuse-action) +[![REUSE Compliance](https://github.com/Quicr/timeq/actions/workflows/reuse.yaml/badge.svg?branch=main)](https://github.com/Quicr/timeq/actions/workflows/reuse.yaml) + A time-based queue where the length of the queue is a duration, divided into buckets based on a given time interval. As time progresses, buckets in the past are cleared, and the main queue is updated so that the front only returns a valid object that has diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 0000000..ec2adad --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: Copyright (c) 2023 Cisco Systems +# SPDX-License-Identifier: BSD-2-Clause + +version = 1 + +[[annotations]] +path = [ + ".clang-format", + ".github/workflows/**", + ".gitignore", + "AUTHORS.md", + "README.md", +] +SPDX-FileCopyrightText = "NONE" +SPDX-License-Identifier = "BSD-2-Clause" diff --git a/benchmark/realistic_time_queue.cpp b/benchmark/realistic_time_queue.cpp index de95b01..2fe2340 100644 --- a/benchmark/realistic_time_queue.cpp +++ b/benchmark/realistic_time_queue.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright (c) 2023 Cisco Systems +// SPDX-License-Identifier: BSD-2-Clause + #include "time_queue_bench.hpp" #include diff --git a/benchmark/time_queue.cpp b/benchmark/time_queue.cpp index d5bda32..291a0f5 100644 --- a/benchmark/time_queue.cpp +++ b/benchmark/time_queue.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright (c) 2023 Cisco Systems +// SPDX-License-Identifier: BSD-2-Clause + #include "time_queue_bench.hpp" #include diff --git a/benchmark/time_queue_bench.hpp b/benchmark/time_queue_bench.hpp index be9b997..f14c75e 100644 --- a/benchmark/time_queue_bench.hpp +++ b/benchmark/time_queue_bench.hpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright (c) 2023 Cisco Systems +// SPDX-License-Identifier: BSD-2-Clause + #pragma once #include diff --git a/cmake/version.h.in b/cmake/version.h.in index a603eb7..3026342 100644 --- a/cmake/version.h.in +++ b/cmake/version.h.in @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright (c) 2023 Cisco Systems +// SPDX-License-Identifier: BSD-2-Clause + #pragma once #define TIMEQ_VERSION "@PROJECT_VERSION@" diff --git a/tests/fast_time_queue.cpp b/tests/fast_time_queue.cpp index 9458b86..9148741 100644 --- a/tests/fast_time_queue.cpp +++ b/tests/fast_time_queue.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright (c) 2023 Cisco Systems +// SPDX-License-Identifier: BSD-2-Clause + #include #include diff --git a/tests/time_queue.cpp b/tests/time_queue.cpp index 39b63b6..138a525 100644 --- a/tests/time_queue.cpp +++ b/tests/time_queue.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright (c) 2023 Cisco Systems +// SPDX-License-Identifier: BSD-2-Clause + #include #include