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
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<a id="data-analytics-example-notebooks"></a>

# Data Analytics Example Notebooks

These examples show how to use the MI Scripting Toolkit to perform some common data analytics tasks, including
statistical roll-ups and generation of plots. All examples use the MI Training database, available from the Ansys
Download Center.

Download all the notebooks and the
example files [`here`](samples/data-analytics/example_files_data_analytics.zip).

* [Create scatter plots](samples/data-analytics/00_Create_scatter_plots.md)
* [Compare datasets graphically](samples/data-analytics/01_Compare_datasets_graphically.md)
* [Plot data by category](samples/data-analytics/02_Plot_data_by_category.md)
* [Fit series data and import fit results](samples/data-analytics/03_Fit_series_data_and_import.md)
* [Process datasets and import results into Granta MI](samples/data-analytics/04_Process_datasets_and_import.md)
* [Find the area under a curve](samples/data-analytics/05_Find_area_under_a_curve.md)
* [Calculate statistics for a set of records](samples/data-analytics/06_Calculate_statistics_for_records.md)
* [Calculate statistics for functional data attributes](samples/data-analytics/07_Calculate_statistics_for_functional_attributes.md)
* [Fit a non-linear model to series data](samples/data-analytics/08_Fit_model_to_series_data.md)
* [Compare test data to specification values](samples/data-analytics/09_Compare_test_data_to_specification_values.md)
* [Generate a Material Datasheet Report using MI Scripting Toolkit and `python-docx`](samples/data-analytics/10_Material_datasheet_report.md)
* [Generate a Material Summary Presentation using MI Scripting Toolkit and `python-pptx`](samples/data-analytics/11_Powerpoint_summary_example.md)
* [Preparing data for Power BI](samples/data-analytics/12_Preparing_data_for_Power_BI.md)
* [Data validation using Scripting Toolkit](samples/data-analytics/13_Data_validation.md)
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"physics": "Materials Data"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<a id="foundation-api-example-notebooks"></a>

# Foundation API Example Notebooks

These example scripts show you how to use the MI Scripting Toolkit to search for records, export data, and import data.
All examples use the MI Training database, available from the Ansys Download Center.

Download all the notebooks and example files
[`here`](samples/foundation/example_files_foundation.zip).

* [Text search](samples/foundation/Text_Search.md)
* [Exporting data](samples/foundation/Exporting_data.md)
* [Exporting data using the Engineering Data Service](samples/foundation/Exporting_data_using_EngineeringDataService.md)
* [Functional data and importing data](samples/foundation/Functional_data_and_importing_data.md)
* [Importing and exporting tabular data](samples/foundation/Importing_and_exporting_tabular_data.md)
* [New Features in MI Scripting Toolkit v1.5](samples/foundation/Deleting_records_and_other_new_v1_5_features.md)
* [Inspecting record link groups](samples/foundation/Inspecting_Record_Link_Groups.md)
* [Modifying record link groups](samples/foundation/Modifying_Record_Link_Groups.md)
6 changes: 6 additions & 0 deletions 2025R1_Test/grantami-scripting-toolkit-dev-portal/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Contents:
* [Upgrading from MI Scripting Toolkit Version 4.0](upgrading.md#upgrading-from-mi-scripting-toolkit-version-4-0)
* [Upgrading from MI Scripting Toolkit for Python Version 3.x](upgrading.md#upgrading-from-mi-scripting-toolkit-for-python-version-3-x)
* [Upgrading from MI Scripting Toolkit for Python Version 2.X](upgrading.md#upgrading-from-mi-scripting-toolkit-for-python-version-2-x)
* [Example Notebooks](notebooks.md)
* [Streamlined API Example Notebooks](stream_example.md)
* [Data Analytics Example Notebooks](data_analytics.md)
* [Foundation API Example Notebooks](foundation_example.md)
* [Package Dependencies](notebooks.md#package-dependencies)
* [Database Compatibility](notebooks.md#database-compatibility)
* [MI Scripting Toolkit and PyAnsys](pyansys.md)
* [New PyAnsys packages for Granta MI](pyansys.md#new-pyansys-packages-for-granta-mi)
* [Interoperability between PyAnsys packages and the MI Scripting Toolkit](pyansys.md#interoperability-between-pyansys-packages-and-the-mi-scripting-toolkit)
Expand Down
74 changes: 74 additions & 0 deletions 2025R1_Test/grantami-scripting-toolkit-dev-portal/notebooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<a id="example-notebooks"></a>

# Example Notebooks

The MI Scripting Toolkit documentation includes example notebooks that cover key features of the Python interface. These
are available as HTML reference documents, Jupyter Notebook files, and python scripts below:

* [Streamlined API Example Notebooks](stream_example.md)
* [Data Analytics Example Notebooks](data_analytics.md)
* [Foundation API Example Notebooks](foundation_example.md)

<a id="package-dependencies"></a>

## Package Dependencies

<a id="third-party-dependencies"></a>

### Third-party Dependencies

These notebooks depend on third-party Python packages in addition to the MI Scripting Toolkit. The list
below defines the requirements for running the notebooks:

- docx2pdf (>=0.1.8,<0.2.0)
- jupyterlab (>=4.0.0,<5.0.0)
- matplotlib (>=3.6.0,<4.0.0)
- numpy (>=2.0.0,<3.0.0)
- pandas (>=2.1,<3.0)
- python-docx (>=1.1.0,<2.0.0)
- python-pptx (>=1.0.0,<2.0.0)
- scipy (>=1.11.0,<2.0.0)
- seaborn (>=0.13,<0.14)
- tqdm[notebook] (>=4.0,<5.0)

Alternatively, if using pip, these can be installed automatically using the `[notebooks]` extra as follows:

```default
pip install GRANTA_MIScriptingToolkit[notebooks] --find-links=./path/to/whl/files
```

If you encounter dependency errors when installing the `[notebooks]` extra, you may need to first upgrade `pip`:

```default
python -m pip install --upgrade pip
```

<a id="pygranta-dependencies"></a>

### PyGranta Dependencies

The following notebooks also depend on additional PyGranta packages:

> * [RecordLists and MI Scripting Toolkit](samples/streamlined/22_Record_Lists_Interoperability.md) requires `ansys-grantami-recordlists`.
> * [JobQueue and MI Scripting Toolkit](samples/streamlined/23_Job_Queue_Interoperability.md) requires `ansys-grantami-jobqueue`.

Minor versions of these packages are typically compatible with a single version of Granta MI only,
so they are not provided as part of the `[notebooks]` extra described above. To easily identify the
correct package version for your version of Granta MI, the [PyGranta](https://pypi.org/project/pygranta/) meta-package can be used. For
example, installing `pygranta` v2024.2 will also install versions of `ansys-grantami-recordlists`
and `ansys-grantami-jobqueue` that are compatible with Granta MI 2024 R2.

The [Package versions](https://grantami.docs.pyansys.com/version/dev/package_versions.html)
section of the PyGranta documentation describes which versions of packages are installed with each version of the
metapackage.

<a id="database-compatibility"></a>

## Database Compatibility

These notebooks have been tested against the latest version of the MI Training database at the time of release.
Every effort has been made to ensure the notebooks will execute without exceptions, even if they are run multiple times
in succession by multiple users.

However, it is possible that changes made as a result of other training activities could result in these notebooks
exhibiting unexpected behavior. If this happens, please try restoring a fresh copy of the MI Training database.
9 changes: 6 additions & 3 deletions 2025R1_Test/grantami-scripting-toolkit-dev-portal/pyansys.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ MI Scripting Toolkit objects. Instead, methods will be added to the MI Scripting
interoperability with PyAnsys packages as required. Example notebooks will also be provided to
demonstrate the use of these methods.

Example notebooks are included in the MI Scripting Toolkit, this is
included as part of the Granta MI Enterprise package on the Ansys Customer Portal. Contact
your system administrator for more details.
There are currently two notebooks that demonstrate this interoperability:

* [RecordLists and MI Scripting Toolkit](samples/streamlined/22_Record_Lists_Interoperability.md)
* [JobQueue and MI Scripting Toolkit](samples/streamlined/23_Job_Queue_Interoperability.md)

More examples will be added as additional PyAnsys packages are released.

<a id="scripting-toolkit-third-party-dependencies"></a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ modified according to the recommendations below. The features will be removed in

### Examples

Example notebooks are included in the MI Scripting Toolkit, this is
included as part of the Granta MI Enterprise package on the Ansys Customer Portal. Contact
your system administrator for more details.
* Added new [Data validation](samples/data-analytics/13_Data_validation.md) notebook that demonstrates how to use
Scripting Toolkit to validate data in a Granta MI database.

<a id="foundation-api-enhancements-and-bug-fixes"></a>

Expand Down
Loading