PyDSTool

repository·master·Indexed 41 days ago

https://github.com/robclewley/pydstool

A simulation and analysis environment for dynamical systems models, including ODEs, DAEs, maps, and hybrid systems. It supports symbolic math, optimization, and bifurcation analysis for physical and biological systems.

Tokens
639
Snippets
4
Records
4
Agent score
2%

What's inside PyDSTool

  1. Run the PyDSTool test suite

    master

    To run the internal test suite, you must have pytest and mock installed. You can install them via pip or your system package manager, then execute the tests using setup.py.

    # Install testing dependencies
    sudo pip install py.test mock
    
    # Run tests
    python setup.py test
  2. Generate a coverage report for PyDSTool

    master

    To generate an HTML coverage report, install pytest-cov and run py.test with the appropriate coverage flags. The resulting report can be viewed by opening htmlcov/index.html in a web browser.

    # Install coverage tool
    sudo pip install pytest-cov
    
    # Run coverage
    py.test --cov PyDSTool --cov-report html --cov-config .coveragerc
  3. Run PyDSTool examples

    master

    Examples are located in the examples directory. Some examples require an external compiler (like gcc or gfortran). You can run all examples in the correct order using the run_all_tests.py script.

    If you do not have a working C/Fortran compiler, you may need to edit run_all_tests.py to disable external compiler tests.

    Note on Matplotlib errors: On some platforms, you might see a Fatal Python error: PyEval_RestoreThread: NULL tstate when the script attempts to close matplotlib windows. This error can be safely ignored; you may simply need to close the plot windows manually.

    cd examples
    python run_all_tests.py
  4. Install PyDSTool on Debian/Ubuntu

    master

    To install PyDSTool on Debian or Ubuntu systems, first install the required system dependencies including gfortran, swig, numpy, scipy, and matplotlib. Then, install the package using setup.py.

    Note: You can install for the local user only by running without sudo and adding the --user flag.

    # Install system dependencies
    sudo apt-get update
    sudo apt-get install -qq gfortran swig
    sudo apt-get install -qq python-numpy python-scipy python-matplotlib
    
    # Install PyDSTool
    sudo python setup.py install
    # OR for development mode
    sudo python setup.py develop
    # OR for local user only
    python setup.py install --user