From 7b00e9494406211bdb347a959f6bebd3be46fb59 Mon Sep 17 00:00:00 2001 From: coder Date: Sat, 3 Jan 2026 14:11:15 -0800 Subject: [PATCH 1/5] update readme --- README.md | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 267d0d9..424602f 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,23 @@ # mdreader -A Python library for reading and parsing Functional Mock-up Interface (FMI2.0 currently) model description XML file. +A Python library for reading and parsing Functional Mock-up Interface (FMI2.0 currently) model description XML file into Pydantic models. -Pydantic models are used to represent the structure of the model description, providing type validation and easy access to model information. +[![PyPI version](https://badge.fury.io/py/mdreader.svg)](https://badge.fury.io/py/mdreader) ## Installation -It is suggested to add `mdreader` to your `pyproject.toml` with `uv` by running: +Add `mdreader` to your `pyproject.toml` with `uv` with: -``` +``` bash uv add mdreader ``` > To install `uv`, see https://docs.astral.sh/uv/getting-started/installation/ -### Other installation options - -Option 1: Add `mdreader` to an existing virtual environment with `uv` - -``` -uv pip install mdreader -``` - -Option 2: Add `mdreader` with `pip` - -``` -pip install -U mdreader -``` - ## Getting started +You can read an FMI 2.0 `modelDescription.xml` file, an FMU file, or an unzipped FMU directory containing the `modelDescription.xml` file. + ```python from mdreader.fmi2 import read_model_description @@ -41,6 +29,8 @@ md = read_model_description("path/to/model.fmu") # Read from an unzipped fmu directory containing modelDescription.xml md = read_model_description("path/to/directory") + +print(md) ``` ## Features From bc45de017c7f9c2d7b6b6e2e0177717ff343ef51 Mon Sep 17 00:00:00 2001 From: coder Date: Sat, 3 Jan 2026 14:13:34 -0800 Subject: [PATCH 2/5] update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 424602f..650ffed 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# mdreader +# mdreader 📖 A Python library for reading and parsing Functional Mock-up Interface (FMI2.0 currently) model description XML file into Pydantic models. [![PyPI version](https://badge.fury.io/py/mdreader.svg)](https://badge.fury.io/py/mdreader) -## Installation +## Installation Add `mdreader` to your `pyproject.toml` with `uv` with: @@ -14,7 +14,7 @@ uv add mdreader > To install `uv`, see https://docs.astral.sh/uv/getting-started/installation/ -## Getting started +## How to use You can read an FMI 2.0 `modelDescription.xml` file, an FMU file, or an unzipped FMU directory containing the `modelDescription.xml` file. From 2e465d992bbafc9952c3521516316975b6b5f3cc Mon Sep 17 00:00:00 2001 From: coder Date: Sat, 3 Jan 2026 14:14:52 -0800 Subject: [PATCH 3/5] update readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 650ffed..b051999 100644 --- a/README.md +++ b/README.md @@ -43,10 +43,6 @@ print(md) - Support for both Model Exchange and Co-Simulation interfaces - Parse model structure, dependencies, and experiment configurations -## Related projects - -* [fmpy](https://github.com/CATIA-Systems/FMPy) - ## Why another FMI model description reader? * **Lightweight**: mdreader only depends on Pydantic @@ -54,6 +50,10 @@ print(md) * **Validation**: mdreader uses Pydantic models to ensure the integrity of the parsed data * **FMI version exclusive**: The `fmi2.FMIModelDescription` class is specific to FMI 2.0 (not a mix of FMI1/2/3), making it simpler to use for that version +## Related projects + +* [fmpy](https://github.com/CATIA-Systems/FMPy): A similar `read_model_description` function is available in FMPy, but it uses custom classes instead of Pydantic models. + ## Licensing The code in this project is licensed under MIT license. From a42eba60efc8e37effa4ef96d5038fb0e60b4ce6 Mon Sep 17 00:00:00 2001 From: coder Date: Sat, 3 Jan 2026 14:18:09 -0800 Subject: [PATCH 4/5] update readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b051999..477ae7d 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ uv add mdreader ## How to use -You can read an FMI 2.0 `modelDescription.xml` file, an FMU file, or an unzipped FMU directory containing the `modelDescription.xml` file. +To read and parse an FMI 2.0 model description: ```python from mdreader.fmi2 import read_model_description @@ -24,11 +24,11 @@ from mdreader.fmi2 import read_model_description # Read from XML file md = read_model_description("path/to/modelDescription.xml") -# Read from FMU file +# Read from FMU archive md = read_model_description("path/to/model.fmu") -# Read from an unzipped fmu directory containing modelDescription.xml -md = read_model_description("path/to/directory") +# Read from unzipped FMU directory +md = read_model_description("path/to/unzipped/fmu/directory") print(md) ``` @@ -52,7 +52,7 @@ print(md) ## Related projects -* [fmpy](https://github.com/CATIA-Systems/FMPy): A similar `read_model_description` function is available in FMPy, but it uses custom classes instead of Pydantic models. +* [fmpy](https://github.com/CATIA-Systems/FMPy): A similar `read_model_description` function is available in FMPy, but it uses custom classes instead of Pydantic models and has more dependencies. ## Licensing From 7ba972512d227b3f53779ce46c68664fdb61324e Mon Sep 17 00:00:00 2001 From: coder Date: Sat, 3 Jan 2026 14:19:23 -0800 Subject: [PATCH 5/5] update readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 477ae7d..348c099 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A Python library for reading and parsing Functional Mock-up Interface (FMI2.0 cu [![PyPI version](https://badge.fury.io/py/mdreader.svg)](https://badge.fury.io/py/mdreader) -## Installation +## Installation 📦 Add `mdreader` to your `pyproject.toml` with `uv` with: @@ -14,7 +14,7 @@ uv add mdreader > To install `uv`, see https://docs.astral.sh/uv/getting-started/installation/ -## How to use +## How to use 🚀 To read and parse an FMI 2.0 model description: @@ -33,7 +33,7 @@ md = read_model_description("path/to/unzipped/fmu/directory") print(md) ``` -## Features +## Features ✨ - Parse FMI 2.0 model description XML files - Read model information from FMU archives @@ -43,18 +43,18 @@ print(md) - Support for both Model Exchange and Co-Simulation interfaces - Parse model structure, dependencies, and experiment configurations -## Why another FMI model description reader? +## Why another FMI model description reader? 🤔 * **Lightweight**: mdreader only depends on Pydantic * **De/Serialization**: Pydantic models support easy serialization to/from JSON, dict, etc. * **Validation**: mdreader uses Pydantic models to ensure the integrity of the parsed data * **FMI version exclusive**: The `fmi2.FMIModelDescription` class is specific to FMI 2.0 (not a mix of FMI1/2/3), making it simpler to use for that version -## Related projects +## Related projects 🔗 * [fmpy](https://github.com/CATIA-Systems/FMPy): A similar `read_model_description` function is available in FMPy, but it uses custom classes instead of Pydantic models and has more dependencies. -## Licensing +## Licensing 📄 The code in this project is licensed under MIT license. See the [LICENSE](LICENSE) file for details.