Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.11", "3.14"]
pymc-version: ["without", "'pymc>=5.0.0'"]
defaults:
run:
Expand All @@ -36,25 +36,24 @@ jobs:
- name: Test without PyMC
if: matrix.pymc-version == 'without'
run: |
pytest --cov=./murefi --cov-append --cov-report xml --cov-report term-missing murefi/tests.py
pytest -v --cov=./murefi --cov-append --cov-report xml --cov-report term-missing murefi/test_core.py
- name: Install and test with PyMC
if: matrix.pymc-version != 'without'
run: |
pip install ${{ matrix.pymc-version }}
pytest --cov=./murefi --cov-append --cov-report xml --cov-report term-missing murefi/tests.py
pytest -v --cov=./murefi --cov-append --cov-report xml --cov-report term-missing murefi/test_core.py
- name: Install and test with sunode
if: matrix.pymc-version != 'without'
run : |
mamba install "sunode>=0.5.0"
pytest --cov=./murefi --cov-append --cov-report xml --cov-report term-missing murefi/tests.py
pytest -v --cov=./murefi --cov-append --cov-report xml --cov-report term-missing murefi/test_core.py
- name: Upload coverage
uses: codecov/codecov-action@v5
if: matrix.python-version == 3.11
with:
file: ./coverage.xml
- name: Test Wheel install and import
run: |
python setup.py bdist_wheel
python -m build
cd dist
pip install murefi*.whl
python -c "import murefi; print(murefi.__version__)"
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
with:
environment-file: environment-dev.yml
create-args: >-
python=3.11
python=3.13
- name: Install dependencies
run: |
conda activate murefi-env
pip install -e .
- name: Test without PyMC
run: |
pytest --cov=./murefi --cov-append --cov-report xml --cov-report term-missing murefi/tests.py
pytest -v --cov=./murefi --cov-append --cov-report xml --cov-report term-missing murefi/test_core.py
- name: Build package
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Check version number match
run: |
echo "GITHUB_REF: ${GITHUB_REF}"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ murefi/examples/Sandbox.ipynb
*.h5
/docs/build*
/notebooks/*.png
dist/*
3 changes: 1 addition & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.12"

Expand All @@ -19,6 +19,5 @@ sphinx:
python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- method: pip
path: .
18 changes: 9 additions & 9 deletions environment-dev.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: murefi-env
channels:
- conda-forge
- conda-forge
dependencies:
- codecov
- flake8
- pytest
- pytest-cov
- twine
- wheel
- pip:
- -r requirements.txt
- codecov
- flake8
- pandas>=3.0.0
- pytest
- pytest-cov
- twine
- pip:
- build
21 changes: 20 additions & 1 deletion murefi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# murefi
# Copyright (C) 2019 Forschungszentrum Jülich GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# For more information contact the maintainers of https://github.com/JuBiotech.

import importlib.metadata

from . import objectives
from .core import ParameterMapping
from .datastructures import (
Expand All @@ -11,4 +30,4 @@
)
from .ode import BaseODEModel

__version__ = "5.3.0"
__version__ = importlib.metadata.version(__package__ or __name__)
2 changes: 1 addition & 1 deletion murefi/objectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def negative_loglikelihood_dataset(theta):
for (cm, observed_ts) in em_ts_list:
predicted_ts = predicted_replicate[cm.dependent_key]
ll = cm.loglikelihood(
y=observed_ts.y, x=predicted_ts.y, replicate_id=rid, dependent_key=cm.dependent_key
y=observed_ts.y, x=predicted_ts.y, name=f"{rid}.{cm.dependent_key}"
).sum()
L.append(ll)

Expand Down
File renamed without changes.
51 changes: 48 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,56 @@
# inspired by https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/

[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "murefi"
version = "5.3.0"
description = "Toolbox for multiple replicate fitting and Bayesian modeling."
readme = "README.md"
requires-python = ">=3.11"
license = "AGPL-3.0-or-later"
authors = [
{name = "Michael Osthege", email = "m.osthege@fz-juelich.de"},
{name = "Laura Helleckes", email = "l.helleckes@fz-juelich.de"},
]
classifiers = [
"Programming Language :: Python",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
]
dependencies = [
"calibr8>=7.0.0",
"h5py",
"numpy",
"pandas",
"scipy",
"typing_extensions",
]

[project.urls]
Homepage = "https://github.com/jubiotech/murefi"
Documentation = "https://murefi.readthedocs.io/en/latest/"
Download = "https://pypi.org/project/murefi/"

[tool.setuptools]
package-dir = {"murefi" = "murefi"}

[tool.setuptools.package-data]
"murefi" = ["py.typed"]

[tool.black]
line-length = 110

[tool.isort]
profile = "black"

[tool.mypy]
ignore_missing_imports = true
exclude = [
'test_.*?\.py$',
]
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

62 changes: 0 additions & 62 deletions setup.py

This file was deleted.

Loading