Skip to content

Commit ef7f718

Browse files
authored
snake_case (#2969)
The previous mix of snake_case and camelCase was a mess. Convert everything to snake_case. Related to #887. Also includes: * some minor documentation fixes * replacement of public data members by corresponding getters and, where relevant, setters * swig ignores
1 parent 99605c9 commit ef7f718

File tree

179 files changed

+6612
-7041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+6612
-7041
lines changed

.github/workflows/test_benchmark_collection_models.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: |
5454
python3 -m pip uninstall -y petab && python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@main \
5555
&& python3 -m pip install -U sympy \
56-
&& python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git
56+
&& python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git@amici100
5757
5858
- name: Download benchmark collection
5959
run: |
@@ -129,7 +129,7 @@ jobs:
129129
run: |
130130
python3 -m pip uninstall -y petab && python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@main \
131131
&& python3 -m pip install -U sympy \
132-
&& python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git
132+
&& python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git@amici100
133133
134134
- run: pip uninstall -y diffrax && pip install git+https://github.com/patrick-kidger/diffrax@dev # TODO FIXME https://github.com/patrick-kidger/diffrax/issues/654 + event dirs
135135

.github/workflows/test_python_cplusplus.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: scripts/installAmiciSource.sh
5454

5555
- name: Check OpenMP support
56-
run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())"
56+
run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiled_with_openmp())"
5757

5858
- name: Python tests (part 1)
5959
run: |
@@ -273,7 +273,7 @@ jobs:
273273
run: scripts/installAmiciSource.sh
274274

275275
- name: Check OpenMP support
276-
run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())"
276+
run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiled_with_openmp())"
277277

278278
- name: cppcheck
279279
run: scripts/run-cppcheck.sh
@@ -333,7 +333,7 @@ jobs:
333333
scripts/installAmiciSource.sh
334334
335335
- name: Check OpenMP support
336-
run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiledWithOpenMP())"
336+
run: source venv/bin/activate && python -c "import amici; import sys; sys.exit(not amici.compiled_with_openmp())"
337337

338338
- name: Get BioNetGen
339339
run: scripts/buildBNGL.sh

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ See also our [versioning policy](https://amici.readthedocs.io/en/latest/versioni
3131
* `amici.petab.petab_import.import_model` has been removed.
3232
Use `amici.petab.petab_import.import_model_sbml` instead.
3333
(The former was just an alias for the latter.)
34+
* For a more consistent API, all function names are now snake_case instead of
35+
camelCase.
36+
* `Model.getSolver` has been renamed to `Model.create_solver`.
3437
* The following deprecated functionality has been removed:
3538
* The complete MATLAB interface has been removed.
3639
* `NonlinearSolverIteration::functional` has been removed,

doc/cpp_interface.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The former provides some functions for reading and writing
5656
All model-specific functions are defined in the namespace ``model_$modelname``.
5757

5858
The main function for running an AMICI simulation is
59-
:cpp:func:`amici::runAmiciSimulation`. This function requires
59+
:cpp:func:`amici::run_simulation`. This function requires
6060

6161
* an instance of a :cpp:class:`amici::Model` subclass as generated during model
6262
import. For the example `model_steadystate` the respective class is provided
@@ -65,7 +65,7 @@ The main function for running an AMICI simulation is
6565

6666
* a :cpp:class:`amici::Solver` instance. This solver instance needs to match
6767
the requirements of the model and can be obtained from
68-
:cpp:func:`amici::AbstractModel::getSolver`.
68+
:cpp:func:`amici::AbstractModel::create_solver`.
6969

7070
* optionally an :cpp:class:`amici::ExpData` instance, which contains any
7171
experimental data (e.g. measurements, noise model parameters or model inputs)
@@ -76,7 +76,7 @@ all simulation results.
7676

7777
For running simulations for multiple experimental conditions
7878
(multiple :cpp:class:`amici::ExpData` instances),
79-
:cpp:func:`amici::runAmiciSimulations`
79+
:cpp:func:`amici::run_simulations`
8080
provides an alternative entry point. If AMICI (and your application)
8181
have been compiled with OpenMP support (see installation guide), this allows
8282
for running those simulations in parallel.
@@ -97,7 +97,7 @@ model, which can be inconvenient in some cases.
9797

9898
When working with a single model, the ``wrapfunctions.h`` file generated during
9999
model import can be used to avoid specifying model names explicitly. It defines
100-
a function ``amici::generic_model::getModel()``, that returns an instance of
100+
a function ``amici::generic_model::get_model()``, that returns an instance of
101101
the model class by a generic name.
102102

103103
.. note::
@@ -121,7 +121,7 @@ and link the following libraries:
121121
* optionally HDF5 (C, HL, and CXX components)
122122
set CMake option ``ENABLE_HDF5`` to ``OFF`` to build without HDF5-support
123123
* optionally OpenMP (for parallel simulation of multiple conditions, see
124-
:cpp:func:`amici::runAmiciSimulations`)
124+
:cpp:func:`amici::run_simulations`)
125125
* optionally boost (only when using serialization of AMICI object)
126126

127127
The simplest and recommended way is using the provide CMake files which take

0 commit comments

Comments
 (0)