Skip to content

MaRDI4NFDI/MORB-fetch

Repository files navigation

MORB-fetch

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:

  • Ashwin S. Nayak orcid github
  • Jens Saak orcid github

Affiliation:

License:

Documentation: Documentation Status

Installation

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.

Use in your own projects

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.git

If 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.data

The 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.

Run Demos

First clone the repository,

git clone https://github.com/mardi4nfdi/morb-fetch.git
cd morb-fetch

Install the required dependencies,

uv sync

This 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

About

Configurable data (and metadata) fetcher for MORWiki Examples

Resources

License

Stars

Watchers

Forks

Languages