Skip to content

fix rounding errors in Hill functions#183

Open
murrayrm wants to merge 1 commit intobiocircuits:masterfrom
murrayrm:propensity_fix-30Nov2025
Open

fix rounding errors in Hill functions#183
murrayrm wants to merge 1 commit intobiocircuits:masterfrom
murrayrm:propensity_fix-30Nov2025

Conversation

@murrayrm
Copy link
Contributor

This is a small change in the way propensity functions are handled to avoid errors where X ** n fails if X is a small negative number (like -1e-30). This occurs fairly frequently in BioSCRAPE simulations when a variable is initialized to zero (and apparently numerical errors cause it to go negative).

@murrayrm
Copy link
Contributor Author

The build that is failing seems to be unrelated to this PR. It looks like there is not an Arm-based wheel for libsbml under Python 3.8. I think this is due to GitHub switching to Arm-based MacOS workflows? Will look into it later.

@ananswam
Copy link
Contributor

ananswam commented Nov 30, 2025

Yeah, was just looking into this as well. They just switched to apple silicon for macos it seems. Is it okay to just drop macos python 3.8 (perhaps drop python 3.8 entirely)?

Alternatively, it looks like macos-15-intel in the matrix works for Intel. So, if you wanted, you could run on ARM and Intel macOS and just drop 3.8 from the ARM one as below.

More info here

    1 --- a/.github/workflows/deploy_bioscrape.yml
    2 +++ b/.github/workflows/deploy_bioscrape.yml
    3 @@ -8,4 +8,7 @@
    4        matrix:
    5          os: [windows-latest, ubuntu-latest, macos-latest] # maybe add macos-15-intel here
    6          python-version: ["3.8", "3.11", "3.12"]
    7 +        exclude:
    8 +          - os: macos-latest
    9 +            python-version: "3.8"
   10
   11      steps:

@murrayrm
Copy link
Contributor Author

Python 3.8 (and 3.9) is past end-of-life, so seems fine to drop it and just leave 3.11 and 3.12. We should probably eventually do 3.11 and 3.13 or 3.14 (most recent releases). I know there were some issues in BioCRNpyler with 3.13 and Numpy 2; not s ure about BioSCRAPE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants