A configurable data (and metadata) fetcher for datasets and toolkits used in Model Order Reduction Benchmarker (MORB).
Features:
- Easy dataset selection, download, extraction
- Downloaders for MORLAB, M-MESS and Tectonic toolkits
- Flexible configuration options and dataset-caching
- Strict type checking
- Integration with MORB for seamless benchmarking
Authors:
Affiliation:
- Max Planck Institute for Dynamics of Complex Technical Systems, Magdeburg, Germany.
License:
- BSD 3-Clause, see
LICENSE.
This project relies heavily on uv, a fast and efficient tool for managing Python projects and their dependencies. While this is not strictly necessary, it eases the installation process.
Tip
To install uv, check out the official installation instructions for your platform. Alternatively, you can also install it via pip, pipx, brew, and by downloading the standalone binary.
The following sections provide more details on how to use this project for different purposes.
Note
For developers (testing, documentation and building), refer to README.dev.md.
The project is yet to be published on PyPI, so to install this project as a dependency,
uv add git+https://github.com/mardi4nfdi/morb-fetch.gitIf using
pip, you can install it via,pip install git+https://github.com/mardi4nfdi/morb-fetch.git
You can then use it in your code,
from morb_fetch import Database, Example
# List all example identifiers in Database
database = Database()
ids = database.list_ids()
# Pull metadata using ID
id = "steelProfile_n1357m7q6"
example = Example(id, database)
metadata = example.meta # or also, database.lookup(id)
# Fetch system matrices from Zenodo or server
example.retrieve()
matrices = example.dataThe database currently has a subset of benchmarks in MORWiki, and it is best to list ids to check if they exist.
MORB-Fetch supports flexible configuration through environment variables or a YAML configuration file.
First clone the repository,
git clone https://github.com/mardi4nfdi/morb-fetch.git
cd morb-fetchInstall the required dependencies,
uv syncThis command reads the dependencies from pyproject.toml and installs them into a virtual environment, which is created by default in the .venv directory.
Subsequently, you can run the demos,
uv run demos/steel_profile.py