From e03f60c3954215d8d9a5158f7a924eac097fe556 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 01:07:25 +0000 Subject: [PATCH 01/18] Bump actions/setup-python from 5.2.0 to 6.1.0 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.2.0 to 6.1.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5.2.0...v6.1.0) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/nf-test.yml | 2 +- .github/workflows/publish-pypi-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 39d8d07..ee7fd61 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -44,7 +44,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5 + - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5 with: python-version: "3.11" diff --git a/.github/workflows/publish-pypi-release.yml b/.github/workflows/publish-pypi-release.yml index dbe840e..f37c2d2 100644 --- a/.github/workflows/publish-pypi-release.yml +++ b/.github/workflows/publish-pypi-release.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v6.0.1 - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v6.1.0 with: python-version: '3.x' - name: Install dependencies From 32ac18be9f5a1e0c264467ed89e287967599fc78 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Tue, 23 Dec 2025 16:28:22 +0100 Subject: [PATCH 02/18] FIX license attribute in pyproject.toml to MPL-2.0 license file and publication always refered to MPL-2.0, only the license attribute in the pyproject.toml file was wrong (MIT). --- LICENSE | 373 +++++++++++++++++++++++++++++++++++++++++++++++++ license | 151 -------------------- pyproject.toml | 2 +- 3 files changed, 374 insertions(+), 152 deletions(-) create mode 100644 LICENSE delete mode 100644 license diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d0a1fa1 --- /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 https://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. diff --git a/license b/license deleted file mode 100644 index 69ec565..0000000 --- a/license +++ /dev/null @@ -1,151 +0,0 @@ -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 - -that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or - -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: - -any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or - -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: - -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 - -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: - -for any code that a Contributor has removed from Covered Software; or - -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 - -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: - -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 - -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 https://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/pyproject.toml b/pyproject.toml index 159896a..6d7bc12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "FastOMA" dynamic = ["version"] description = "FastOMA - a package to infer orthology information among proteomes" readme = "README.md" -license = "MIT" +license = { text = "MPL-2.0" } requires-python = ">=3.8,<3.13" # ete3 incompatible with >=3.13 authors = [ { name = "Sina Majidian", email = "sina.majidian@gmail.com" }, From f0efd9381392a9a9f4d7bea5f13bfda5ec6887b2 Mon Sep 17 00:00:00 2001 From: Sina Majidian Date: Sat, 27 Dec 2025 13:02:35 -0500 Subject: [PATCH 03/18] Add script to generate splice files from Ensembl proteomes This script processes proteome data by parsing FASTA files, extracting transcripts, and writing splice files for species with multiple transcripts. --- utils/generate_splice_file_Ensembl.py | 133 ++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 utils/generate_splice_file_Ensembl.py diff --git a/utils/generate_splice_file_Ensembl.py b/utils/generate_splice_file_Ensembl.py new file mode 100644 index 0000000..9bff09d --- /dev/null +++ b/utils/generate_splice_file_Ensembl.py @@ -0,0 +1,133 @@ +import os +import sys +from Bio import SeqIO + + + +""" +python generate_splice_file_Ensembl.py input_folder + +""" + + + +def parse_proteomes(folder=None, min_sequence_length=0): # list_oma_species + """ + + parsing fasta files of proteins located in /proteome/ + using Bio.SeqIO.parse + Each fasta file is for one species. The file name is the species name. + All proteomes should be with the same extension. + output: prot_recs_lists: a dic with key as species name and its value list of Biopython record of species. + """ + # Adapted from https://github.com/DessimozLab/FastOMA/blob/main/FastOMA/_utils_roothog.py + extension = ".fa" + + project_files = os.listdir(folder) + print(folder, " as proteome folder, found ", len(project_files), " files.") + species_names = [] # query/input species name based on the file name + for file in project_files: + species_name = file.split(extension)[0] + #print("%s: %s | %s", file, species_name, ext) + #if ext in ("fa", "fasta"): + species_names.append(species_name) + #fasta_format_keep = ext # last one is stored either fa or fasta + + # todo accept all fasta formats in the input prtoeome folder, fasta, fa, fna, .. + prot_recs_lists = {} # key: species name, value is a dic of query protein Biopython records. # 'MYCGE': [SeqRecord(seq=Seq('MDFDK + #smallprot_recs_lists ={} + for species_name in species_names: + prot_address = os.path.join(folder, species_name + extension) + prots_record = list(rec for rec in SeqIO.parse(prot_address, "fasta") if len(rec) >= min_sequence_length) + #prots_record_small = list(rec for rec in SeqIO.parse(prot_address, "fasta") if len(rec) < min_sequence_length) + # logger.debug(prots_record) + #print(f"{species_name} contains {len(prots_record)} that are at least {min_sequence_length} long.") + prot_recs_lists[species_name] = prots_record + #smallprot_recs_lists[species_name]=prots_record_small + + print("There are ", len(species_names), "species in the proteome folder.") + return species_names, prot_recs_lists#, fasta_format_keep #, smallprot_recs_lists + +def extract_spliced_prots(gene2prot_transcript): + genes_withmore1=[] + diff_prot_transcript=[] + prots_with_splice={} + for species_name, gene2prot_transcript_sp in gene2prot_transcript.items(): + + for gene in gene2prot_transcript_sp.keys(): + prot_transcript_list=gene2prot_transcript_sp[gene] + if len(prot_transcript_list)>1: + genes_withmore1.append((species_name,gene)) + prots= [prot for (prot,transcript) in prot_transcript_list] + transcripts= [transcript for (prot,transcript) in prot_transcript_list] + if len(set(prots))!=len(set(transcripts)): + print(species_name,gene) + if set(prots)!=set(transcripts): + diff_prot_transcript.append((species_name,gene)) + if species_name in prots_with_splice: + prots_with_splice[species_name].append(prots) + else: + prots_with_splice[species_name]=[prots] + print('There are ',len(genes_withmore1),' genes with more than one transcripts.') + print('For these genes, there are ',len(diff_prot_transcript),' genes that the protein id is different than transcript id.') + print('We found ',len(prots_with_splice),' species that have some genes with more than one transcripts.') + return prots_with_splice + + + + +def extract_transcripts(species_names, prot_recs_lists): + total_splices=0 + gene2prot_transcript={} + for species_name, prot_recs_list in prot_recs_lists.items(): + gene2prot_transcript[species_name]={} # + + for prot_rec in prot_recs_list: + prot_name= prot_rec.id # >PSK40689.1 pep primary_assembly:GCA003013735v1:PYFQ01000001:776887:779901:1 gene:C7M61_000337 transcript:C7M61_000337_t1 gene_biotype:protein_coding transcript_biotype:protein_coding description:RIC1 domain-containing protein [Source:UniProtKB/TrEMBL;Acc:A0A2P7YXL8] + transcriptid = prot_rec.description.split("transcript:")[1].split(" ")[0] + geneid = prot_rec.description.split("gene:")[1].split(" ")[0] + protid= prot_rec.id + if geneid in gene2prot_transcript[species_name]: + total_splices+=1 + gene2prot_transcript[species_name][geneid].append((protid,transcriptid)) + + else: + gene2prot_transcript[species_name][geneid] = [(protid,transcriptid)] + + + print('Total number transcripts that are more than one transcript per gene is', total_splices) + print('Total number of species',len(gene2prot_transcript),'. For species ',species_name,', the number of genes is ',len(gene2prot_transcript[species_name])) + + return gene2prot_transcript + +def write_splice_files(proteome_folder,prots_with_splice,output_folder): + + print('Writing ', len(prots_with_splice), 'splice files') + os.mkdir(output_folder) + for species_name, prots_list in prots_with_splice.items(): + file_splice= open(output_folder+species_name+".splice",'w') + for prots in prots_list: + line= ";".join(prots) + file_splice.write(line+"\n") + file_splice.close() + print('Splice files per species are ready in ', output_folder) + return 1 + + + +if __name__ == "__main__": + + + proteome_folder= sys.argv[1] + + print("Parsing the proteome folder", proteome_folder) + species_names, prot_recs_lists = parse_proteomes(proteome_folder) + + gene2prot_transcript = extract_transcripts(species_names, prot_recs_lists) + + prots_with_splice = extract_spliced_prots(gene2prot_transcript) + output_folder= output_folder= proteome_folder+"/../splice_files/" + write_splice_files(proteome_folder,prots_with_splice, output_folder) + print("done!") + + From 3a3b95028748693dca577462259991cf6d30e947 Mon Sep 17 00:00:00 2001 From: Sina Majidian Date: Mon, 29 Dec 2025 15:44:42 -0500 Subject: [PATCH 04/18] fix: export all rootHOGs --- utils/pickle2orthoxml.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils/pickle2orthoxml.py b/utils/pickle2orthoxml.py index 556d013..fd1d374 100644 --- a/utils/pickle2orthoxml.py +++ b/utils/pickle2orthoxml.py @@ -25,9 +25,12 @@ input_pickle= sys.argv[2] # "file_D0680685.pickle" handle=open(input_pickle,'rb') orthoxml_file = pickle.load(handle) - - print(len(orthoxml_file)) - xml_str = minidom.parseString(ET.tostring(orthoxml_file[0])).toprettyxml(indent=" ") + + print(len(orthoxml_file)) # this should be the number of rootHOGs, perhaps dup at root + xml_str = "" + for item in orthoxml_file: + xml_str += minidom.parseString(ET.tostring(item)).toprettyxml(indent=" ") + xml_str += "\n" with open(input_pickle+"_noheader.orthoxml","w") as out_file: out_file.write(xml_str) From 665d16008fcc58830f338f5d8763e6b2b1e9fa3d Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Fri, 27 Feb 2026 13:51:02 +0100 Subject: [PATCH 05/18] Propagate returncodes of external processes If external subprocesses such as mafft got killed (e.g. by SLURM) because of OOM, the main FastOMA python process did simply raise an Exception and terminated with exit code 1. This prevented nextflow from restarting it with more memory/time. We now report properly the exit code of Mafft and FastTree and exit the python code with the same exit code (stored in WrapperError) --- FastOMA/_infer_subhog.py | 14 ++++++++++---- FastOMA/zoo/utils.py | 16 +++++++++++++++- FastOMA/zoo/wrappers/__init__.py | 4 +++- FastOMA/zoo/wrappers/aligners/mafft.py | 16 +++++++++++++++- FastOMA/zoo/wrappers/treebuilders/fasttree.py | 18 +++++++++++++++--- 5 files changed, 58 insertions(+), 10 deletions(-) diff --git a/FastOMA/_infer_subhog.py b/FastOMA/_infer_subhog.py index c3907c0..d098acb 100644 --- a/FastOMA/_infer_subhog.py +++ b/FastOMA/_infer_subhog.py @@ -30,6 +30,7 @@ from ._utils_subhog import MSAFilter, MSAFilterElbow, MSAFilterTrimAL from .zoo.utils import unique +from .zoo.wrappers import WrapperError low_so_detection = True # detection of proteins with low species overlap score in gene tree fragment_detection = True # this also need to be consistent in _hog_class.py @@ -76,10 +77,15 @@ def read_infer_xml_rhog(rhogid, inferhog_concurrent_on, pickles_rhog_folder, pi species_names_rhog = list(set(species_names_rhog)) logger.info("Number of unique species in rHOG " + rhogid + " is " + str(len(species_names_rhog)) + ".") - if inferhog_concurrent_on: # for big HOG we use parallelization at the level taxonomic level using concurrent - infer_hogs_concurrent(species_tree, rhogid, pickles_subhog_folder_all, rhogs_fa_folder, conf_infer_subhhogs) - else: - infer_hogs_for_rhog_levels_recursively(species_tree, rhogid, pickles_subhog_folder_all, rhogs_fa_folder, conf_infer_subhhogs) + try: + if inferhog_concurrent_on: # for big HOG we use parallelization at the level taxonomic level using concurrent + infer_hogs_concurrent(species_tree, rhogid, pickles_subhog_folder_all, rhogs_fa_folder, conf_infer_subhhogs) + else: + infer_hogs_for_rhog_levels_recursively(species_tree, rhogid, pickles_subhog_folder_all, rhogs_fa_folder, conf_infer_subhhogs) + except WrapperError as e: + logger.exception("Error of external tool during subhog inference: %s", str(e)) + sys.exit(getattr(e, "exit_code", 1)) + ##### Now read the final pickle file for this rootHOG root_node_name = species_tree.name diff --git a/FastOMA/zoo/utils.py b/FastOMA/zoo/utils.py index 43ff38b..b73c18f 100644 --- a/FastOMA/zoo/utils.py +++ b/FastOMA/zoo/utils.py @@ -109,4 +109,18 @@ def unique(seq): return [x for x in seq if x not in seen and not seen.add(x)] - +def summarize_long_message(message: str, head_chars: int = 1000, tail_lines: int = 50) -> str: + """ + Summarize a potentially long messge string. + Shows first head_chars characters and last tail_lines lines with ellipsis. + """ + output = message or "" + # Get last tail_lines + lines = output.splitlines() + tail = "\n".join(lines[-tail_lines:]) if len(lines) > tail_lines else "\n".join(lines) + # Get first head_chars + head = output[:head_chars] + ("…" if len(output) > head_chars else "") + if len(lines) > tail_lines or len(output) > head_chars: + return f"{head}\n...\n{tail}" + else: + return output diff --git a/FastOMA/zoo/wrappers/__init__.py b/FastOMA/zoo/wrappers/__init__.py index 0a0ce3a..cedc289 100644 --- a/FastOMA/zoo/wrappers/__init__.py +++ b/FastOMA/zoo/wrappers/__init__.py @@ -1,4 +1,6 @@ class WrapperError(Exception): - pass + def __init__(self, message, exit_code=1): + super().__init__(message) + self.exit_code = exit_code diff --git a/FastOMA/zoo/wrappers/aligners/mafft.py b/FastOMA/zoo/wrappers/aligners/mafft.py index 97018b9..54372ee 100644 --- a/FastOMA/zoo/wrappers/aligners/mafft.py +++ b/FastOMA/zoo/wrappers/aligners/mafft.py @@ -7,6 +7,7 @@ from .base_aligner import Aligner, AlignmentInput, DataType from ...seq_utils.utils import iter_seqrecs_from_any from ...wrappers import WrapperError +from ...utils import summarize_long_message from ..options import StringOption, FlagOption, IntegerOption, FloatOption, MultiOption, OptionSet import tempfile import logging @@ -120,7 +121,8 @@ def __call__(self, *args, **kwargs): logger.debug('Output of Mafft: stdout={}; stderr={}'.format(output, error)) if len(output) == 0 and len(error) > 0: logger.warning('is MAFFT_BINARIES set correctly: {}'.format(os.getenv('MAFFT_BINARIES', ''))) - raise WrapperError('Mafft did not compute any alignments. StdErr: {}'.format(error)) + logger.warning("Mafft did not compute any alignments. StdErr:\n%s", summarize_long_message(error)) + raise WrapperError('Mafft did not compute any alignments') self.result = self._read_result(output) # store result self.stdout = output self.stderr = error @@ -140,6 +142,18 @@ def _call(self, filename, *args, **kwargs): """ self.cli('{} {}'.format(self.command(), filename), wait=True) + + ret = self.cli.process.returncode + if ret != 0: + logger.error('Mafft returned non-zero exit status: {}'.format(ret)) + logger.error('Output of Mafft:\n\n%s\nstdout=\n%s\n{}\n\n%s\nstderr=\n%s\n{}\n\n', + "=" * 30, "=" * 30, summarize_long_message(self.cli.get_stdout()), + "=" * 30, "=" * 30, summarize_long_message(self.cli.get_stderr())) + if ret < 0: + sig = -ret + raise WrapperError(f'Mafft was terminated by signal {sig}', exit_code=128 + sig) + else: + raise WrapperError(f'Mafft exited with code {ret}', exit_code=ret) return self.cli.get_stdout(), self.cli.get_stderr() def command(self): diff --git a/FastOMA/zoo/wrappers/treebuilders/fasttree.py b/FastOMA/zoo/wrappers/treebuilders/fasttree.py index 955762e..5aa4eee 100644 --- a/FastOMA/zoo/wrappers/treebuilders/fasttree.py +++ b/FastOMA/zoo/wrappers/treebuilders/fasttree.py @@ -14,6 +14,7 @@ from ..abstract_cli import AbstractCLI from ..options import OptionSet, StringOption, IntegerOption +from ...utils import summarize_long_message from ...file_utils import TempFile, TempDir logger = logging.getLogger(__name__) @@ -89,13 +90,24 @@ def _call(self, filename, *args, **kwargs): self.returncode = self.cli.process.returncode if self.returncode != 0: + self.stdout = self.cli.get_stdout() self.stderr = self.cli.get_stderr() last_error_line = self.stderr.split('\n')[-1].strip() - msg = f"Fasttree failed on {filename}: {last_error_line}" + logger.error('FastTree returned non-zero exit status: {}'.format(self.returncode)) + logger.error('Output of FastTree:\n\n%s\nstdout=\n%s\n{}\n\n%s\nstderr=\n%s\n{}\n\n', + "=" * 30, "=" * 30, summarize_long_message(self.stdout), + "=" * 30, "=" * 30, summarize_long_message(self.stderr)) + if self.returncode < 0: + termination = f"was terminated by signal {-self.returncode}" + exit_code = 128 - self.returncode + else: + termination = f"exited with code {self.returncode}" + exit_code = self.returncode + msg = f"Fasttree {termination} on {filename}: {last_error_line}" logger.error(msg) - raise WrapperError(msg, self.stderr) + raise WrapperError(msg, exit_code=exit_code) - return (self.cli.get_stdout(), self.cli.get_stderr()) + return self.cli.get_stdout(), self.cli.get_stderr() def command(self): return str(self.options) From a960048cdda7dfa5615cd849ae14bec5a19e86f7 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Fri, 27 Feb 2026 14:16:33 +0100 Subject: [PATCH 06/18] [FIX] problem with virtualenv/hatch combination --- Dockerfile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99dd0ac..35f1f97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,17 +15,20 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* WORKDIR /src -RUN pip install --upgrade hatch pip +RUN pip install --upgrade pip \ + && pip install "hatch<1.17" "virtualenv<20.26" COPY pyproject.toml . -RUN python -m venv /app \ - && hatch dep show requirements --all > requirements.txt \ - && /app/bin/pip install wheel setuptools \ - && /app/bin/pip install -r requirements.txt + +RUN hatch dep show requirements --all > requirements.txt \ + && pip install wheel setuptools -r requirements.txt COPY . . -RUN ls -la \ - && hatch build \ - && ls -la dist/ \ +RUN hatch build \ + && ls -la dist/ + +# Create a clean venv for runtime and install the wheel +RUN python -m venv /app \ + && /app/bin/pip install --upgrade pip wheel setuptools \ && /app/bin/pip install dist/*.whl @@ -44,3 +47,5 @@ RUN apt-get update \ COPY --from=builder /app /app ENV PATH="/app/bin:$PATH" + +RUN python -c "import FastOMA; print(FastOMA.__version__)" \ No newline at end of file From 63086df325837a59568aeb3f626f456a63dbbabf Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Tue, 3 Mar 2026 11:51:37 +0100 Subject: [PATCH 07/18] [FIX] more attempts to detect oom in mafft --- FastOMA/zoo/wrappers/aligners/mafft.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/FastOMA/zoo/wrappers/aligners/mafft.py b/FastOMA/zoo/wrappers/aligners/mafft.py index 54372ee..e8b75f0 100644 --- a/FastOMA/zoo/wrappers/aligners/mafft.py +++ b/FastOMA/zoo/wrappers/aligners/mafft.py @@ -146,13 +146,15 @@ def _call(self, filename, *args, **kwargs): ret = self.cli.process.returncode if ret != 0: logger.error('Mafft returned non-zero exit status: {}'.format(ret)) - logger.error('Output of Mafft:\n\n%s\nstdout=\n%s\n{}\n\n%s\nstderr=\n%s\n{}\n\n', + logger.error('Output of Mafft:\n\n%s\nstdout=\n%s\n%s\n\n%s\nstderr=\n%s\n%s\n\n', "=" * 30, "=" * 30, summarize_long_message(self.cli.get_stdout()), "=" * 30, "=" * 30, summarize_long_message(self.cli.get_stderr())) if ret < 0: sig = -ret raise WrapperError(f'Mafft was terminated by signal {sig}', exit_code=128 + sig) else: + if ret == 1 and (was_oom_killed() or "Killed" in self.cli.get_stderr()): + raise WrapperError(f'Mafft was killed by the kernel due to running out of memory', exit_code=137) raise WrapperError(f'Mafft exited with code {ret}', exit_code=ret) return self.cli.get_stdout(), self.cli.get_stderr() @@ -348,3 +350,17 @@ def get_default_options(): StringOption('--merge', '', active=False), IntegerOption('--thread', -1, active=False), ]) + + +def was_oom_killed(): + """ + Check if the process was killed by the kernel due to running out of memory. + """ + try: + with open("/sys/fs/cgroup/memory.events") as f: + for line in f: + if line.startswith("oom_kill"): + return int(line.split()[1]) > 0 + except FileNotFoundError: + return False + return False \ No newline at end of file From 8ecf2ff2a96fc2246a14438974cf9d18410f74c4 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Tue, 3 Mar 2026 14:40:47 +0100 Subject: [PATCH 08/18] [FIX] newest docker container did not contain papermill anymore --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 35f1f97..ead810e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ RUN hatch build \ # Create a clean venv for runtime and install the wheel RUN python -m venv /app \ && /app/bin/pip install --upgrade pip wheel setuptools \ + && /app/bin/pip install -r requirements.txt \ && /app/bin/pip install dist/*.whl From 73b59bf37eceb8dcf3c059797644f3b04b351b5a Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Tue, 3 Mar 2026 16:36:43 +0100 Subject: [PATCH 09/18] update nf-test version in github action --- .github/workflows/nf-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index ee7fd61..59d6788 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -12,7 +12,7 @@ on: env: NFT_DIFF: "pdiff" NFT_DIFF_ARGS: "--line-numbers --width 120 --expand-tabs=2" - NFT_VER: "0.9.2" + NFT_VER: "0.9.4" NFT_WORKDIR: "${{ github.workspace }}/nf-test-work" NXF_ANSI_LOG: false NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity From 264d92e3872ebef16ef013dbe5a03aba50197e8e Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Tue, 3 Mar 2026 16:56:39 +0100 Subject: [PATCH 10/18] fixing issues with conda based test-runner --- .github/workflows/nf-test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 59d6788..e6a9bdb 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -13,10 +13,12 @@ env: NFT_DIFF: "pdiff" NFT_DIFF_ARGS: "--line-numbers --width 120 --expand-tabs=2" NFT_VER: "0.9.4" - NFT_WORKDIR: "${{ github.workspace }}/nf-test-work" + NFT_WORKDIR: "/tmp/nft-test" + NXF_WORK: "/tmp/nxf-work" NXF_ANSI_LOG: false NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity + NXF_CONDA_CACHEDIR: "/tmp/conda" concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" From 2eb2d012a305728a2716a00335e5cb136d697406 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Tue, 3 Mar 2026 17:28:17 +0100 Subject: [PATCH 11/18] [RF] build native arm64 docker images --- .github/workflows/docker-image.yml | 113 +++++++++++++++++++++-------- 1 file changed, 83 insertions(+), 30 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7f623a2..3b84f65 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -7,17 +7,31 @@ on: type: [published] env: - TEST_TAG: dessimozlab/fastoma:test + REGISTRY_IMAGE: dessimozlab/fastoma jobs: build: - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + - platform: linux/arm64 + runner: ubuntu-24.04-arm + + runs-on: ${{ matrix.runner }} steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + - name: Checkout - uses: actions/checkout@v6.0.1 + uses: actions/checkout@v6 with: submodules: recursive @@ -26,8 +40,7 @@ jobs: uses: docker/metadata-action@v5 with: # list of Docker images to use as base name for tags - images: | - dessimozlab/fastoma + images: ${{ env.REGISTRY_IMAGE }} # generate Docker tags based on the following events/attributes tags: | type=schedule @@ -47,17 +60,47 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build and export to docker for testing + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build and push by digest only + id: build uses: docker/build-push-action@v6 with: context: . - load: true - tags: ${{ env.TEST_TAG }} + platforms: ${{ matrix.platform }} + tags: ${{ env.REGISTRY_IMAGE }} + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,push-by-digest=true,name-canonical=true,push=true - #- name: Test - # run: | - # docker run --rm -i -v $PWD/tests:/input -v $PWD/tests/:/reads -v $PWD/output:/out -v $PWD/run:/run ${{ env.TEST_TAG }} --tree --standalone_path /input/marker_genes --dna_reference /input/cds-marker_genes.fasta.gz --reads /reads/sample_1.fastq --output_path /out - # if [ ! -f output/tree_sample_1.nwk ] ; then exit 1; fi + - name: Export digest + run: | + mkdir -p ${{ runner.temp }}/digests + digest="${{ steps.build.outputs.digest }}" + touch "${{ runner.temp }}/digests/${digest#sha256:}" + + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: ${{ runner.temp }}/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: ${{ runner.temp }}/digests + pattern: digests-* + merge-multiple: true - name: Login to DockerHub uses: docker/login-action@v3 @@ -65,22 +108,32 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Set platforms - id: set_platforms - run: | - echo "github ref: ${GITHUB_REF}" - if [[ "${GITHUB_REF##*/}" == "main" || "${GITHUB_REF##*/}" == "dev" || "${GITHUB_REF}" == "refs/tags/"* ]]; then - echo "platforms=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT - else - echo "platforms=linux/amd64" >> $GITHUB_OUTPUT - fi - - - name: Build and push - uses: docker/build-push-action@v6 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 with: - context: . - platforms: ${{ steps.set_platforms.outputs.platforms }} - push: true - #${{ github.event_name != 'push' && github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + images: ${{ env.REGISTRY_IMAGE }} + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + labels: | + org.opencontainers.image.source=${{ github.repository }} + org.opencontainers.image.revision=${{ github.sha }} + + - name: Create manifest list and push + working-directory: ${{ runner.temp }}/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) + + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} \ No newline at end of file From 755149e90020639b5be31d457960aeb91a712388 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Wed, 4 Mar 2026 08:24:58 +0100 Subject: [PATCH 12/18] Describe profile 'large' in Readme --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f34b218..6a0c241 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,8 @@ For FastOMA, we've implemented the following profiles below. Additional ones can With `-profile docker` one can use docker as an execution platform. It requires docker to be installed on the system (see [here](https://docs.docker.com/engine/install/)). The pipeline will automatically fetch missing containers from dockerhub (e.g. dessimozlab/fastoma) if not found locally. By default, the version `latest` is used by the pipeline, however we provide images for any branch and release as well; even for every recent commit. -One can select the desired container via the `--container_version` argument +One can select the desired container via the `--container_version` argument. We provide containers for x86_64 (amd64) as well +as arm64 architectures. ``` nextflow run FastOMA.nf -profile docker \ @@ -197,7 +198,7 @@ nextflow run FastOMA.nf -profile docker \ This will use the container that is tagged with the current commit id. Similarly, one could also use `--container_version "0.5.1"` to use the container with version `dessimozlab/fastoma:0.5.1` from dockerhub. Check the latest version on the [DockerHub](https://hub.docker.com/r/dessimozlab/fastoma/tags). -### Singularity +### Singularity / Apptainer Since Docker needs administrator privileges (root access), [Singluarity](https://apptainer.org/index.html) (a.k.a Apptainer) is a good alternative. This can be installed using [Conda](https://anaconda.org/conda-forge/singularity) with `conda install conda-forge::singularity`. However, in most of the academic HPC cluster, singluarity is already installed and can be called with `module load`. With `-profile singularity` singularity containers will be used to run the workflow. It requires singularity to be installed on your system. The containers are automatically pulled from dockerhub and converted to singularity @@ -223,6 +224,13 @@ specify it with the `-c ` argument. The nf-core profiles s good overview of what is possible, together with the [nextflow documentation on executors](https://www.nextflow.io/docs/latest/executor.html). +### Large datasets +Another profile we provide is `-profile large` which is designed for large datasets. It sets much higher limits for the +maximum amount of memory a process can use (without specifying this profile, jobs will not try to request more than 32 GB +of RAM). + +All profiles can be combined, e.g. `-profile slurm,conda,large`. + # How to run FastOMA on the test data Note : If you are using FastOMA with Docker or other profiles, check out the difference [here](#using-different-nextflow-profiles). @@ -413,7 +421,9 @@ Let's save the planet together with ### Run on a cluster -For running on a SLURM cluster, you can add the slurm profile argument: `-profile slurm` to the command line. +For running on a SLURM cluster, you can add the slurm profile argument: `-profile slurm` to the command line. +We also recommend to use the singularity/apptainer container, which can be enabled by adding the `singularity` or `apptainer` profile: +`-profile slurm,singularity` or `-profile slurm,apptainer`. ``` # cd FastOMA/testdata From c39e16267100c940c44d8e111a640b86b62ce8f8 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Wed, 4 Mar 2026 08:55:59 +0100 Subject: [PATCH 13/18] update upload and download artifact action --- .github/workflows/docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3b84f65..e04d976 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -83,7 +83,7 @@ jobs: touch "${{ runner.temp }}/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: digests-${{ env.PLATFORM_PAIR }} path: ${{ runner.temp }}/digests/* @@ -96,7 +96,7 @@ jobs: - build steps: - name: Download digests - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: ${{ runner.temp }}/digests pattern: digests-* From d0e840107d468cd82ee944ed4d3ec0f87a999f0d Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Wed, 4 Mar 2026 10:14:01 +0100 Subject: [PATCH 14/18] build attestations for docker images --- .github/workflows/docker-image.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e04d976..1fa74e7 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,6 +6,10 @@ on: release: type: [published] +permissions: + contents: read + id-token: write + env: REGISTRY_IMAGE: dessimozlab/fastoma @@ -75,6 +79,8 @@ jobs: tags: ${{ env.REGISTRY_IMAGE }} labels: ${{ steps.meta.outputs.labels }} outputs: type=image,push-by-digest=true,name-canonical=true,push=true + provenance: mode=max + sbom: true - name: Export digest run: | From a6e02a14fbfa528f2985732c59df1c6c916b6f3b Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Wed, 4 Mar 2026 10:14:39 +0100 Subject: [PATCH 15/18] update description page on dockerhub with latest README --- .github/workflows/docker-image.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 1fa74e7..21c264b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -142,4 +142,21 @@ jobs: - name: Inspect image run: | - docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} \ No newline at end of file + docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }} + + publish-doc: + runs-on: ubuntu-latest + needs: + - merge + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Update repo description + uses: peter-evans/dockerhub-description@v5 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + repository: ${{ env.REGISTRY_IMAGE }} + readme-filepath: ./README.md \ No newline at end of file From 629d6b06a1e12c7890b0cdf486911999d0a07244 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Wed, 4 Mar 2026 10:22:26 +0100 Subject: [PATCH 16/18] removes nextflow_slurm.config (legacy) use -profile slurm,large instead --- nextflow_slurm.config | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 nextflow_slurm.config diff --git a/nextflow_slurm.config b/nextflow_slurm.config deleted file mode 100644 index 3c89558..0000000 --- a/nextflow_slurm.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - -process.executor = "slurm" -process.queue = "cpu" -process.time = 10.h -process.memory = 95.GB -executor { - name = 'slurm' - queueSize = 550 -} - -errorStrategy = { task.exitStatus in [1,143,137,104,134,139] ? 'retry' : 'terminate' } - From fb4e21ffbfbc43d2aa161872906784e1975772d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Feb 2026 13:58:26 +0000 Subject: [PATCH 17/18] Initial plan From 45c0ab735e1c0469d3807c0ee707818ad4d1c664 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Feb 2026 14:03:32 +0000 Subject: [PATCH 18/18] Bump GitHub Actions dependencies from open dependabot PRs (#84-#88) Co-authored-by: alpae <1444726+alpae@users.noreply.github.com> --- .github/workflows/docker-image.yml | 2 +- .github/workflows/nf-test.yml | 8 ++++---- .github/workflows/publish-pypi-release.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 21c264b..eb9c25d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -159,4 +159,4 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} repository: ${{ env.REGISTRY_IMAGE }} - readme-filepath: ./README.md \ No newline at end of file + readme-filepath: ./README.md diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index e6a9bdb..b8aed89 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -42,7 +42,7 @@ jobs: steps: - name: Check out pipeline code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4 + uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v4 with: fetch-depth: 0 @@ -50,7 +50,7 @@ jobs: with: python-version: "3.11" - - uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v4 + - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v4 with: distribution: "temurin" java-version: "17" @@ -80,7 +80,7 @@ jobs: - name: Set up miniconda if: matrix.profile == 'conda' - uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3 + uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3 with: miniconda-version: "latest" auto-update-conda: true @@ -145,7 +145,7 @@ jobs: - name: Upload test results if: always() # run even if tests fail - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: nf-test-results-${{ matrix.filter }}-${{ matrix.profile }}-${{ matrix.NXF_VER }}-${{ matrix.shard }} path: | diff --git a/.github/workflows/publish-pypi-release.yml b/.github/workflows/publish-pypi-release.yml index f37c2d2..94ac542 100644 --- a/.github/workflows/publish-pypi-release.yml +++ b/.github/workflows/publish-pypi-release.yml @@ -14,9 +14,9 @@ jobs: id-token: write steps: - - uses: actions/checkout@v6.0.1 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v6.1.0 + uses: actions/setup-python@v6 with: python-version: '3.x' - name: Install dependencies