diff --git a/CMakeLists.txt b/CMakeLists.txt index f948270..97fdb4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 cmake_minimum_required(VERSION 3.15) project(aare diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f4bbcd2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/README.md b/README.md index 119c3b0..2bfdade 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ Data analysis library for PSI hybrid detectors Detailed documentation including installation can be found in [Documentation](https://slsdetectorgroup.github.io/aare/) +## License + +This project is licensed under the MPL-2.0 license. +See the LICENSE file or https://www.mozilla.org/en-US/MPL/ for details. ## Build and install diff --git a/RELEASE.md b/RELEASE.md index 460ede6..78fb687 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -6,6 +6,7 @@ This document describes the difference between Release 2025.8.22 and RELEASE_DAT ### New Features: +- Added SPDX-License-Identifier: MPL-2.0 to source files - Calculate Eta3 supports all cluster types - interpolation class supports using cross eta3x3 and eta3x3 on full cluster as well as eta2x2 on full cluster - interpolation class has option to calculate the rosenblatt transform diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index f749466..57ca213 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 include(FetchContent) diff --git a/benchmarks/calculateeta_benchmark.cpp b/benchmarks/calculateeta_benchmark.cpp index f85e4ca..41a4114 100644 --- a/benchmarks/calculateeta_benchmark.cpp +++ b/benchmarks/calculateeta_benchmark.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CalculateEta.hpp" #include "aare/ClusterFile.hpp" #include diff --git a/benchmarks/ndarray_benchmark.cpp b/benchmarks/ndarray_benchmark.cpp index 91a2d9b..456f4d4 100644 --- a/benchmarks/ndarray_benchmark.cpp +++ b/benchmarks/ndarray_benchmark.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/NDArray.hpp" #include diff --git a/benchmarks/reduce_benchmark.cpp b/benchmarks/reduce_benchmark.cpp index b697747..9a76f73 100644 --- a/benchmarks/reduce_benchmark.cpp +++ b/benchmarks/reduce_benchmark.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Cluster.hpp" #include diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 7aabea1..6e60d07 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -49,4 +49,5 @@ test: - python -m pytest python/tests about: + license: SPDX-License-Identifier MPL-2.0 summary: Data analysis library for hybrid pixel detectors from PSI diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 249fe0e..78ffe82 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 find_package(Doxygen REQUIRED) find_package(Sphinx REQUIRED) diff --git a/etc/add_license.py b/etc/add_license.py new file mode 100644 index 0000000..f43b6cd --- /dev/null +++ b/etc/add_license.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python3 +import argparse +import fnmatch +import os +from pathlib import Path + +CPP_PATTERNS = ["*.h", "*.hpp", "*.cpp"] +PY_PATTERNS = ["*.py"] +CMAKE_PATTERNS = ["CMakeLists.txt"] + +FILE_PATTERNS = CPP_PATTERNS + PY_PATTERNS + CMAKE_PATTERNS +LICENSE_TEXT = "SPDX-License-Identifier: MPL-2.0" + + +def get_comment_prefix(filename: str) -> str | None: + if any(fnmatch.fnmatch(filename, p) for p in CPP_PATTERNS): + return "// " + if any(fnmatch.fnmatch(filename, p) for p in (PY_PATTERNS + CMAKE_PATTERNS)): + return "# " + return None + + +def matches_pattern(filename: str) -> bool: + return any(fnmatch.fnmatch(filename, p) for p in FILE_PATTERNS) + + +def process_file(filepath: Path) -> bool: + filename = filepath.name + prefix = get_comment_prefix(filename) + if not prefix: + return False + + license_line = f"{prefix}{LICENSE_TEXT}\n" + + try: + with filepath.open("r", encoding="utf-8") as f: + lines = f.readlines() + except Exception as e: + print(f"⚠️ Error reading {filepath}: {e}") + return False + + # Skip if SPDX already present anywhere in the file + if any("SPDX-License-Identifier" in line for line in lines): + return False + + insert_index = 0 + + # For Python, keep shebang on the very first line + if filename.endswith(".py") and lines: + if lines[0].startswith("#!"): + insert_index = 1 + + lines.insert(insert_index, license_line) + + try: + with filepath.open("w", encoding="utf-8") as f: + f.writelines(lines) + except Exception as e: + print(f"⚠️ Error writing {filepath}: {e}") + return False + + return True + + +def main() -> None: + parser = argparse.ArgumentParser( + description="Add SPDX-License-Identifier: MPL-2.0 to source files." + ) + parser.add_argument( + "path", + help="Root directory to recursively process " + "(*.h, *.cpp, *.py, and CMakeLists.txt).", + ) + + args = parser.parse_args() + + root_path = Path(args.path).expanduser().resolve() + + if not root_path.exists(): + print(f"Error: Path does not exist: {root_path}") + raise SystemExit(1) + + if not root_path.is_dir(): + print(f"Error: Path is not a directory: {root_path}") + raise SystemExit(1) + + print(f"Processing directory: {root_path}") + modified = 0 + + for dirpath, _, files in os.walk(root_path): + dirpath = Path(dirpath) + for name in files: + if matches_pattern(name): + fullpath = dirpath / name + if process_file(fullpath): + print(f"✔ Added SPDX: {fullpath}") + modified += 1 + + print(f"\nDone. Updated {modified} file(s).") + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/update_version.py b/etc/update_version.py similarity index 97% rename from update_version.py rename to etc/update_version.py index 783eb9f..15eb869 100644 --- a/update_version.py +++ b/etc/update_version.py @@ -1,4 +1,4 @@ -# SPDX-License-Identifier: LGPL-3.0-or-other +# SPDX-License-Identifier: MPL-2.0 # Copyright (C) 2021 Contributors to the Aare Package """ Script to update VERSION file with semantic versioning if provided as an argument, or with 0.0.0 if no argument is provided. diff --git a/include/aare/ArrayExpr.hpp b/include/aare/ArrayExpr.hpp index e5fb5d7..368f691 100644 --- a/include/aare/ArrayExpr.hpp +++ b/include/aare/ArrayExpr.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/defs.hpp" #include diff --git a/include/aare/CalculateEta.hpp b/include/aare/CalculateEta.hpp index 08924d9..31dc3fc 100644 --- a/include/aare/CalculateEta.hpp +++ b/include/aare/CalculateEta.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Cluster.hpp" diff --git a/include/aare/CircularFifo.hpp b/include/aare/CircularFifo.hpp index 853a89f..03d289d 100644 --- a/include/aare/CircularFifo.hpp +++ b/include/aare/CircularFifo.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include diff --git a/include/aare/Cluster.hpp b/include/aare/Cluster.hpp index f402623..aa56def 100755 --- a/include/aare/Cluster.hpp +++ b/include/aare/Cluster.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 /************************************************ * @file Cluster.hpp diff --git a/include/aare/ClusterCollector.hpp b/include/aare/ClusterCollector.hpp index a1cbcff..23666b7 100644 --- a/include/aare/ClusterCollector.hpp +++ b/include/aare/ClusterCollector.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include #include diff --git a/include/aare/ClusterFile.hpp b/include/aare/ClusterFile.hpp index 1295252..d94be1c 100644 --- a/include/aare/ClusterFile.hpp +++ b/include/aare/ClusterFile.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Cluster.hpp" diff --git a/include/aare/ClusterFileSink.hpp b/include/aare/ClusterFileSink.hpp index 8a1182f..4abd741 100644 --- a/include/aare/ClusterFileSink.hpp +++ b/include/aare/ClusterFileSink.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include #include diff --git a/include/aare/ClusterFinder.hpp b/include/aare/ClusterFinder.hpp index f73772f..3f140a9 100644 --- a/include/aare/ClusterFinder.hpp +++ b/include/aare/ClusterFinder.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/ClusterFile.hpp" #include "aare/ClusterVector.hpp" diff --git a/include/aare/ClusterFinderMT.hpp b/include/aare/ClusterFinderMT.hpp index cf47781..42e8105 100644 --- a/include/aare/ClusterFinderMT.hpp +++ b/include/aare/ClusterFinderMT.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include #include diff --git a/include/aare/ClusterVector.hpp b/include/aare/ClusterVector.hpp index 07416c2..a7f6dc4 100644 --- a/include/aare/ClusterVector.hpp +++ b/include/aare/ClusterVector.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Cluster.hpp" //TODO maybe store in seperate file !!! #include diff --git a/include/aare/CtbRawFile.hpp b/include/aare/CtbRawFile.hpp index afae0a2..ebcfa46 100644 --- a/include/aare/CtbRawFile.hpp +++ b/include/aare/CtbRawFile.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/FileInterface.hpp" diff --git a/include/aare/DetectorGeometry.hpp b/include/aare/DetectorGeometry.hpp index 0511319..31bba94 100644 --- a/include/aare/DetectorGeometry.hpp +++ b/include/aare/DetectorGeometry.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/RawMasterFile.hpp" //ROI refactor away #include "aare/defs.hpp" diff --git a/include/aare/Dtype.hpp b/include/aare/Dtype.hpp index 7047264..bb21457 100644 --- a/include/aare/Dtype.hpp +++ b/include/aare/Dtype.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include #include diff --git a/include/aare/File.hpp b/include/aare/File.hpp index e8f1589..6e65fa2 100644 --- a/include/aare/File.hpp +++ b/include/aare/File.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/FileInterface.hpp" #include diff --git a/include/aare/FileInterface.hpp b/include/aare/FileInterface.hpp index 6ca4755..654ad0b 100644 --- a/include/aare/FileInterface.hpp +++ b/include/aare/FileInterface.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Dtype.hpp" #include "aare/Frame.hpp" diff --git a/include/aare/FilePtr.hpp b/include/aare/FilePtr.hpp index 2ffc293..2cd0849 100644 --- a/include/aare/FilePtr.hpp +++ b/include/aare/FilePtr.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include #include diff --git a/include/aare/Fit.hpp b/include/aare/Fit.hpp index 1beec0a..c6091ad 100644 --- a/include/aare/Fit.hpp +++ b/include/aare/Fit.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include diff --git a/include/aare/Frame.hpp b/include/aare/Frame.hpp index 16e9f44..d619594 100644 --- a/include/aare/Frame.hpp +++ b/include/aare/Frame.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Dtype.hpp" #include "aare/NDArray.hpp" diff --git a/include/aare/GainMap.hpp b/include/aare/GainMap.hpp index ac558d0..ff88891 100644 --- a/include/aare/GainMap.hpp +++ b/include/aare/GainMap.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 /************************************************ * @file GainMap.hpp * @short function to apply gain map of image size to a vector of clusters - diff --git a/include/aare/Interpolator.hpp b/include/aare/Interpolator.hpp index 02b8fd2..913e6e2 100644 --- a/include/aare/Interpolator.hpp +++ b/include/aare/Interpolator.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/CalculateEta.hpp" diff --git a/include/aare/JungfrauDataFile.hpp b/include/aare/JungfrauDataFile.hpp index f871b86..0911c28 100644 --- a/include/aare/JungfrauDataFile.hpp +++ b/include/aare/JungfrauDataFile.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include #include diff --git a/include/aare/NDArray.hpp b/include/aare/NDArray.hpp index 731ba2f..57c0087 100644 --- a/include/aare/NDArray.hpp +++ b/include/aare/NDArray.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once /* Container holding image data, or a time series of image data in contigious diff --git a/include/aare/NDView.hpp b/include/aare/NDView.hpp index 0aa4f78..42a83a5 100644 --- a/include/aare/NDView.hpp +++ b/include/aare/NDView.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/ArrayExpr.hpp" #include "aare/defs.hpp" diff --git a/include/aare/NumpyFile.hpp b/include/aare/NumpyFile.hpp index 481a1a0..76d5321 100644 --- a/include/aare/NumpyFile.hpp +++ b/include/aare/NumpyFile.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Dtype.hpp" #include "aare/FileInterface.hpp" diff --git a/include/aare/NumpyHelpers.hpp b/include/aare/NumpyHelpers.hpp index 2facc4c..d5ab8f9 100644 --- a/include/aare/NumpyHelpers.hpp +++ b/include/aare/NumpyHelpers.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include diff --git a/include/aare/Pedestal.hpp b/include/aare/Pedestal.hpp index 0efc4b7..5753176 100644 --- a/include/aare/Pedestal.hpp +++ b/include/aare/Pedestal.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Frame.hpp" #include "aare/NDArray.hpp" diff --git a/include/aare/PixelMap.hpp b/include/aare/PixelMap.hpp index 9c30680..41f0952 100644 --- a/include/aare/PixelMap.hpp +++ b/include/aare/PixelMap.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/NDArray.hpp" diff --git a/include/aare/ProducerConsumerQueue.hpp b/include/aare/ProducerConsumerQueue.hpp index f189cec..bf24c25 100644 --- a/include/aare/ProducerConsumerQueue.hpp +++ b/include/aare/ProducerConsumerQueue.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 /* * Copyright (c) Meta Platforms, Inc. and affiliates. * diff --git a/include/aare/RawFile.hpp b/include/aare/RawFile.hpp index b63095a..d0b164d 100644 --- a/include/aare/RawFile.hpp +++ b/include/aare/RawFile.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/DetectorGeometry.hpp" #include "aare/FileInterface.hpp" diff --git a/include/aare/RawMasterFile.hpp b/include/aare/RawMasterFile.hpp index a30ace5..a6c04e6 100644 --- a/include/aare/RawMasterFile.hpp +++ b/include/aare/RawMasterFile.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/defs.hpp" #include diff --git a/include/aare/RawSubFile.hpp b/include/aare/RawSubFile.hpp index c38f540..50db61f 100644 --- a/include/aare/RawSubFile.hpp +++ b/include/aare/RawSubFile.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Frame.hpp" #include "aare/defs.hpp" diff --git a/include/aare/VarClusterFinder.hpp b/include/aare/VarClusterFinder.hpp index a002f9b..7cd20c8 100644 --- a/include/aare/VarClusterFinder.hpp +++ b/include/aare/VarClusterFinder.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include diff --git a/include/aare/algorithm.hpp b/include/aare/algorithm.hpp index 0588d1a..288bec5 100644 --- a/include/aare/algorithm.hpp +++ b/include/aare/algorithm.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include diff --git a/include/aare/calibration.hpp b/include/aare/calibration.hpp index 3b18da6..d187172 100644 --- a/include/aare/calibration.hpp +++ b/include/aare/calibration.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/NDArray.hpp" diff --git a/include/aare/decode.hpp b/include/aare/decode.hpp index ec24447..fc2b1e1 100644 --- a/include/aare/decode.hpp +++ b/include/aare/decode.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include diff --git a/include/aare/defs.hpp b/include/aare/defs.hpp index 041dbc9..1f75131 100644 --- a/include/aare/defs.hpp +++ b/include/aare/defs.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include "aare/Dtype.hpp" diff --git a/include/aare/logger.hpp b/include/aare/logger.hpp index 0bedd7a..382ebd4 100644 --- a/include/aare/logger.hpp +++ b/include/aare/logger.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once /*Utility to log to console*/ diff --git a/include/aare/utils/ifstream_helpers.hpp b/include/aare/utils/ifstream_helpers.hpp index a8d0d21..42c34d6 100644 --- a/include/aare/utils/ifstream_helpers.hpp +++ b/include/aare/utils/ifstream_helpers.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include diff --git a/include/aare/utils/par.hpp b/include/aare/utils/par.hpp index 55f60f4..116b32b 100644 --- a/include/aare/utils/par.hpp +++ b/include/aare/utils/par.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include #include diff --git a/include/aare/utils/task.hpp b/include/aare/utils/task.hpp index 63fe691..5ad0105 100644 --- a/include/aare/utils/task.hpp +++ b/include/aare/utils/task.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include #include diff --git a/pyproject.toml b/pyproject.toml index db3cb3c..2bb3816 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ dependencies = [ "numpy", "matplotlib", ] +license = { file = "LICENSE" } [tool.cibuildwheel] diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 9f6115e..ec2962c 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 find_package (Python 3.10 COMPONENTS Interpreter Development.Module REQUIRED) set(PYBIND11_FINDPYTHON ON) # Needed for RH8 diff --git a/python/aare/ClusterFinder.py b/python/aare/ClusterFinder.py index 2ae8db9..eae7ad7 100644 --- a/python/aare/ClusterFinder.py +++ b/python/aare/ClusterFinder.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 from . import _aare import numpy as np diff --git a/python/aare/ClusterVector.py b/python/aare/ClusterVector.py index 4e06c45..a294bb5 100644 --- a/python/aare/ClusterVector.py +++ b/python/aare/ClusterVector.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 from . import _aare diff --git a/python/aare/CtbRawFile.py b/python/aare/CtbRawFile.py index b2dcb0a..cd4241d 100644 --- a/python/aare/CtbRawFile.py +++ b/python/aare/CtbRawFile.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 from . import _aare import numpy as np diff --git a/python/aare/RawFile.py b/python/aare/RawFile.py index 98d0394..988ff3d 100644 --- a/python/aare/RawFile.py +++ b/python/aare/RawFile.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 from . import _aare import numpy as np from .ScanParameters import ScanParameters diff --git a/python/aare/ScanParameters.py b/python/aare/ScanParameters.py index 5486ca9..b435ae0 100644 --- a/python/aare/ScanParameters.py +++ b/python/aare/ScanParameters.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 from . import _aare class ScanParameters(_aare.ScanParameters): diff --git a/python/aare/__init__.py b/python/aare/__init__.py index d2a69b0..b69d76e 100644 --- a/python/aare/__init__.py +++ b/python/aare/__init__.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 # Make the compiled classes that live in _aare available from aare. from . import _aare diff --git a/python/aare/calibration.py b/python/aare/calibration.py index 6f45d4a..b7a23e7 100644 --- a/python/aare/calibration.py +++ b/python/aare/calibration.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 #Calibration related functions import numpy as np def load_calibration(fname, hg0=False): diff --git a/python/aare/func.py b/python/aare/func.py index e8a7b46..ed2ef0c 100644 --- a/python/aare/func.py +++ b/python/aare/func.py @@ -1 +1,2 @@ +# SPDX-License-Identifier: MPL-2.0 from ._aare import gaus, pol1, scurve, scurve2 \ No newline at end of file diff --git a/python/aare/transform.py b/python/aare/transform.py index 2f66942..efcba28 100644 --- a/python/aare/transform.py +++ b/python/aare/transform.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import numpy as np from . import _aare diff --git a/python/aare/utils.py b/python/aare/utils.py index a10f54c..2e5d2d3 100644 --- a/python/aare/utils.py +++ b/python/aare/utils.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable diff --git a/python/examples/fits.py b/python/examples/fits.py index aa3aef6..f3f6fc9 100644 --- a/python/examples/fits.py +++ b/python/examples/fits.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import matplotlib.pyplot as plt import numpy as np from aare import fit_gaus, fit_pol1 diff --git a/python/examples/play.py b/python/examples/play.py index 5b80887..fa6e171 100644 --- a/python/examples/play.py +++ b/python/examples/play.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 from aare import apply_calibration import numpy as np diff --git a/python/src/bind_Cluster.hpp b/python/src/bind_Cluster.hpp index 5124e14..eca0881 100644 --- a/python/src/bind_Cluster.hpp +++ b/python/src/bind_Cluster.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Cluster.hpp" #include diff --git a/python/src/bind_ClusterCollector.hpp b/python/src/bind_ClusterCollector.hpp index 84172cb..2e621ed 100644 --- a/python/src/bind_ClusterCollector.hpp +++ b/python/src/bind_ClusterCollector.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterCollector.hpp" #include "aare/ClusterFileSink.hpp" #include "aare/ClusterFinder.hpp" diff --git a/python/src/bind_ClusterFile.hpp b/python/src/bind_ClusterFile.hpp index 67a2225..fbdd190 100644 --- a/python/src/bind_ClusterFile.hpp +++ b/python/src/bind_ClusterFile.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CalculateEta.hpp" #include "aare/ClusterFile.hpp" #include "aare/defs.hpp" diff --git a/python/src/bind_ClusterFileSink.hpp b/python/src/bind_ClusterFileSink.hpp index f717de6..ade574d 100644 --- a/python/src/bind_ClusterFileSink.hpp +++ b/python/src/bind_ClusterFileSink.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterCollector.hpp" #include "aare/ClusterFileSink.hpp" #include "aare/ClusterFinder.hpp" diff --git a/python/src/bind_ClusterFinder.hpp b/python/src/bind_ClusterFinder.hpp index 5f0fe8d..49e203b 100644 --- a/python/src/bind_ClusterFinder.hpp +++ b/python/src/bind_ClusterFinder.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterCollector.hpp" #include "aare/ClusterFileSink.hpp" #include "aare/ClusterFinder.hpp" diff --git a/python/src/bind_ClusterFinderMT.hpp b/python/src/bind_ClusterFinderMT.hpp index 0ecbbd1..c03eeeb 100644 --- a/python/src/bind_ClusterFinderMT.hpp +++ b/python/src/bind_ClusterFinderMT.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterCollector.hpp" #include "aare/ClusterFileSink.hpp" #include "aare/ClusterFinder.hpp" diff --git a/python/src/bind_ClusterVector.hpp b/python/src/bind_ClusterVector.hpp index affee5b..a9a71ac 100644 --- a/python/src/bind_ClusterVector.hpp +++ b/python/src/bind_ClusterVector.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterCollector.hpp" #include "aare/ClusterFileSink.hpp" #include "aare/ClusterFinder.hpp" diff --git a/python/src/bind_calibration.hpp b/python/src/bind_calibration.hpp index 836a6de..a4a3f16 100644 --- a/python/src/bind_calibration.hpp +++ b/python/src/bind_calibration.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/calibration.hpp" #include diff --git a/python/src/ctb_raw_file.hpp b/python/src/ctb_raw_file.hpp index 5eb9652..6e6aa51 100644 --- a/python/src/ctb_raw_file.hpp +++ b/python/src/ctb_raw_file.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CtbRawFile.hpp" #include "aare/File.hpp" diff --git a/python/src/file.hpp b/python/src/file.hpp index 262b4f8..64ba74d 100644 --- a/python/src/file.hpp +++ b/python/src/file.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CtbRawFile.hpp" #include "aare/File.hpp" #include "aare/Frame.hpp" diff --git a/python/src/fit.hpp b/python/src/fit.hpp index 47568d6..57f49ac 100644 --- a/python/src/fit.hpp +++ b/python/src/fit.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include #include #include diff --git a/python/src/interpolation.hpp b/python/src/interpolation.hpp index 745d356..a9d79c3 100644 --- a/python/src/interpolation.hpp +++ b/python/src/interpolation.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CalculateEta.hpp" #include "aare/Interpolator.hpp" #include "aare/NDArray.hpp" diff --git a/python/src/jungfrau_data_file.hpp b/python/src/jungfrau_data_file.hpp index 62a95c9..9b0f188 100644 --- a/python/src/jungfrau_data_file.hpp +++ b/python/src/jungfrau_data_file.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/JungfrauDataFile.hpp" #include "aare/defs.hpp" diff --git a/python/src/module.cpp b/python/src/module.cpp index a3d4e59..984e9f7 100644 --- a/python/src/module.cpp +++ b/python/src/module.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 // Files with bindings to the different classes // New style file naming diff --git a/python/src/np_helper.hpp b/python/src/np_helper.hpp index 78166aa..9283be2 100644 --- a/python/src/np_helper.hpp +++ b/python/src/np_helper.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #pragma once #include diff --git a/python/src/pedestal.hpp b/python/src/pedestal.hpp index 23d8247..9bef948 100644 --- a/python/src/pedestal.hpp +++ b/python/src/pedestal.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Pedestal.hpp" #include "np_helper.hpp" diff --git a/python/src/pixel_map.hpp b/python/src/pixel_map.hpp index 986728b..ed5e550 100644 --- a/python/src/pixel_map.hpp +++ b/python/src/pixel_map.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/PixelMap.hpp" #include "np_helper.hpp" diff --git a/python/src/raw_file.hpp b/python/src/raw_file.hpp index 83f1110..64cc9aa 100644 --- a/python/src/raw_file.hpp +++ b/python/src/raw_file.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CtbRawFile.hpp" #include "aare/File.hpp" #include "aare/Frame.hpp" diff --git a/python/src/raw_master_file.hpp b/python/src/raw_master_file.hpp index 34db4d3..bcd440c 100644 --- a/python/src/raw_master_file.hpp +++ b/python/src/raw_master_file.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CtbRawFile.hpp" #include "aare/File.hpp" diff --git a/python/src/raw_sub_file.hpp b/python/src/raw_sub_file.hpp index cff511b..6e2b6ca 100644 --- a/python/src/raw_sub_file.hpp +++ b/python/src/raw_sub_file.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CtbRawFile.hpp" #include "aare/File.hpp" #include "aare/Frame.hpp" diff --git a/python/src/var_cluster.hpp b/python/src/var_cluster.hpp index 4e7302d..90de908 100644 --- a/python/src/var_cluster.hpp +++ b/python/src/var_cluster.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/VarClusterFinder.hpp" #include "np_helper.hpp" // #include "aare/defs.hpp" diff --git a/python/tests/conftest.py b/python/tests/conftest.py index a6809ee..cdd14f8 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import os from pathlib import Path import pytest diff --git a/python/tests/test_Cluster.py b/python/tests/test_Cluster.py index de999c8..6d3e522 100644 --- a/python/tests/test_Cluster.py +++ b/python/tests/test_Cluster.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import pytest import numpy as np diff --git a/python/tests/test_ClusterFile.py b/python/tests/test_ClusterFile.py index d797095..5e03200 100644 --- a/python/tests/test_ClusterFile.py +++ b/python/tests/test_ClusterFile.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import pytest import numpy as np diff --git a/python/tests/test_ClusterVector.py b/python/tests/test_ClusterVector.py index eb43857..f5b1e54 100644 --- a/python/tests/test_ClusterVector.py +++ b/python/tests/test_ClusterVector.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import pytest import numpy as np import boost_histogram as bh diff --git a/python/tests/test_Interpolation.py b/python/tests/test_Interpolation.py index b39da7c..78fe0c6 100644 --- a/python/tests/test_Interpolation.py +++ b/python/tests/test_Interpolation.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import pytest import numpy as np import boost_histogram as bh diff --git a/python/tests/test_RawFile.py b/python/tests/test_RawFile.py index 0a3b804..22de6f6 100644 --- a/python/tests/test_RawFile.py +++ b/python/tests/test_RawFile.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import pytest from aare import RawFile import numpy as np diff --git a/python/tests/test_RawSubFile.py b/python/tests/test_RawSubFile.py index 50842f8..a8ab0f1 100644 --- a/python/tests/test_RawSubFile.py +++ b/python/tests/test_RawSubFile.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import pytest import numpy as np from aare import RawSubFile, DetectorType diff --git a/python/tests/test_calibration.py b/python/tests/test_calibration.py index bbd980c..5a4a107 100644 --- a/python/tests/test_calibration.py +++ b/python/tests/test_calibration.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import pytest import numpy as np diff --git a/python/tests/test_jungfrau_dat_files.py b/python/tests/test_jungfrau_dat_files.py index 9c8902b..a675dcd 100644 --- a/python/tests/test_jungfrau_dat_files.py +++ b/python/tests/test_jungfrau_dat_files.py @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 import pytest import numpy as np from aare import JungfrauDataFile diff --git a/src/CalculateEta.test.cpp b/src/CalculateEta.test.cpp index 4fa1698..127680f 100644 --- a/src/CalculateEta.test.cpp +++ b/src/CalculateEta.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 /************************************************ * @file CalculateEta.test.cpp * @short test case to calculate_eta2 diff --git a/src/Cluster.test.cpp b/src/Cluster.test.cpp index bf5f894..4919b85 100644 --- a/src/Cluster.test.cpp +++ b/src/Cluster.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 /************************************************ * @file test-Cluster.cpp * @short test case for generic Cluster, ClusterVector, and calculate_eta2 diff --git a/src/ClusterFile.test.cpp b/src/ClusterFile.test.cpp index cbbad5b..78ba3e6 100644 --- a/src/ClusterFile.test.cpp +++ b/src/ClusterFile.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterFile.hpp" #include "test_config.hpp" diff --git a/src/ClusterFinder.test.cpp b/src/ClusterFinder.test.cpp index 8989581..fd7eeb3 100644 --- a/src/ClusterFinder.test.cpp +++ b/src/ClusterFinder.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterFinder.hpp" #include "aare/Pedestal.hpp" #include diff --git a/src/ClusterFinderMT.test.cpp b/src/ClusterFinderMT.test.cpp index 0794687..99f81f7 100644 --- a/src/ClusterFinderMT.test.cpp +++ b/src/ClusterFinderMT.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterFinderMT.hpp" #include "aare/Cluster.hpp" diff --git a/src/ClusterVector.test.cpp b/src/ClusterVector.test.cpp index 0ec1c55..5e45ea6 100644 --- a/src/ClusterVector.test.cpp +++ b/src/ClusterVector.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/ClusterVector.hpp" #include diff --git a/src/CtbRawFile.cpp b/src/CtbRawFile.cpp index a6a1d92..c3e2910 100644 --- a/src/CtbRawFile.cpp +++ b/src/CtbRawFile.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/CtbRawFile.hpp" #include diff --git a/src/DetectorGeometry.cpp b/src/DetectorGeometry.cpp index 9658aad..4e3b367 100644 --- a/src/DetectorGeometry.cpp +++ b/src/DetectorGeometry.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/DetectorGeometry.hpp" #include "fmt/core.h" diff --git a/src/DetectorGeometry.test.cpp b/src/DetectorGeometry.test.cpp index 1424f0a..ba8b620 100644 --- a/src/DetectorGeometry.test.cpp +++ b/src/DetectorGeometry.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/File.hpp" #include "aare/RawFile.hpp" #include "aare/RawMasterFile.hpp" //needed for ROI diff --git a/src/Dtype.cpp b/src/Dtype.cpp index 0fdffec..ad708ad 100644 --- a/src/Dtype.cpp +++ b/src/Dtype.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Dtype.hpp" #include "aare/defs.hpp" diff --git a/src/Dtype.test.cpp b/src/Dtype.test.cpp index 256be64..4336681 100644 --- a/src/Dtype.test.cpp +++ b/src/Dtype.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Dtype.hpp" diff --git a/src/File.cpp b/src/File.cpp index e4b88ec..1bab0eb 100644 --- a/src/File.cpp +++ b/src/File.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/File.hpp" #include "aare/JungfrauDataFile.hpp" #include "aare/NumpyFile.hpp" diff --git a/src/FilePtr.cpp b/src/FilePtr.cpp index f850080..dd907bd 100644 --- a/src/FilePtr.cpp +++ b/src/FilePtr.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/FilePtr.hpp" #include diff --git a/src/Fit.cpp b/src/Fit.cpp index 9d4b70b..d7f1c51 100644 --- a/src/Fit.cpp +++ b/src/Fit.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Fit.hpp" #include "aare/utils/par.hpp" #include "aare/utils/task.hpp" diff --git a/src/Frame.cpp b/src/Frame.cpp index ef7675f..9000c9c 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Frame.hpp" #include diff --git a/src/Frame.test.cpp b/src/Frame.test.cpp index bafb39c..c26aa1f 100644 --- a/src/Frame.test.cpp +++ b/src/Frame.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Frame.hpp" #include "aare/Dtype.hpp" #include diff --git a/src/Interpolator.cpp b/src/Interpolator.cpp index e746670..1240107 100644 --- a/src/Interpolator.cpp +++ b/src/Interpolator.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Interpolator.hpp" namespace aare { diff --git a/src/JungfrauDataFile.cpp b/src/JungfrauDataFile.cpp index 5fb99a6..34820b8 100644 --- a/src/JungfrauDataFile.cpp +++ b/src/JungfrauDataFile.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/JungfrauDataFile.hpp" #include "aare/algorithm.hpp" #include "aare/defs.hpp" diff --git a/src/JungfrauDataFile.test.cpp b/src/JungfrauDataFile.test.cpp index d612812..7c45668 100644 --- a/src/JungfrauDataFile.test.cpp +++ b/src/JungfrauDataFile.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/JungfrauDataFile.hpp" #include "test_config.hpp" diff --git a/src/NDArray.test.cpp b/src/NDArray.test.cpp index 146426b..f2da55c 100644 --- a/src/NDArray.test.cpp +++ b/src/NDArray.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/NDArray.hpp" #include #include diff --git a/src/NDView.test.cpp b/src/NDView.test.cpp index 04f56dd..c6de3bf 100644 --- a/src/NDView.test.cpp +++ b/src/NDView.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/NDView.hpp" #include diff --git a/src/NumpyFile.cpp b/src/NumpyFile.cpp index 4e0c215..699fa08 100644 --- a/src/NumpyFile.cpp +++ b/src/NumpyFile.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/NumpyFile.hpp" #include "aare/NumpyHelpers.hpp" diff --git a/src/NumpyFile.test.cpp b/src/NumpyFile.test.cpp index afeb382..28aa347 100644 --- a/src/NumpyFile.test.cpp +++ b/src/NumpyFile.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/NumpyFile.hpp" #include "aare/NDArray.hpp" diff --git a/src/NumpyHelpers.cpp b/src/NumpyHelpers.cpp index 106327e..a544833 100644 --- a/src/NumpyHelpers.cpp +++ b/src/NumpyHelpers.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 /* 28-03-2024 modified by: Bechir Braham diff --git a/src/NumpyHelpers.test.cpp b/src/NumpyHelpers.test.cpp index ad55b17..da17083 100644 --- a/src/NumpyHelpers.test.cpp +++ b/src/NumpyHelpers.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/NumpyHelpers.hpp" //Is this really a public header? #include diff --git a/src/Pedestal.test.cpp b/src/Pedestal.test.cpp index 4dfae08..099c47c 100644 --- a/src/Pedestal.test.cpp +++ b/src/Pedestal.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/Pedestal.hpp" #include diff --git a/src/PixelMap.cpp b/src/PixelMap.cpp index 575e201..a6da36b 100644 --- a/src/PixelMap.cpp +++ b/src/PixelMap.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/PixelMap.hpp" #include diff --git a/src/RawFile.cpp b/src/RawFile.cpp index fab8150..89bb74b 100644 --- a/src/RawFile.cpp +++ b/src/RawFile.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/RawFile.hpp" #include "aare/DetectorGeometry.hpp" #include "aare/PixelMap.hpp" diff --git a/src/RawFile.test.cpp b/src/RawFile.test.cpp index e72405c..c96a393 100644 --- a/src/RawFile.test.cpp +++ b/src/RawFile.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/RawFile.hpp" #include "aare/File.hpp" #include "aare/RawMasterFile.hpp" //needed for ROI diff --git a/src/RawMasterFile.cpp b/src/RawMasterFile.cpp index cd913fd..d54a14d 100644 --- a/src/RawMasterFile.cpp +++ b/src/RawMasterFile.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/RawMasterFile.hpp" #include "aare/RawFile.hpp" #include "aare/logger.hpp" diff --git a/src/RawMasterFile.test.cpp b/src/RawMasterFile.test.cpp index 43e87b9..0398e03 100644 --- a/src/RawMasterFile.test.cpp +++ b/src/RawMasterFile.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/RawMasterFile.hpp" #include "test_config.hpp" diff --git a/src/RawSubFile.cpp b/src/RawSubFile.cpp index 3ed2c6f..d75ca26 100644 --- a/src/RawSubFile.cpp +++ b/src/RawSubFile.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/RawSubFile.hpp" #include "aare/PixelMap.hpp" #include "aare/algorithm.hpp" diff --git a/src/RawSubFile.test.cpp b/src/RawSubFile.test.cpp index ccfb1d6..9550ed1 100644 --- a/src/RawSubFile.test.cpp +++ b/src/RawSubFile.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/RawSubFile.hpp" #include "aare/File.hpp" #include "aare/NDArray.hpp" diff --git a/src/algorithm.test.cpp b/src/algorithm.test.cpp index bd0800f..b326d90 100644 --- a/src/algorithm.test.cpp +++ b/src/algorithm.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include diff --git a/src/calibration.cpp b/src/calibration.cpp index 0cb3b99..e96f415 100644 --- a/src/calibration.cpp +++ b/src/calibration.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/calibration.hpp" namespace aare { diff --git a/src/calibration.test.cpp b/src/calibration.test.cpp index 712dcd8..ff2d623 100644 --- a/src/calibration.test.cpp +++ b/src/calibration.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 /************************************************ * @file test-Cluster.cpp * @short test case for generic Cluster, ClusterVector, and calculate_eta2 diff --git a/src/decode.cpp b/src/decode.cpp index 0c78b70..ef3ad44 100644 --- a/src/decode.cpp +++ b/src/decode.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/decode.hpp" #include namespace aare { diff --git a/src/decode.test.cpp b/src/decode.test.cpp index b4310ca..b3f1b6e 100644 --- a/src/decode.test.cpp +++ b/src/decode.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/decode.hpp" #include "aare/NDArray.hpp" diff --git a/src/defs.cpp b/src/defs.cpp index 40e6568..bcc30e5 100644 --- a/src/defs.cpp +++ b/src/defs.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/defs.hpp" #include #include diff --git a/src/defs.test.cpp b/src/defs.test.cpp index 2106d86..0b19c0f 100644 --- a/src/defs.test.cpp +++ b/src/defs.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/defs.hpp" #include diff --git a/src/utils/ifstream_helpers.cpp b/src/utils/ifstream_helpers.cpp index 79f006d..fe5ede5 100644 --- a/src/utils/ifstream_helpers.cpp +++ b/src/utils/ifstream_helpers.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/utils/ifstream_helpers.hpp" namespace aare { diff --git a/src/utils/task.cpp b/src/utils/task.cpp index af6756e..6eb77b2 100644 --- a/src/utils/task.cpp +++ b/src/utils/task.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/utils/task.hpp" namespace aare { diff --git a/src/utils/task.test.cpp b/src/utils/task.test.cpp index 3ca71c7..5544e12 100644 --- a/src/utils/task.test.cpp +++ b/src/utils/task.test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "aare/utils/task.hpp" #include diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 994dc47..1d26a77 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: MPL-2.0 # Download catch2 if configured to do so if (AARE_FETCH_CATCH) diff --git a/tests/friend_test.hpp b/tests/friend_test.hpp index 7d16000..2f2a4f3 100644 --- a/tests/friend_test.hpp +++ b/tests/friend_test.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #define FRIEND_TEST(test_name) friend void test_name##_impl(); #define TEST_CASE_PRIVATE_FWD(test_name) \ diff --git a/tests/test.cpp b/tests/test.cpp index 1d4456f..fbff514 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include "test_config.hpp" #include #include diff --git a/tests/test_macros.hpp b/tests/test_macros.hpp index 0d9f59d..f6cc7df 100644 --- a/tests/test_macros.hpp +++ b/tests/test_macros.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: MPL-2.0 #include #include