Skip to content

Commit

Permalink
merge validation to main
Browse files Browse the repository at this point in the history
  • Loading branch information
b4pm-devops committed Aug 28, 2024
2 parents 1a01a56 + d740d79 commit c873714
Show file tree
Hide file tree
Showing 304 changed files with 4,174 additions and 3,234 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[run]
relative_files = True
branch = True
omit =
omit =
*/tests/*
*/__init__.py
docs/
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ dist/
sos_trades_core.egg-info/
sostrades_core.egg-info/
/.pytest_cache/
.vscode
.ruff.toml
101 changes: 51 additions & 50 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff
args: [
--fix,
--preview,
--exit-non-zero-on-fix,
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: LICENSES/headers
- id: check-yaml
# !reference is specific to gitlab
# !! prefix is specific to mkdocs
exclude: \.gitlab-ci.yml|mkdocs.yml
- id: check-added-large-files
- id: check-json
- id: pretty-format-json
args: [
--autofix,
--no-sort-keys,
]
exclude: \.ipynb
- id: check-toml
- id: destroyed-symlinks
- id: check-symlinks
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
args: [
--fix,
--disable,
MD024,
]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff
args: [
--fix,
--preview,
--exit-non-zero-on-fix,
--config=ruff.toml,
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: LICENSES/headers
- id: check-yaml
# !reference is specific to gitlab
# !! prefix is specific to mkdocs
exclude: \.gitlab-ci.yml|mkdocs.yml
- id: check-added-large-files
- id: check-json
- id: pretty-format-json
args: [
--autofix,
--no-sort-keys,
]
exclude: \.ipynb
- id: check-toml
- id: destroyed-symlinks
- id: check-symlinks
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
args: [
--fix,
--disable,
MD024,
]
39 changes: 24 additions & 15 deletions CREDITS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ External Dependencies

sostrades-core depends on software with compatible licenses that are listed below.

`pycryptodome (3.20.0) <https://www.pycryptodome.org>`_
BSD, Public Domain

`black (24.4.2) <https://github.com/psf/black>`_
MIT

Expand All @@ -18,33 +15,48 @@ sostrades-core depends on software with compatible licenses that are listed belo
`cvxpy (1.5.2) <https://github.com/cvxpy/cvxpy>`_
Apache License, Version 2.0

`db-dtypes (1.2.0) <https://github.com/googleapis/python-db-dtypes-pandas>`_
Apache License

`gitpython (3.1.43) <https://github.com/gitpython-developers/GitPython>`_
BSD

`python-arango (8.0.0) <https://github.com/arangodb/python-arango>`_
MIT
`google-cloud-bigquery (3.25.0) <https://github.com/googleapis/python-bigquery>`_
Apache License, Version 2.0

`matplotlib (3.9.0) <https://matplotlib.org>`_
`matplotlib (3.9.1) <https://matplotlib.org>`_
PSF

`numpy (1.24.4) <https://numpy.org>`_
BSD License

`openturns (1.18) <http://www.openturns.org>`_
`openturns (1.23) <http://www.openturns.org>`_
LGPL

`pandas (1.3.0) <https://pandas.pydata.org>`_
`pandas (2.2.2) <https://pandas.pydata.org>`_
BSD License

`petsc (3.19.4) <https://petsc.org/>`_
`petsc (3.21.3) <https://petsc.org/>`_
BSD

`petsc4py (3.19.4) <https://gitlab.com/petsc/petsc>`_
`petsc4py (3.21.3) <https://gitlab.com/petsc/petsc>`_
BSD-2-Clause

`pyarrow (16.1.0) <https://arrow.apache.org/>`_
Apache License, Version 2.0

`plotly (5.3.0) <https://plotly.com/python/>`_
MIT

`pycel (1.0b30) <https://github.com/stephenrauch/pycel>`_
GNU General Public License v2 (GPLv2)

`pycryptodome (3.20.0) <https://www.pycryptodome.org>`_
BSD, Public Domain

`python-arango (8.0.0) <https://github.com/arangodb/python-arango>`_
MIT

`PyYAML (6.0.1) <https://pyyaml.org/>`_
MIT

Expand All @@ -54,10 +66,7 @@ sostrades-core depends on software with compatible licenses that are listed belo
`six (1.16.0) <https://github.com/benjaminp/six>`_
MIT

`SQLAlchemy (1.3.13) <https://www.sqlalchemy.org>`_
MIT

`sympy (1.9) <https://sympy.org>`_
`sympy (1.13.0) <https://sympy.org>`_
BSD

`tqdm (4.66.4) <https://tqdm.github.io>`_
Expand All @@ -66,5 +75,5 @@ sostrades-core depends on software with compatible licenses that are listed belo
`nose2 (0.9.1) <https://docs.nose2.io/>`_
BSD-2-Clause

`pytest (7.4.0) <https://docs.pytest.org/en/latest/>`_
`pytest (8.1.2) <https://docs.pytest.org/en/latest/>`_
MIT
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion LICENSES/BSD-2-Clause.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Redistribution and use in source and binary forms, with or without modification,

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 1 addition & 1 deletion LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Redistribution and use in source and binary forms, with or without modification,

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions LICENSES/EPL-v2.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
reproduce, prepare Derivative Works of, publicly display, publicly perform,
Distribute and sublicense the Contribution of such Contributor, if any, and
such Derivative Works.

b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under
Licensed Patents to make, use, sell, offer to sell, import and otherwise
Expand Down Expand Up @@ -241,4 +241,4 @@ this Agreement, whether expressly, by implication, estoppel or otherwise. All
rights in the Program not expressly granted under this Agreement are reserved.
Nothing in this Agreement is intended to be enforceable by any entity that is
not a Contributor or Recipient. No third-party beneficiary rights are created
under this Agreement.
under this Agreement.
2 changes: 1 addition & 1 deletion LICENSES/MIT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include LICENSE
include NOTICE
include README.md
include README.md
4 changes: 2 additions & 2 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Copyright 2022 The Apache Software Foundation.
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This software contains code originally developed
This software contains code originally developed
at Airbus SAS. (https://www.airbus.com/)
Copyright 2020 - 2021 Airbus SAS. All Rights Reserved.
Copyright 2020 - 2021 Airbus SAS. All Rights Reserved.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
SoSTradesCore is the Python package containing the core of the execution engine of System of Systems Trades

## Packages installation
pip install -r requirements.in --trusted-host pypi.org --trusted-host files.pythonhosted.org
pip install -r requirements.in --trusted-host pypi.org --trusted-host files.pythonhosted.org

A dedicated version of GEMSEO is required, for now:
https://gitlab.com/sostrades/gemseo branch sos_develop
Expand Down
2 changes: 1 addition & 1 deletion docs/source/caption/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
> In SoSTrades, a group of SoSDisciplines interacting together.
* Usecase
> In SosTrades, allows to define a set of input variables for a study and to run this study with thus values.
> In SosTrades, allows to define a set of input variables for a study and to run this study with thus values.
* Coupling
> In SoSTrades and Gemseo, coupling means associating output variables of a model to the input variables of another model.
Expand Down
4 changes: 1 addition & 3 deletions docs/source/caption/namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Namespaces are used to set prefixes in front of the variable names to:
* Choose a suitable data tree breakdown
* Organize the data location in the GUI

## Visibility possibilities :
## Visibility possibilities :
![](../images/namespace_1.png)

**Local** (default visibility) : the variable is stored at the root of the discipline
Expand Down Expand Up @@ -45,5 +45,3 @@ You need to define the same shared namespace for the shared variable.
### Example : Aero-structure model coupling

![](../images/aero_structure_model_coupling_2.png)


2 changes: 1 addition & 1 deletion docs/source/caption/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can access it by following this [link](https://validation.osc-tsa.com/) :
## A generic platform adaptable to the simulation needs of specific projects

* Designed to handle long-term trajectories 2030, 2050, 2100 unlike industrial digital twins or classic "System of Systems" approaches
* Designed to handle long-term trajectories 2030, 2050, 2100 unlike industrial digital twins or classic "System of Systems" approaches
* Provides all the state of the art in mathematics for simulation:
>* Design of experiments
>* Sensitivity analyses
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
copyright = '2024, Sostrades Developers'
author = 'Sostrades Developers'

#release = '0.1'
#version = '0.1.0'
# release = '0.1'
# version = '0.1.0'

# -- General configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/source/how-to/create-postprocessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_post_processing_list(self, chart_filters=None):
for chart_filter in chart_filters:
if chart_filter.filter_key == 'charts':
chart_list = chart_filter.selected_values

if 'sample chart' in chart_list:
# Get the values
x = self.get_sosdisc_inputs('x')
Expand Down
5 changes: 1 addition & 4 deletions docs/source/how-to/create-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ class ProcessBuilder(BaseProcessBuilder):
'ns_ac', post_processing_filters, post_processings)
self.ee.post_processing_manager.add_post_processing_module_to_namespace(
'ns_ac', 'sostrades_core.sos_processes.test.test_disc1_disc2_coupling.post_processing_libraries')

return builder_list

```



6 changes: 3 additions & 3 deletions docs/source/how-to/create-usecase.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if '__main__' == __name__:

## Visualize the post-processings of your usecase

A dedicated factory (PostprocessingFactory) manages post-processing functionalities within the SoSTrades platform. Users have the option to preview all post-processings created for their usecase (in all the wrapp of the associated process but also at a given node, see how to create-postprocessing for mroe details) with these commands :
A dedicated factory (PostprocessingFactory) manages post-processing functionalities within the SoSTrades platform. Users have the option to preview all post-processings created for their usecase (in all the wrapp of the associated process but also at a given node, see how to create-postprocessing for mroe details) with these commands :

```python

Expand All @@ -67,5 +67,5 @@ if '__main__' == __name__:
graph.to_plotly().show()

```
The "show" method will open a window in your preferred web browser for each post-processing graph associated with the use case.
There may be variations in typographies or policies compared to the SoSTrades GUI rendering.
The "show" method will open a window in your preferred web browser for each post-processing graph associated with the use case.
There may be variations in typographies or policies compared to the SoSTrades GUI rendering.
2 changes: 1 addition & 1 deletion docs/source/how-to/plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ So i need to:
* Create a postprocessing for the model results
* Test my model to be able to contribute
* Create a Process using my model
* Create a Usecase to define input data for my study
* Create a Usecase to define input data for my study
6 changes: 3 additions & 3 deletions docs/source/how-to/test-wrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Usually tested features are :
* Execution correctness
* Post-processing beauty
* ...
*
*


### Example test
Expand All @@ -40,7 +40,7 @@ class MyCustomWrapTest(unittest.TestCase):
def test_01_wrap_execution(self):
# Get the wrap builder
wrap_builder = self.ee.factory.get_builder_from_module(self.wrap_name, self.wrap_path )

# Set it to be built directly under the root coupling node
self.ee.factory.set_builders_to_coupling_builder(wrap_builder)

Expand Down Expand Up @@ -74,4 +74,4 @@ class MyCustomWrapTest(unittest.TestCase):
y = self.ee.dm.get_value(self.name + ".y")
self.assertEqual(y, a * x + b)

```
```
Loading

0 comments on commit c873714

Please sign in to comment.