sund 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sund-2.0.0/LICENSE.md +65 -0
- sund-2.0.0/MANIFEST.in +110 -0
- sund-2.0.0/PKG-INFO +131 -0
- sund-2.0.0/README.md +103 -0
- sund-2.0.0/pyproject.toml +161 -0
- sund-2.0.0/setup.cfg +4 -0
- sund-2.0.0/setup.py +220 -0
- sund-2.0.0/src/_core/ExtraFormulas/mathaddon.cpp +97 -0
- sund-2.0.0/src/_core/ExtraFormulas/mathaddon.h +38 -0
- sund-2.0.0/src/_core/_Activity/Activity.cpp +1875 -0
- sund-2.0.0/src/_core/_Activity/Activity.h +177 -0
- sund-2.0.0/src/_core/_Activity/Activity_API.h +109 -0
- sund-2.0.0/src/_core/_Activity/pysplineaddon.h +386 -0
- sund-2.0.0/src/_core/_Models/Models.cpp +839 -0
- sund-2.0.0/src/_core/_Models/Models.h +235 -0
- sund-2.0.0/src/_core/_Models/Models_C_API.h +172 -0
- sund-2.0.0/src/_core/_Models/Models_M_API.h +44 -0
- sund-2.0.0/src/_core/_Models/model_structure.h +70 -0
- sund-2.0.0/src/_core/_Simulation/_Simulation.cpp +2651 -0
- sund-2.0.0/src/_core/_Simulation/_Simulation.h +404 -0
- sund-2.0.0/src/_core/_StringList/_StringList.cpp +350 -0
- sund-2.0.0/src/_core/_StringList/_StringList.h +103 -0
- sund-2.0.0/src/_core/_StringList/_StringList_C_API.h +44 -0
- sund-2.0.0/src/_core/_StringList/_StringList_C_API_defines.h +27 -0
- sund-2.0.0/src/_core/_debug/debug.cpp +71 -0
- sund-2.0.0/src/_core/_debug/debug.h +28 -0
- sund-2.0.0/src/_core/include/pyarraymacros.h +6 -0
- sund-2.0.0/src/_core/include/sundials/sundials_config.h +160 -0
- sund-2.0.0/src/_core/include/sundials/sundials_export.h +47 -0
- sund-2.0.0/src/_core/include/timescales.h +14 -0
- sund-2.0.0/src/_core/sund_sundials/sund_cvode.cpp +483 -0
- sund-2.0.0/src/_core/sund_sundials/sund_ida.cpp +486 -0
- sund-2.0.0/src/_core/sund_sundials/sund_sundials_flags.h +11 -0
- sund-2.0.0/src/_core/sund_sundials/sund_sundials_interface.h +66 -0
- sund-2.0.0/src/sund/__init__.py +486 -0
- sund-2.0.0/src/sund/_model_deps/_include/Models_M_API.h +44 -0
- sund-2.0.0/src/sund/_model_deps/_include/mathaddon.h +38 -0
- sund-2.0.0/src/sund/_model_deps/_include/model_structure.h +70 -0
- sund-2.0.0/src/sund/_model_deps/_include/pyarraymacros.h +6 -0
- sund-2.0.0/src/sund/_model_deps/_include/sund_sundials_flags.h +11 -0
- sund-2.0.0/src/sund/_model_deps/_include/timescales.h +14 -0
- sund-2.0.0/src/sund/_model_deps/_src/mathaddon.cpp +97 -0
- sund-2.0.0/src/sund/model_validation.py +884 -0
- sund-2.0.0/src/sund/tools.py +1296 -0
- sund-2.0.0/src/sund/uninstall_helper.py +38 -0
- sund-2.0.0/src/sund/utils.py +162 -0
- sund-2.0.0/src/sund.egg-info/PKG-INFO +131 -0
- sund-2.0.0/src/sund.egg-info/SOURCES.txt +185 -0
- sund-2.0.0/src/sund.egg-info/dependency_links.txt +1 -0
- sund-2.0.0/src/sund.egg-info/entry_points.txt +2 -0
- sund-2.0.0/src/sund.egg-info/requires.txt +2 -0
- sund-2.0.0/src/sund.egg-info/top_level.txt +1 -0
- sund-2.0.0/src/third_party/sundials/include/cvode/cvode.h +248 -0
- sund-2.0.0/src/third_party/sundials/include/cvode/cvode_bandpre.h +45 -0
- sund-2.0.0/src/third_party/sundials/include/cvode/cvode_bbdpre.h +63 -0
- sund-2.0.0/src/third_party/sundials/include/cvode/cvode_diag.h +60 -0
- sund-2.0.0/src/third_party/sundials/include/cvode/cvode_ls.h +130 -0
- sund-2.0.0/src/third_party/sundials/include/cvode/cvode_proj.h +57 -0
- sund-2.0.0/src/third_party/sundials/include/ida/ida.h +238 -0
- sund-2.0.0/src/third_party/sundials/include/ida/ida_bbdpre.h +62 -0
- sund-2.0.0/src/third_party/sundials/include/ida/ida_ls.h +120 -0
- sund-2.0.0/src/third_party/sundials/include/nvector/nvector_serial.h +289 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/priv/sundials_context_impl.h +45 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/priv/sundials_errors_impl.h +559 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/priv/sundials_mpi_errors_impl.h +137 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_adaptcontroller.h +191 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_adjointcheckpointscheme.h +121 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_adjointstepper.h +81 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_band.h +194 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_context.h +66 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_core.h +41 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_dense.h +234 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_direct.h +366 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_errors.h +130 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_futils.h +40 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_iterative.h +474 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_linearsolver.h +233 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_logger.h +74 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_math.h +318 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_matrix.h +161 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_memory.h +181 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_mpi_errors.h +31 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_mpi_types.h +38 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_nonlinearsolver.h +199 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_nvector.h +350 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_nvector_senswrapper.h +106 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_profiler.h +101 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_stepper.h +171 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_types.h +271 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_types_deprecated.h +72 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_version.h +41 -0
- sund-2.0.0/src/third_party/sundials/include/sundials/sundials_xbraid.h +122 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_band.h +88 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_cusolversp_batchqr.h +107 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_dense.h +93 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_klu.h +148 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_lapackband.h +73 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_lapackdense.h +73 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_magmadense.h +83 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_onemkldense.h +89 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_pcg.h +136 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_spbcgs.h +116 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_spfgmr.h +126 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_spgmr.h +125 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_sptfqmr.h +118 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_superludist.h +129 -0
- sund-2.0.0/src/third_party/sundials/include/sunlinsol/sunlinsol_superlumt.h +118 -0
- sund-2.0.0/src/third_party/sundials/include/sunmatrix/sunmatrix_band.h +135 -0
- sund-2.0.0/src/third_party/sundials/include/sunmatrix/sunmatrix_cusparse.h +142 -0
- sund-2.0.0/src/third_party/sundials/include/sunmatrix/sunmatrix_dense.h +113 -0
- sund-2.0.0/src/third_party/sundials/include/sunmatrix/sunmatrix_magmadense.h +131 -0
- sund-2.0.0/src/third_party/sundials/include/sunmatrix/sunmatrix_onemkldense.h +176 -0
- sund-2.0.0/src/third_party/sundials/include/sunmatrix/sunmatrix_slunrloc.h +87 -0
- sund-2.0.0/src/third_party/sundials/include/sunmatrix/sunmatrix_sparse.h +190 -0
- sund-2.0.0/src/third_party/sundials/include/sunnonlinsol/sunnonlinsol_fixedpoint.h +134 -0
- sund-2.0.0/src/third_party/sundials/include/sunnonlinsol/sunnonlinsol_newton.h +126 -0
- sund-2.0.0/src/third_party/sundials/include/sunnonlinsol/sunnonlinsol_petscsnes.h +110 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode.c +4913 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_bandpre.c +593 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_bandpre_impl.h +78 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_bbdpre.c +741 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_bbdpre_impl.h +87 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_diag.c +477 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_diag_impl.h +69 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_fused_stubs.c +158 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_impl.h +790 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_io.c +1765 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_ls.c +1947 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_ls_impl.h +198 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_nls.c +423 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_proj.c +453 -0
- sund-2.0.0/src/third_party/sundials/src/cvode/cvode_proj_impl.h +75 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida.c +4025 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida_bbdpre.c +709 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida_bbdpre_impl.h +92 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida_ic.c +735 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida_impl.h +588 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida_io.c +1524 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida_ls.c +1783 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida_ls_impl.h +193 -0
- sund-2.0.0/src/third_party/sundials/src/ida/ida_nls.c +362 -0
- sund-2.0.0/src/third_party/sundials/src/nvector/serial/nvector_serial.c +2050 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/stl/sunstl_vector.h +293 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundatanode/sundatanode_inmem.h +113 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_adiak_metadata.h +149 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_adjointcheckpointscheme_impl.h +40 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_adjointstepper_impl.h +36 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_band.c +273 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_context.c +299 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_cuda.h +79 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_cusolver.h +66 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_cusparse.h +65 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_datanode.h +153 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_debug.h +51 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_dense.c +412 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_direct.c +351 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_errors.c +126 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_hashmap.c +492 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_hashmap_impl.h +84 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_hip.h +74 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_iterative.c +675 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_iterative_impl.h +40 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_linearsolver.c +257 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_logger.c +491 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_logger_impl.h +186 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_macros.h +39 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_math.c +92 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_matrix.c +247 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_nonlinearsolver.c +246 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_nvector.c +1119 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_nvector_senswrapper.c +564 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_stepper_impl.h +57 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_sycl.h +81 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_utils.h +138 -0
- sund-2.0.0/src/third_party/sundials/src/sundials/sundials_version.c +61 -0
- sund-2.0.0/src/third_party/sundials/src/sunlinsol/band/sunlinsol_band.c +229 -0
- sund-2.0.0/src/third_party/sundials/src/sunlinsol/dense/sunlinsol_dense.c +222 -0
- sund-2.0.0/src/third_party/sundials/src/sunlinsol/pcg/sunlinsol_pcg.c +610 -0
- sund-2.0.0/src/third_party/sundials/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c +883 -0
- sund-2.0.0/src/third_party/sundials/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c +840 -0
- sund-2.0.0/src/third_party/sundials/src/sunlinsol/spgmr/sunlinsol_spgmr.c +926 -0
- sund-2.0.0/src/third_party/sundials/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c +1133 -0
- sund-2.0.0/src/third_party/sundials/src/sunmatrix/band/sunmatrix_band.c +536 -0
- sund-2.0.0/src/third_party/sundials/src/sunmatrix/dense/sunmatrix_dense.c +410 -0
- sund-2.0.0/src/third_party/sundials/src/sunmatrix/sparse/sunmatrix_sparse.c +1246 -0
- sund-2.0.0/src/third_party/sundials/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c +741 -0
- sund-2.0.0/src/third_party/sundials/src/sunnonlinsol/newton/sunnonlinsol_newton.c +440 -0
sund-2.0.0/LICENSE.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Licenses
|
|
2
|
+
|
|
3
|
+
The SUND package is distributed under the MIT License.
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2025 The SUND toolbox developers.
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
|
24
|
+
|
|
25
|
+
This package includes code provided under permissive licenses.
|
|
26
|
+
|
|
27
|
+
## The SUNDIALS package
|
|
28
|
+
|
|
29
|
+
SUNDIALS, written by the Lawrence Livermore National Security and Southern Methodist University, is included as a library in this project. SUNDIALS is available at: https://computing.llnl.gov/projects/sundials
|
|
30
|
+
|
|
31
|
+
## Licenses for included libraries
|
|
32
|
+
<details><summary>SUNDIALS</summary>
|
|
33
|
+
|
|
34
|
+
Full license available in src/sund/third_party/sundials/LICENSE
|
|
35
|
+
|
|
36
|
+
BSD 3-Clause License
|
|
37
|
+
|
|
38
|
+
Copyright (c) 2002-2024, Lawrence Livermore National Security and Southern Methodist University.
|
|
39
|
+
All rights reserved.
|
|
40
|
+
|
|
41
|
+
Redistribution and use in source and binary forms, with or without
|
|
42
|
+
modification, are permitted provided that the following conditions are met:
|
|
43
|
+
|
|
44
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
45
|
+
list of conditions and the following disclaimer.
|
|
46
|
+
|
|
47
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
48
|
+
this list of conditions and the following disclaimer in the documentation
|
|
49
|
+
and/or other materials provided with the distribution.
|
|
50
|
+
|
|
51
|
+
* Neither the name of the copyright holder nor the names of its
|
|
52
|
+
contributors may be used to endorse or promote products derived from
|
|
53
|
+
this software without specific prior written permission.
|
|
54
|
+
|
|
55
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
56
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
57
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
58
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
59
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
60
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
61
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
62
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
63
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
64
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
65
|
+
</details>
|
sund-2.0.0/MANIFEST.in
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Include project metadata
|
|
2
|
+
include pyproject.toml
|
|
3
|
+
include README.md
|
|
4
|
+
include LICENSE.md
|
|
5
|
+
|
|
6
|
+
# Exclude stuff not needed by end users
|
|
7
|
+
prune docs
|
|
8
|
+
prune overrides
|
|
9
|
+
prune tests
|
|
10
|
+
prune dist
|
|
11
|
+
global-exclude .gitlab-ci.yml
|
|
12
|
+
exclude .gitmodules
|
|
13
|
+
exclude pytest.ini
|
|
14
|
+
exclude mkdocs.yml
|
|
15
|
+
exclude .mike.json
|
|
16
|
+
exclude tox.ini
|
|
17
|
+
exclude Dockerfile
|
|
18
|
+
exclude uv.lock
|
|
19
|
+
|
|
20
|
+
# Include all C/C++ source files and headers
|
|
21
|
+
recursive-include src/_core/_Activity *.cpp *.h
|
|
22
|
+
recursive-include src/_core/_debug *.cpp *.h
|
|
23
|
+
recursive-include src/_core/_Models *.cpp *.h
|
|
24
|
+
recursive-include src/_core/_Simulation *.cpp *.h
|
|
25
|
+
recursive-include src/_core/_StringList *.cpp *.h
|
|
26
|
+
recursive-include src/_core/ExtraFormulas *
|
|
27
|
+
recursive-include src/_core/include *.h
|
|
28
|
+
recursive-include src/_core/sund_sundials *.cpp *.h
|
|
29
|
+
|
|
30
|
+
recursive-include src/sund/_model_deps *.h *.cpp *.c
|
|
31
|
+
|
|
32
|
+
# Include Sundials source code, but first remove the
|
|
33
|
+
#prune src/third_party/sundials
|
|
34
|
+
|
|
35
|
+
# Include Sundials headers
|
|
36
|
+
recursive-include src/third_party/sundials/include/cvode *.h
|
|
37
|
+
recursive-include src/third_party/sundials/include/ida *.h
|
|
38
|
+
recursive-include src/third_party/sundials/include/sundials *.h
|
|
39
|
+
recursive-include src/third_party/sundials/include/sunlinsol *.h
|
|
40
|
+
recursive-include src/third_party/sundials/include/sunmatrix *.h
|
|
41
|
+
recursive-include src/third_party/sundials/include/sunnonlinsol *.h
|
|
42
|
+
include src/third_party/sundials/include/nvector/nvector_serial.h
|
|
43
|
+
|
|
44
|
+
# Include Sundials source files
|
|
45
|
+
# CVODE files
|
|
46
|
+
include src/third_party/sundials/src/cvode/cvode.c
|
|
47
|
+
include src/third_party/sundials/src/cvode/cvode_bandpre.c
|
|
48
|
+
include src/third_party/sundials/src/cvode/cvode_bbdpre.c
|
|
49
|
+
include src/third_party/sundials/src/cvode/cvode_diag.c
|
|
50
|
+
include src/third_party/sundials/src/cvode/cvode_fused_stubs.c
|
|
51
|
+
include src/third_party/sundials/src/cvode/cvode_io.c
|
|
52
|
+
include src/third_party/sundials/src/cvode/cvode_ls.c
|
|
53
|
+
include src/third_party/sundials/src/cvode/cvode_nls.c
|
|
54
|
+
include src/third_party/sundials/src/cvode/cvode_proj.c
|
|
55
|
+
recursive-include src/third_party/sundials/src/cvode *.h
|
|
56
|
+
|
|
57
|
+
# IDA files
|
|
58
|
+
include src/third_party/sundials/src/ida/ida.c
|
|
59
|
+
include src/third_party/sundials/src/ida/ida_bbdpre.c
|
|
60
|
+
include src/third_party/sundials/src/ida/ida_ic.c
|
|
61
|
+
include src/third_party/sundials/src/ida/ida_io.c
|
|
62
|
+
include src/third_party/sundials/src/ida/ida_ls.c
|
|
63
|
+
include src/third_party/sundials/src/ida/ida_nls.c
|
|
64
|
+
recursive-include src/third_party/sundials/src/ida *.h
|
|
65
|
+
|
|
66
|
+
# NVECTOR files
|
|
67
|
+
include src/third_party/sundials/src/nvector/serial/nvector_serial.c
|
|
68
|
+
|
|
69
|
+
# SUNDIALS core files
|
|
70
|
+
include src/third_party/sundials/src/sundials/sundials_band.c
|
|
71
|
+
include src/third_party/sundials/src/sundials/sundials_context.c
|
|
72
|
+
include src/third_party/sundials/src/sundials/sundials_dense.c
|
|
73
|
+
include src/third_party/sundials/src/sundials/sundials_direct.c
|
|
74
|
+
include src/third_party/sundials/src/sundials/sundials_errors.c
|
|
75
|
+
include src/third_party/sundials/src/sundials/sundials_hashmap.c
|
|
76
|
+
include src/third_party/sundials/src/sundials/sundials_iterative.c
|
|
77
|
+
include src/third_party/sundials/src/sundials/sundials_linearsolver.c
|
|
78
|
+
include src/third_party/sundials/src/sundials/sundials_logger.c
|
|
79
|
+
include src/third_party/sundials/src/sundials/sundials_math.c
|
|
80
|
+
include src/third_party/sundials/src/sundials/sundials_matrix.c
|
|
81
|
+
include src/third_party/sundials/src/sundials/sundials_nonlinearsolver.c
|
|
82
|
+
include src/third_party/sundials/src/sundials/sundials_nvector.c
|
|
83
|
+
include src/third_party/sundials/src/sundials/sundials_nvector_senswrapper.c
|
|
84
|
+
include src/third_party/sundials/src/sundials/sundials_version.c
|
|
85
|
+
recursive-include src/third_party/sundials/src/sundials *.h
|
|
86
|
+
|
|
87
|
+
# SUNLINSOL files
|
|
88
|
+
include src/third_party/sundials/src/sunlinsol/band/sunlinsol_band.c
|
|
89
|
+
include src/third_party/sundials/src/sunlinsol/dense/sunlinsol_dense.c
|
|
90
|
+
include src/third_party/sundials/src/sunlinsol/pcg/sunlinsol_pcg.c
|
|
91
|
+
include src/third_party/sundials/src/sunlinsol/spbcgs/sunlinsol_spbcgs.c
|
|
92
|
+
include src/third_party/sundials/src/sunlinsol/spfgmr/sunlinsol_spfgmr.c
|
|
93
|
+
include src/third_party/sundials/src/sunlinsol/spgmr/sunlinsol_spgmr.c
|
|
94
|
+
include src/third_party/sundials/src/sunlinsol/sptfqmr/sunlinsol_sptfqmr.c
|
|
95
|
+
recursive-include src/third_party/sundials/src/sunlinsol *.h
|
|
96
|
+
|
|
97
|
+
# SUNMATRIX files
|
|
98
|
+
include src/third_party/sundials/src/sunmatrix/band/sunmatrix_band.c
|
|
99
|
+
include src/third_party/sundials/src/sunmatrix/dense/sunmatrix_dense.c
|
|
100
|
+
include src/third_party/sundials/src/sunmatrix/sparse/sunmatrix_sparse.c
|
|
101
|
+
recursive-include src/third_party/sundials/src/sunmatrix *.h
|
|
102
|
+
|
|
103
|
+
# SUNNONLINSOL files
|
|
104
|
+
include src/third_party/sundials/src/sunnonlinsol/newton/sunnonlinsol_newton.c
|
|
105
|
+
include src/third_party/sundials/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c
|
|
106
|
+
recursive-include src/third_party/sundials/src/sunnonlinsol *.h
|
|
107
|
+
|
|
108
|
+
# Housekeeping
|
|
109
|
+
exclude .gitignore
|
|
110
|
+
global-exclude *.py[cod] __pycache__ *.so *.dylib *.dll *.DS_Store
|
sund-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sund
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: A simulation toolbox for ODE and DAE systems, with focus on systems biology applications.
|
|
5
|
+
Author: ISB group @ Linköping University, Sasan Keshmiri, Gustav Magnusson
|
|
6
|
+
Author-email: William Lövfors <william.lovfors@liu.se>, Henrik Podéus <henrik.podeus.derelov@liu.se>
|
|
7
|
+
Maintainer-email: William Lövfors <william.lovfors@liu.se>, Henrik Podéus <henrik.podeus.derelov@liu.se>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Project-URL: Homepage, https://isbgroup.eu/sund-toolbox
|
|
10
|
+
Project-URL: Repository, https://gitlab.liu.se/ISBgroup/projects/sund
|
|
11
|
+
Keywords: sund,simulation,ODE,DAE,modeling,toolbox,systems biology
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Intended Audience :: Science/Research
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE.md
|
|
25
|
+
Requires-Dist: numpy>=2.0
|
|
26
|
+
Requires-Dist: setuptools>=80.0
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# SUND toolbox
|
|
30
|
+
|
|
31
|
+
<img src="./logo/SUND_logo.png"
|
|
32
|
+
alt="SUND logo"
|
|
33
|
+
style="max-height:300px;width:100%;width:auto;display:block;margin:0 auto 1rem;" />
|
|
34
|
+
|
|
35
|
+
SUND (Simulation Using Nonlinear Dynamic models) is a Python package for high‑level, object‑oriented modeling and fast simulation of ODE/DAE systems with complex time‑dependent inputs and hierarchical model structures. Models compile against a SUNDIALS backend for performance and can be seamlessly connected by declaring inputs and outputs.
|
|
36
|
+
|
|
37
|
+
Supported Python: 3.10–3.14 on Linux (x86_64), Windows (x86_64) and macOS (Intel & ARM).
|
|
38
|
+
|
|
39
|
+
## Requirements
|
|
40
|
+
|
|
41
|
+
A C++ compiler (GCC, Clang, or MSVC) is required to install SUND and to compile models for efficient simulations. Pre-built wheels are not provided, as model compilation is performed locally. Ensure your system has a working C++ compiler before installing.
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
From PyPI (recommended once published) or local source:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install sund # or: uv add sund
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Not on PyPI yet?
|
|
52
|
+
|
|
53
|
+
While the project is pending publication on PyPI you can install directly from the release archives hosted at:
|
|
54
|
+
|
|
55
|
+
<https://isbgroup.eu/sund-toolbox/releases/>
|
|
56
|
+
|
|
57
|
+
Latest build:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pip install https://isbgroup.eu/sund-toolbox/releases/sund-latest.tar.gz
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Specific version (example):
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install https://isbgroup.eu/sund-toolbox/releases/sund-2.0.0.tar.gz
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Install from a built local source distribution (after `uv build --sdist`):
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install dist/sund-<version>.tar.gz
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Quick start
|
|
76
|
+
|
|
77
|
+
Create, install and simulate a trivial model:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
import sund
|
|
81
|
+
|
|
82
|
+
# 1. Generate a template model file
|
|
83
|
+
sund.save_model_template("example_model.txt", model_name="Example")
|
|
84
|
+
|
|
85
|
+
# 2. Install (compiles → C extension module under sund/models)
|
|
86
|
+
sund.install_model("example_model.txt")
|
|
87
|
+
|
|
88
|
+
# 3. Load an instance
|
|
89
|
+
model = sund.load_model("Example")
|
|
90
|
+
|
|
91
|
+
# 4. Simulate (time vector in model time unit; default from template is 's')
|
|
92
|
+
sim = sund.Simulation(models=[model], time_vector=[0, 1, 2, 3], time_unit=model.time_unit)
|
|
93
|
+
sim.simulate()
|
|
94
|
+
|
|
95
|
+
print(sim.feature_values) # numpy array of outputs/features
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
See the docs for activities (time‑varying inputs), multiple models, events, validation.
|
|
99
|
+
|
|
100
|
+
## Documentation
|
|
101
|
+
|
|
102
|
+
Full user & API docs: <https://isbgroup.eu/sund-toolbox> (versioned; latest alias always points to newest release).
|
|
103
|
+
|
|
104
|
+
## Model validation (optional)
|
|
105
|
+
|
|
106
|
+
Validate a model file or content before installing:
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
import sund
|
|
110
|
+
results = sund.validate_model_file("example_model.txt", verbose=True)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Development
|
|
114
|
+
|
|
115
|
+
Developer & maintainer details (architecture, CI publishing, docs versioning, release steps) live in `DEVELOPMENT.md`.
|
|
116
|
+
|
|
117
|
+
## History
|
|
118
|
+
|
|
119
|
+
Origins, milestones, and design context: see `docs/history.md` (versioned site History page).
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
MIT License (see `LICENSE.md`). Includes bundled SUNDIALS (BSD 3‑Clause) – see license file for details.
|
|
124
|
+
|
|
125
|
+
## Citation
|
|
126
|
+
|
|
127
|
+
If you use SUND in academic work, please cite the project (formal citation text will be added once available).
|
|
128
|
+
|
|
129
|
+
## Getting help
|
|
130
|
+
|
|
131
|
+
Open an issue or start a discussion on the project GitLab. Bug reports with a minimal reproducer and model snippet are appreciated.
|
sund-2.0.0/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# SUND toolbox
|
|
2
|
+
|
|
3
|
+
<img src="./logo/SUND_logo.png"
|
|
4
|
+
alt="SUND logo"
|
|
5
|
+
style="max-height:300px;width:100%;width:auto;display:block;margin:0 auto 1rem;" />
|
|
6
|
+
|
|
7
|
+
SUND (Simulation Using Nonlinear Dynamic models) is a Python package for high‑level, object‑oriented modeling and fast simulation of ODE/DAE systems with complex time‑dependent inputs and hierarchical model structures. Models compile against a SUNDIALS backend for performance and can be seamlessly connected by declaring inputs and outputs.
|
|
8
|
+
|
|
9
|
+
Supported Python: 3.10–3.14 on Linux (x86_64), Windows (x86_64) and macOS (Intel & ARM).
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
A C++ compiler (GCC, Clang, or MSVC) is required to install SUND and to compile models for efficient simulations. Pre-built wheels are not provided, as model compilation is performed locally. Ensure your system has a working C++ compiler before installing.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
From PyPI (recommended once published) or local source:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install sund # or: uv add sund
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Not on PyPI yet?
|
|
24
|
+
|
|
25
|
+
While the project is pending publication on PyPI you can install directly from the release archives hosted at:
|
|
26
|
+
|
|
27
|
+
<https://isbgroup.eu/sund-toolbox/releases/>
|
|
28
|
+
|
|
29
|
+
Latest build:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install https://isbgroup.eu/sund-toolbox/releases/sund-latest.tar.gz
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Specific version (example):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install https://isbgroup.eu/sund-toolbox/releases/sund-2.0.0.tar.gz
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Install from a built local source distribution (after `uv build --sdist`):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install dist/sund-<version>.tar.gz
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Quick start
|
|
48
|
+
|
|
49
|
+
Create, install and simulate a trivial model:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import sund
|
|
53
|
+
|
|
54
|
+
# 1. Generate a template model file
|
|
55
|
+
sund.save_model_template("example_model.txt", model_name="Example")
|
|
56
|
+
|
|
57
|
+
# 2. Install (compiles → C extension module under sund/models)
|
|
58
|
+
sund.install_model("example_model.txt")
|
|
59
|
+
|
|
60
|
+
# 3. Load an instance
|
|
61
|
+
model = sund.load_model("Example")
|
|
62
|
+
|
|
63
|
+
# 4. Simulate (time vector in model time unit; default from template is 's')
|
|
64
|
+
sim = sund.Simulation(models=[model], time_vector=[0, 1, 2, 3], time_unit=model.time_unit)
|
|
65
|
+
sim.simulate()
|
|
66
|
+
|
|
67
|
+
print(sim.feature_values) # numpy array of outputs/features
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
See the docs for activities (time‑varying inputs), multiple models, events, validation.
|
|
71
|
+
|
|
72
|
+
## Documentation
|
|
73
|
+
|
|
74
|
+
Full user & API docs: <https://isbgroup.eu/sund-toolbox> (versioned; latest alias always points to newest release).
|
|
75
|
+
|
|
76
|
+
## Model validation (optional)
|
|
77
|
+
|
|
78
|
+
Validate a model file or content before installing:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
import sund
|
|
82
|
+
results = sund.validate_model_file("example_model.txt", verbose=True)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
Developer & maintainer details (architecture, CI publishing, docs versioning, release steps) live in `DEVELOPMENT.md`.
|
|
88
|
+
|
|
89
|
+
## History
|
|
90
|
+
|
|
91
|
+
Origins, milestones, and design context: see `docs/history.md` (versioned site History page).
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT License (see `LICENSE.md`). Includes bundled SUNDIALS (BSD 3‑Clause) – see license file for details.
|
|
96
|
+
|
|
97
|
+
## Citation
|
|
98
|
+
|
|
99
|
+
If you use SUND in academic work, please cite the project (formal citation text will be added once available).
|
|
100
|
+
|
|
101
|
+
## Getting help
|
|
102
|
+
|
|
103
|
+
Open an issue or start a discussion on the project GitLab. Bug reports with a minimal reproducer and model snippet are appreciated.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=42", "wheel", "numpy>=2.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sund"
|
|
7
|
+
version = "2.0.0"
|
|
8
|
+
description = "A simulation toolbox for ODE and DAE systems, with focus on systems biology applications."
|
|
9
|
+
authors = [
|
|
10
|
+
{name = "ISB group @ Linköping University"},
|
|
11
|
+
{ name = "William Lövfors", email = "william.lovfors@liu.se" },
|
|
12
|
+
{ name = "Henrik Podéus", email = "henrik.podeus.derelov@liu.se"},
|
|
13
|
+
{ name = "Sasan Keshmiri"},
|
|
14
|
+
{ name = "Gustav Magnusson"},
|
|
15
|
+
]
|
|
16
|
+
maintainers = [
|
|
17
|
+
{ name = "William Lövfors", email = "william.lovfors@liu.se" },
|
|
18
|
+
{ name = "Henrik Podéus", email = "henrik.podeus.derelov@liu.se"},
|
|
19
|
+
]
|
|
20
|
+
readme = "README.md"
|
|
21
|
+
requires-python = ">=3.10"
|
|
22
|
+
license = "MIT"
|
|
23
|
+
license-files = ["LICENSE.md"]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"numpy>=2.0",
|
|
26
|
+
"setuptools>=80.0",
|
|
27
|
+
]
|
|
28
|
+
keywords = ["sund", "simulation", "ODE", "DAE", "modeling", "toolbox", "systems biology"]
|
|
29
|
+
urls = { Homepage = "https://isbgroup.eu/sund-toolbox", Repository = "https://gitlab.liu.se/ISBgroup/projects/sund"}
|
|
30
|
+
classifiers = [
|
|
31
|
+
"Programming Language :: Python",
|
|
32
|
+
"Programming Language :: Python :: 3",
|
|
33
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
34
|
+
"Programming Language :: Python :: 3.10",
|
|
35
|
+
"Programming Language :: Python :: 3.11",
|
|
36
|
+
"Programming Language :: Python :: 3.12",
|
|
37
|
+
"Programming Language :: Python :: 3.13",
|
|
38
|
+
"Programming Language :: Python :: 3.14",
|
|
39
|
+
"Intended Audience :: Science/Research",
|
|
40
|
+
"Topic :: Scientific/Engineering",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[tool.setuptools]
|
|
44
|
+
packages = ["sund", "sund._model_deps", "sund._model_deps._include", "sund._model_deps._src"] # Setuptools note: For Python, any directory (with suitable naming) can be imported, even if it does not contain any `.py` files. On the other hand, currently there is no concept of package data directory, all directories are treated like packages.
|
|
45
|
+
package-dir = { "" = "src" }
|
|
46
|
+
include-package-data = true
|
|
47
|
+
|
|
48
|
+
[tool.setuptools.package-data]
|
|
49
|
+
"sund" = ["_model_deps/**/*"]
|
|
50
|
+
|
|
51
|
+
[project.scripts]
|
|
52
|
+
sund-cleanup = "sund.uninstall_helper:cleanup_package_generated_files"
|
|
53
|
+
|
|
54
|
+
[dependency-groups]
|
|
55
|
+
dev = [
|
|
56
|
+
"matplotlib>=3.9.4",
|
|
57
|
+
"mike>=2.1.3",
|
|
58
|
+
"mkdocs>=1.5.3",
|
|
59
|
+
"mkdocs-include-markdown-plugin>=4.0.4",
|
|
60
|
+
"mkdocs-jupyter>=0.25.1",
|
|
61
|
+
"mkdocs-material>=9.2.7",
|
|
62
|
+
"mkdocstrings[python]>=0.29.1",
|
|
63
|
+
"mkdocstrings-python>=1.1.2",
|
|
64
|
+
"pytest>=8.3.5",
|
|
65
|
+
"scipy>=1.13.1",
|
|
66
|
+
"tox-uv>=1.25.0",
|
|
67
|
+
"ruff>=0.11.11",
|
|
68
|
+
"sund",
|
|
69
|
+
"mkdocs-glightbox>=0.5.1",
|
|
70
|
+
"twine>=6.2.0",
|
|
71
|
+
"pre-commit>=4.3.0",
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
[tool.ruff]
|
|
75
|
+
lint.select = ["ALL"]
|
|
76
|
+
lint.ignore = [
|
|
77
|
+
"D", # pydocstyle – don't require docstrings yet
|
|
78
|
+
"ANN", # type annotations – skip for now
|
|
79
|
+
"PLR2004", # magic values in conditionals – too noisy
|
|
80
|
+
# "T201" # allow `print()` – useful for quick scripts
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
# Optional but recommended rule groups
|
|
84
|
+
lint.extend-select = [
|
|
85
|
+
"I", # isort – organizes imports
|
|
86
|
+
"F", # pyflakes – general error checking
|
|
87
|
+
"E", # pycodestyle – PEP8 enforcement
|
|
88
|
+
"B", # flake8-bugbear – common bug risks
|
|
89
|
+
"C4", # flake8-comprehensions – simplify comprehensions
|
|
90
|
+
"SIM", # flake8-simplify – cleaner Python
|
|
91
|
+
"PERF", # perflint – performance suggestions
|
|
92
|
+
]
|
|
93
|
+
exclude = [
|
|
94
|
+
"src/third_party", # Exclude third-party code
|
|
95
|
+
"tests/test_remove_comments.py"
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
# Ruff configuration
|
|
99
|
+
line-length = 100
|
|
100
|
+
target-version = "py314"
|
|
101
|
+
|
|
102
|
+
# Per-file ignore for test code
|
|
103
|
+
[tool.ruff.lint.per-file-ignores]
|
|
104
|
+
"tests/*" = [
|
|
105
|
+
"D", # pydocstyle – don't require docstrings in tests
|
|
106
|
+
"S101", # Allow `assert` in tests
|
|
107
|
+
"E501", # Disable line-length enforcement (we'll control this via formatter)
|
|
108
|
+
"T201", # Allow `print()` in tests
|
|
109
|
+
"PLR0913", # Allow many arguments in test functions
|
|
110
|
+
"C416", # Allow comprehensive list testing
|
|
111
|
+
"S301", # Allow pickling in tests
|
|
112
|
+
]
|
|
113
|
+
"docs/examples/*" = [
|
|
114
|
+
"T201", # Allow `print()` in examples
|
|
115
|
+
"ERA001", # Allow having comments in to explain the code (allows all commented lines)
|
|
116
|
+
"SIM108", # Allow block if-cases in examples
|
|
117
|
+
]
|
|
118
|
+
"src/sund" = [
|
|
119
|
+
"ERA001", # Allow having comments in the main code (allows all commented lines)
|
|
120
|
+
]
|
|
121
|
+
ignore = ["COM812"] # trailing comma formatting can conflict with Ruff's own formatter
|
|
122
|
+
|
|
123
|
+
# Ruff formatter (replaces Black)
|
|
124
|
+
[tool.ruff.format]
|
|
125
|
+
quote-style = "double"
|
|
126
|
+
indent-style = "space"
|
|
127
|
+
line-ending = "auto"
|
|
128
|
+
|
|
129
|
+
[tool.tox]
|
|
130
|
+
requires = ["tox>=4.19", "tox-uv>=1.25.0"] # load tox-uv in tox's own env
|
|
131
|
+
env_list = ["py310", "py311", "py312", "py313", "py314"]
|
|
132
|
+
isolated_build = true
|
|
133
|
+
skip_missing_interpreters = true
|
|
134
|
+
|
|
135
|
+
[tool.tox.env_run_base]
|
|
136
|
+
description = "Run test with pytest under {base_python}"
|
|
137
|
+
deps = ["pytest>=8.3.5"]
|
|
138
|
+
commands = [
|
|
139
|
+
["pytest", "-m", "uninstall"],
|
|
140
|
+
["pytest", "-m", "not performance and not uninstall"],
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
[tool.tox.env.py310]
|
|
144
|
+
base_python = ["python3.10"]
|
|
145
|
+
|
|
146
|
+
[tool.tox.env.py311]
|
|
147
|
+
base_python = ["python3.11"]
|
|
148
|
+
|
|
149
|
+
[tool.tox.env.py312]
|
|
150
|
+
base_python = ["python3.12"]
|
|
151
|
+
|
|
152
|
+
[tool.tox.env.py313]
|
|
153
|
+
base_python = ["python3.13"]
|
|
154
|
+
|
|
155
|
+
[tool.tox.env.py314]
|
|
156
|
+
base_python = ["python3.14"]
|
|
157
|
+
|
|
158
|
+
[tool.uv.sources]
|
|
159
|
+
sund = { workspace = true }
|
|
160
|
+
|
|
161
|
+
|
sund-2.0.0/setup.cfg
ADDED