Skip to main content

Python interface to goss - General ODE System Solver

Project description

GOSS - General ODE solver

goss is a C++ library for solver ordinary differential equations.

The general idea is that you define your ODE in a gotran ode file and hand the ode over to goss.

Documentation

Documentation is hosed at https://computationalphysiology.github.io/goss

Install

To work with goss from python, you only need to install the python package.

python -m pip install pygoss

Alternatively you can clone the repo, cd into it at execute

python -m pip install .

or use

python -m pip install -e .

for an editable install.

Testing

Python

The tests for the python code can be found in the folder tests and run with pytest. To run the tests, please install the test dependencies

python -m pip install ".[test]"

and run the tests with

python -m pytest

C++

The C++ source code for goss is found in the folder cpp. The C++ code also has a separate test suite that can be found in cpp/tests. To run the tests you need to first build goss with the BUILD_TESTS flag enabled

cmake -B build-cpp -S cpp -DBUILD_TESTS=ON
cmake --build build-cpp

and now you can run the tests

cd build-cpp
ctest

Structure

The bindings between python and C++ uses pybind11 and all the bindings are found in the file python/wrapper.cpp.

The python package is built using scikit-build which is a build system especially suited for python code with C++ extensions.

Contributing

Contributions are very welcomed. To contribute please fork the repo, create a branch a submit a pull request. Before the pull request can be accepted it has to pass the test suit for the python and C++ code. Also note that we try to enforce an consistent coding style. To ensure that you follow the coding style you can install the pre-commit hook in the repo

python -m pip install pre-commit
pre-commit install

For every future commit, you will now run a set of tests that will make sure that you follow the coding style.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygoss-0.1.2.tar.gz (180.8 kB view hashes)

Uploaded Source

Built Distributions

pygoss-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (805.2 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pygoss-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl (798.8 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pygoss-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (805.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pygoss-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl (798.9 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pygoss-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (805.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pygoss-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl (798.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pygoss-0.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (809.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

pygoss-0.1.2-cp37-cp37m-macosx_10_9_x86_64.whl (795.0 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page