sbmlmath

SBML MathML <-> SymPy

https://github.com/dweindl/sbmlmath

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.6%) to scientific vocabulary

Keywords

hacktoberfest mathml sbml sympy systems-biology
Last synced: 6 months ago · JSON representation ·

Repository

SBML MathML <-> SymPy

Basic Info
Statistics
  • Stars: 8
  • Watchers: 3
  • Forks: 0
  • Open Issues: 4
  • Releases: 8
Topics
hacktoberfest mathml sbml sympy systems-biology
Created almost 3 years ago · Last pushed 11 months ago
Metadata Files
Readme License Citation

README.md

sbmlmath — a Python library for handling SBML MathML

PyPI - Version DOI

sbmlmath is a Python library for interconverting SymPy expressions and SBML-MathML. SBML uses a subset of MathML that this library aims to support. This is not (intended to be) a general MathML parser.

Main functionality:

  • sympy -> SBML MathML
  • SBML MathML -> sympy
    • in particular for cases where sympy.sympify(libsbml.formulaToL3String(...)) won't do the job (mind, e.g., the differences in operator precedence between sympy/Python and libsbml L3 formulas!)
    • retaining unit annotations and other <ci> attributes

NOTE: This is under development and the API is to be considered unstable

Python support policy: sbmlmath follows NEP 29.

Usage

```python from sbmlmath import SBMLMathMLPrinter, SBMLMathMLParser import sympy as sp

sympyexpr = sp.sympify("A ** B + exp(C) * D") mathml = SBMLMathMLPrinter().doprint(sympyexpr) print(mathml)

cycledsympy = SBMLMathMLParser().parsestr(mathml) print(cycledsympy) assert sympyexpr == cycled_sympy ```

Documentation

Under construction at sbmlmath.readthedocs.io.

Installation

Releases from PyPI: bash pip install sbmlmath

The latest development version from GitHub: bash pip install git+https://github.com/dweindl/sbmlmath.git#egg=sbmlmath

Owner

  • Name: Daniel Weindl
  • Login: dweindl
  • Kind: user
  • Company: @ICB-DCM @ICBmunich

PostDoc at Helmholtz Munich ORCID 0000-0001-9963-6057

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: sbmlmath
type: software
authors:
  - given-names: Daniel
    family-names: Weindl
    email: sci@danielweindl.de
    orcid: 'https://orcid.org/0000-0001-9963-6057'
repository-code: 'https://github.com/dweindl/sbmlmath/'
url: 'https://sbmlmath.readthedocs.io/'
abstract: >-
  sbmlmath is a Python package for the interconversion of
  SBML MathML and sympy expressions.
keywords:
  - SBML
  - SymPy
  - math expressions
  - Python
license: BSD-3-Clause
doi: 10.5281/zenodo.14814669

GitHub Events

Total
  • Create event: 4
  • Release event: 2
  • Issues event: 8
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 3
  • Push event: 22
  • Pull request event: 3
  • Fork event: 1
Last Year
  • Create event: 4
  • Release event: 2
  • Issues event: 8
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 3
  • Push event: 22
  • Pull request event: 3
  • Fork event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 3,913 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 8
  • Total maintainers: 1
pypi.org: sbmlmath

SBML Math <-> SymPy

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 3,913 Last month
Rankings
Dependent packages count: 7.0%
Average: 18.7%
Dependent repos count: 30.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yaml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/deploy_release.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
  • lxml >=4.6.4
  • pint *
  • python-libsbml *
  • sympy *