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
2 changes: 1 addition & 1 deletion .github/workflows/deploy_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
pypi:
name: Deploy PyPI

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
with:
checkName: 'flake8_py3'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ jobs:
build:
name: Python Version Matrix

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:

Expand All @@ -32,4 +32,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
fail_ci_if_error: true
fail_ci_if_error: true
23 changes: 8 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.4
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files"]
# Run the linter
- id: ruff
args: [--fix]
# Run the formatter
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-yaml
args: [--allow-multiple-documents]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
exclude: '^(ThirdParty|models)/'
5 changes: 3 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ formats:

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.8
install:
- requirements: docs/requirements.txt

build:
image: latest
os: "ubuntu-24.04"
tools:
python: "3.13"
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ preferred-citation:
journal: "bioRxiv"
month: 5
title: "Fides: Reliable Trust-Region Optimization for Parameter Estimation of Ordinary Differential Equation Models"
year: 2021
year: 2021
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ reliability.

Fides can be installed via `pip install fides`. Further documentation is
available at [Read the Docs](https://fides-optimizer.readthedocs.io/).


## Features


Expand All @@ -31,4 +31,3 @@ Fides can be installed via `pip install fides`. Further documentation is
* BFGS, DFP, SR1, Broyden (good and bad) and Broyden class iterative
Hessian Approximation schemes
* SSM, TSSM, FX, GNSBFGS and custom hybrid Hessian Approximations schemes

2 changes: 1 addition & 1 deletion docs/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
.. autofunction:: {{ function }}
{% endfor %}

{% endif %}
{% endif %}
1 change: 0 additions & 1 deletion docs/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ Features
* Recursive Reflective and Truncated constraint management
* Full and 2D subproblem solution solvers
* BFGS, DFP and SR1 Hessian Approximations

3 changes: 0 additions & 3 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ Fides Python API
fides.hessian_approximation
fides.logging
fides.constants



4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Requirements just for building the docs (used by readthedocs, but also
# helpful for building docs locally).
sphinx>=1.4
sphinx>=7.2.0
numpy>=1.19.2
scipy>=1.5.2
h5py>=3.5.0
Expand All @@ -10,4 +10,4 @@ recommonmark>=0.6.0
sphinx_rtd_theme>=0.4.3
sphinx-autodoc-typehints>=1.10.3
sphinxcontrib-napoleon
pygments==2.4.1
pygments>=2.4.1
3 changes: 2 additions & 1 deletion examples/Minimal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
"metadata": {},
"outputs": [],
"source": [
"import fides\n",
"import numpy as np\n",
"\n",
"import fides\n",
"\n",
"opt = fides.Optimizer(\n",
" obj, ub=np.asarray([np.inf, 1.5]), lb=np.asarray([-1.5, -np.inf])\n",
")"
Expand Down
8 changes: 5 additions & 3 deletions fides/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import enum
from numbers import Integral, Real
from pathlib import PosixPath, WindowsPath
from typing import Dict

import numpy as np

Expand Down Expand Up @@ -43,6 +42,7 @@ class SubSpaceDim(str, enum.Enum):
Defines the possible choices of subspace dimension in which the
subproblem will be solved.
"""

TWO = '2D' #: Two dimensional Newton/Gradient subspace
FULL = 'full' #: Full :math:`\mathbb{R}^n`
STEIHAUG = 'scg' #: CG subspace via Steihaug's method
Expand Down Expand Up @@ -100,7 +100,7 @@ class ExitFlag(int, enum.Enum):
GTOL = 3 #: Converged according to gradient norm


def validate_options(options: Dict):
def validate_options(options: dict):
"""Check if the chosen options are valid"""
expected_types = {
Options.MAXITER: Integral,
Expand All @@ -124,7 +124,9 @@ def validate_options(options: Dict):
try:
option = Options(option_key)
except ValueError:
raise ValueError(f'{option_key} is not a valid options field.')
raise ValueError(
f'{option_key} is not a valid options field.'
) from None

if option_key is Options.SUBSPACE_DIM:
option_value = SubSpaceDim(option_value)
Expand Down
Loading