Skip to content

Commit

Permalink
Merge pull request #73 from dnv-innersource/74-update-generated-docs
Browse files Browse the repository at this point in the history
74 update generated docs
  • Loading branch information
StephanieKemna authored Nov 7, 2024
2 parents f1d4c21 + 5742645 commit 97ce20e
Show file tree
Hide file tree
Showing 17 changed files with 388 additions and 433 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e

### Changed

* Update generated docs; cleaning, fix for warnings, add missing pages and info, update authors and maintainers.
* Add where the source code for cppfmu can be found, add third party license.
* Added missing unit tests for the template data generated when building the FMU.
* Unit tests for the modelDescription.xml generation.
Expand Down Expand Up @@ -124,7 +125,7 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e

### Changed

* incorporated latest updates introduced in mvx
* incorporated latest updates introduced in other repo

## [0.1.4] - 2023-09-25

Expand Down
120 changes: 58 additions & 62 deletions LICENSE_THIRD_PARTY
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# cppfmu
## cppfmu

Source code & license at: <https://github.com/viproma/cppfmu>

## Mozilla Public License Version 2.0
### Mozilla Public License Version 2.0

1. Definitions
----------------

Check failure on line 8 in LICENSE_THIRD_PARTY

View workflow job for this annotation

GitHub Actions / build_and_publish_documentation / Build and publish documentation

Document or section may not begin with a transition. [docutils]

Check failure on line 8 in LICENSE_THIRD_PARTY

View workflow job for this annotation

GitHub Actions / build_and_publish_documentation / Build and publish documentation

Document or section may not begin with a transition. [docutils]
--------------
1. Definitions

1.1. "Contributor"
means each individual or legal entity that creates, contributes to
Expand Down Expand Up @@ -87,9 +87,9 @@ Source code & license at: <https://github.com/viproma/cppfmu>
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.

2. License Grants and Conditions
----------------

--------------------------------
2. License Grants and Conditions

2.1. Grants

Expand Down Expand Up @@ -159,9 +159,9 @@ equivalents.
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.

3. Responsibilities
----------------

-------------------
3. Responsibilities

3.1. Distribution of Source Form

Expand Down Expand Up @@ -222,9 +222,9 @@ indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.

4. Inability to Comply Due to Statute or Regulation
----------------

---------------------------------------------------
4. Inability to Comply Due to Statute or Regulation

If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
Expand All @@ -236,10 +236,10 @@ Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.

5. Termination

--------------

5. Termination

5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Expand All @@ -266,75 +266,67 @@ end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.

************************************************************************

* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *

************************************************************************

* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *

************************************************************************
--------------

8. Litigation
6. **Disclaimer of Warranty**

Covered Software is provided under this License on an "as is"
basis, without warranty of any kind, either expressed, implied, or
statutory, including, without limitation, warranties that the
Covered Software is free of defects, merchantable, fit for a
particular purpose or non-infringing. The entire risk as to the
quality and performance of the Covered Software is with You.
Should any Covered Software prove defective in any respect, You
(not any Contributor) assume the cost of any necessary servicing,
repair, or correction. This disclaimer of warranty constitutes an
essential part of this License. No use of any Covered Software is
authorized under this License except under this disclaimer.

--------------

7. **Limitation of Liability**

Under no circumstances and under no legal theory, whether tort
(including negligence), contract, or otherwise, shall any
Contributor, or anyone who distributes Covered Software as
permitted above, be liable to You for any direct, indirect,
special, incidental, or consequential damages of any character
including, without limitation, damages for lost profits, loss of
goodwill, work stoppage, computer failure or malfunction, or any
and all other commercial damages or losses, even if such party
shall have been informed of the possibility of such damages. This
limitation of liability shall not apply to liability for death or
personal injury resulting from such party's negligence to the
extent applicable law prohibits such limitation. Some
jurisdictions do not allow the exclusion or limitation of
incidental or consequential damages, so this exclusion and
limitation may not apply to You.

-------------

8. Litigation

Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.

9. Miscellaneous

----------------

9. Miscellaneous

This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.

10. Versions of the License
----------------

---------------------------
10. Versions of the License

10.1. New Versions

Expand Down Expand Up @@ -365,8 +357,9 @@ If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.

----------------

Exhibit A - Source Code Form License Notice
-------------------------------------------

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -379,8 +372,11 @@ for such a notice.

You may add additional accurate notices of copyright ownership.

----------------

Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------

This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

----------------
10 changes: 1 addition & 9 deletions MLMODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,10 @@ graph TD;
```

## Tips and tricks

```diff
- TODO
```
[//]: # (## Tips and tricks - TODO)

## Examples

```diff
- TODO
```

### Model that only uses "pure" inputs and outputs

```python
Expand Down
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ or if the files are in your current working directory:
mlfmu build
```

# Extended documentation
## Extended documentation

For more explanation on the ONNX file structure and inputs/outputs for your model, please refer to mlfmu's [MLMODEL.md](MLMODEL.md).

Expand Down Expand Up @@ -170,8 +170,6 @@ uv self update

We use conan for building the FMU. For the conan building to work later on, you will need the Visual Studio Build tools 2022 to be installed. It is best to do this **before** installing conan (which gets installed as part of the package dependencies, see step 5). You can download and install the Build Tools for VS 2022 (for free) from <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022>.

> Note: After you installed conan, you want to make sure it has the correct build profile. You can auto-detect and create the profile by running `conan profile detect`. After this, you can check the profile in `C:\Users\<USRNAM>\.conan2\profiles\.default` (replace `<USRNAM>` with your username). You want to `compiler=msvc`, `compiler.cppstd=17`, `compiler.version=193` (for Windows).
### 3. Clone the repository

Clone the mlfmu repository into your local development directory:
Expand Down Expand Up @@ -205,6 +203,8 @@ It allows the dependency resolver to upgrade dependencies to newer versions, whi
uv sync -p 3.12 -U
```

> Note: At this point, you should have conan installed. You will want to make sure it has the correct build profile. You can auto-detect and create the profile by running `conan profile detect`. After this, you can check the profile in `C:\Users\<USRNAM>\.conan2\profiles\.default` (replace `<USRNAM>` with your username). You want to have: `compiler=msvc`, `compiler.cppstd=17`, `compiler.version=193` (for Windows).
### 5. (Optional) Activate the virtual environment

When using `uv`, most of the time there will be no longer a need to manually activate the virtual environment. <br>
Expand Down Expand Up @@ -269,17 +269,36 @@ For more options, see `uv run mlfmu --help` or `uv run mlfmu build --help`.

The created FMU can be used for running (co-)simulations. We have tested the FMUs that we have created in the [Simulation Trust Center], which uses the [Open Simulation Platform] software.

### 10. Compiling the documentation

This repository uses sphinx with .rst and .md files as well as Python docstrings, to document the code and usage. To locally build the docs:

```sh
cd docs
make html
```

You can then open index.html for access to all docs (for Windows: `start build\html\index.html`).

## Meta

All code in mlfmu is DNV intellectual property.

Copyright (c) 2024 [DNV](https://www.dnv.com) AS. All rights reserved.

Primary contributors:

Kristoffer Skare - [@LinkedIn](https://www.linkedin.com/in/kristoffer-skare-19606a1a1/) - <kristoffer.skare@dnv.com>

Jorge Luis Mendez - [@LinkedIn](https://www.linkedin.com/in/jorgelmh/) - <jorge.luis.mendez@dnv.com>

Stephanie Kemna - [@LinkedIn](https://www.linkedin.com/in/stephaniekemna/) - <stephanie.kemna@dnv.com>
Additional contributors (testing, docs, examples, etc.):

Melih Akdağ - [@LinkedIn](https://www.linkedin.com/in/melih-akdag/) - <melih.akdag@dnv.com>

Stephanie Kemna - [@LinkedIn](https://www.linkedin.com/in/stephaniekemna/)

Hee Jong Park - [@LinkedIn](https://www.linkedin.com/in/heejongpark/) - <hee.jong.park@dnv.com>

## Contributing

Expand All @@ -299,7 +318,7 @@ For your contribution, please make sure you follow the [STYLEGUIDE](STYLEGUIDE.m

## License & dependencies

This code is distributed under the BSD 3-Clause license. See [LICENSE](LICENSE.md) for more information.
This code is distributed under the BSD 3-Clause license. See [LICENSE](LICENSE) for more information.

It makes use of [cpp-fmu], which is distributed under the MPL license at <https://github.com/viproma/cppfmu>.

Expand Down
7 changes: 3 additions & 4 deletions docs/source/_templates/custom-class.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
{{ fullname | escape | underline}}
{{ name | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:


{% block methods %}
.. automethod:: __init__

{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
{% for item in methods %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}


{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
~{{ name }}.{{ item }}
Expand Down
Loading

0 comments on commit 97ce20e

Please sign in to comment.