Metadata-Version: 2.1
Name: itis-dakota
Version: 6.24.10
Summary: Dakota wheel built by the IT'IS Foundation, Zurich, Switzerland
Author: Werner Van Geit
License: Copyright (C) IT'IS Foundation - All Rights Reserved
         
         Written by Werner Van Geit <vangeit at itis.swiss>, 2023-2026
         
         Unless required by applicable law or agreed to in writing, 
         Licensor provides the Work (and each Contributor provides 
         its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES 
         OR CONDITIONS OF ANY KIND, either express or implied, 
         including, without limitation, any warranties or 
         conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, 
         or FITNESS FOR A PARTICULAR PURPOSE. You are solely 
         responsible for determining the appropriateness of using 
         or redistributing the Work and assume any risks associated 
         with Your exercise of permissions under this License.
         
         The external Dakota source code used to build the wheels 
         is distributed under the GNU Lesser General Public License 
         (http://www.gnu.org/licenses/lgpl.html).
         The original Dakota source code can be downloaded from:
         https://github.com/snl-dakota/dakota
         The third-party packages and libraries Dakota uses have 
         compatible licenses. 
         See the Dakota README for more details.
         
Project-URL: homepage, https://github.com/ITISFoundation/itis-dakota
Project-URL: repository, https://github.com/ITISFoundation/itis-dakota.git
Project-URL: issues, https://github.com/ITISFoundation/itis-dakota/issues
Requires-Python: >=3.12
Requires-Dist: numpy
Requires-Dist: pydantic>=2
Description-Content-Type: text/markdown

Dakota wheel built by the IT'IS Foundation
==========================================

[![build-wheel](https://github.com/ITISFoundation/itis-dakota/actions/workflows/build-wheels.yml/badge.svg)](https://github.com/ITISFoundation/itis-dakota/actions/workflows/build-wheels.yml)

This repository contains the code to build a Python wheel
to load the [Dakota](https://github.com/snl-dakota/dakota) 
python module.


Installing the wheel
----------------------

```
pip install itis-dakota
```

Requirements
------------

At the moment the wheel can be installed on **Linux** ([manylinux_2_28](https://github.com/pypa/manylinux) compatible distributions) only.

Support for other operating systems will be added in the future.

Using the wheel
------------------

After installation, the module can be imported:
```
import dakota
import dakota.environment as dakenv
```

And example on how to use the environment module can be found here:
https://github.com/snl-dakota/dakota/blob/devel/src/unit/test_dakota_python_env.py

Building the wheel
------------------

```
make wheel
```

Typing / stubs
--------------

`dakota.environment` is a compiled pybind11 extension, so its type stubs
(`stubs/dakota/environment/{__init__.pyi,environment.pyi}`) are generated,
not hand-written. After bumping the Dakota version or touching
`dakota/src/dakota_python.cpp` via a patch, regenerate the stubs, then
commit the result:

```
make stubs
```

`make stubs` builds the wheel first when `wheelhouse/` is empty. Commit the
regenerated stubs: the wheel used for generation still ships the previous
ones, and wheels built afterwards bundle the committed stubs.

CI fails (one linux matrix leg) if the committed stubs no longer match the
compiled module.

Dakota's native JSON input format
----------------------------------

Since Dakota 6.24, studies can be configured directly from JSON instead of
Dakota's legacy keyword input file. Dakota's own Pydantic v2 models for that
JSON format (`dakota/python/dakota/spec`, source of truth for `dakota.json`
and the C++ JSON parser) are shipped as `dakota.spec`, giving IDE
autocomplete/inline docs and real validation without a round-trip to the
online docs:

```python
from dakota.spec.study import DakotaStudy
import dakota.environment as dakenv

study = DakotaStudy(
    method=[...],
    variables=[...],
    responses=[...],
)
dakenv.study(callback, study.model_dump(mode="json", exclude_none=True))
```

`dakota.spec` is pure Python (no compiled dependency) and is copied
verbatim from the vendored Dakota source on each build, so it stays in
sync with whatever Dakota version this wheel bundles automatically.

Copyright (c) 2023-2026 IT'IS Foundation, Zurich, Switzerland
