From 802d68263d2c5a6f1fd954dae2d967967a8fdf0e Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Sat, 21 Sep 2024 12:17:14 +0200 Subject: [PATCH] Cleanup --- ChangeLog | 5 +-- doc/conf.py | 3 +- doc/examples/README.txt | 4 +-- doc/examples/examples.rst | 8 +++++ doc/examples/plot_draw_cross_cuts.py | 5 +-- doc/examples/plot_drawevent.py | 2 +- doc/examples/plot_uncecomp_ot_examples.py | 14 ++++---- .../reliability_problems/plot_case_rs.py | 16 +++++---- .../plot_four_branch_serial_system_waarts.py | 2 +- .../plot_reliability_benchmark_table.py | 2 +- .../reliability_problems/plot_rp110.py | 4 +-- .../reliability_problems/plot_rp111.py | 4 +-- .../reliability_problems/plot_rp22.py | 7 ++-- .../reliability_problems/plot_rp24.py | 4 +-- .../reliability_problems/plot_rp25.py | 4 +-- .../reliability_problems/plot_rp28.py | 6 ++-- .../reliability_problems/plot_rp31.py | 2 +- .../reliability_problems/plot_rp35.py | 6 ++-- .../reliability_problems/plot_rp53.py | 3 +- .../reliability_problems/plot_rp55.py | 13 +++---- .../reliability_problems/plot_rp57.py | 2 +- .../reliability_problems/plot_rp75.py | 6 ++-- .../reliability_problems/plot_rp89.py | 15 ++++---- .../plot_oakleyohagan_sensitivity.py | 8 +++-- .../plot_print_problems.py | 6 ++-- doc/index.rst | 2 +- examples/scripts/analytical_functions.py | 1 - examples/scripts/approximation_methods.py | 1 - .../compute_reference_Borehole_indices.py | 1 - .../compute_reference_Flooding_indices.py | 1 - .../compute_reference_Morris_indices.py | 1 - .../compute_reference_NLOscillator_indices.py | 1 - .../compute_reference_OakleyOHagan_indices.py | 1 - .../generate_reference_Morris_parameters.py | 1 - examples/scripts/ishigami-classeOTPFun.py | 1 - examples/scripts/simulation_methods.py | 1 - examples/scripts/test-computeCDF.py | 1 - examples/scripts/testCrue-classeOTPFun.py | 1 - otbenchmark/ReliabilityLibrary.py | 1 - otbenchmark/SensitivityLibrary.py | 2 -- otbenchmark/_ConditionalDistribution.py | 2 -- otbenchmark/_CrossCutDistribution.py | 2 -- otbenchmark/_CrossCutFunction.py | 2 -- otbenchmark/_DrawEvent.py | 1 - otbenchmark/_FORM.py | 1 - otbenchmark/_JanonSensitivityAlgorithm.py | 2 -- otbenchmark/_LHS.py | 1 - otbenchmark/_MorrisSensitivity.py | 2 -- .../_ProbabilitySimulationAlgorithmFactory.py | 1 - .../_ReliabilityBenchmarkMetaAlgorithm.py | 1 - otbenchmark/_ReliabilityBenchmarkResult.py | 1 - otbenchmark/_ReliabilityProblem107.py | 1 - otbenchmark/_ReliabilityProblem110.py | 1 - otbenchmark/_ReliabilityProblem111.py | 1 - otbenchmark/_ReliabilityProblem14.py | 1 - otbenchmark/_ReliabilityProblem24.py | 1 - otbenchmark/_ReliabilityProblem25.py | 1 - otbenchmark/_ReliabilityProblem28.py | 1 - otbenchmark/_ReliabilityProblem31.py | 1 - otbenchmark/_ReliabilityProblem33.py | 1 - otbenchmark/_ReliabilityProblem35.py | 1 - otbenchmark/_ReliabilityProblem38.py | 1 - otbenchmark/_ReliabilityProblem54.py | 1 - otbenchmark/_ReliabilityProblem55.py | 1 - otbenchmark/_ReliabilityProblem57.py | 1 - otbenchmark/_ReliabilityProblem60.py | 1 - otbenchmark/_ReliabilityProblem63.py | 1 - otbenchmark/_ReliabilityProblem75.py | 1 - otbenchmark/_ReliabilityProblem77.py | 1 - otbenchmark/_ReliabilityProblem8.py | 1 - otbenchmark/_ReliabilityProblem89.py | 1 - otbenchmark/_ReliabilityProblem91.py | 1 - otbenchmark/_SORM.py | 1 - .../_SensitivityBenchmarkMetaAlgorithm.py | 1 - otbenchmark/_SensitivityConvergence.py | 2 -- otbenchmark/_SensitivityDistribution.py | 2 -- ...parsePolynomialChaosSensitivityAnalysis.py | 2 -- otbenchmark/_SubsetSampling.py | 1 - otbenchmark/__init__.py | 2 +- pyproject.toml | 34 +++++++++++++++++++ setup.py | 4 +-- tests/demo_axialbeam.py | 1 - tests/demo_ishigami.py | 1 - tests/test_ConditionalDistribution.py | 1 - tests/test_CrossCutDistribution.py | 1 - tests/test_CrossCutFunction.py | 1 - tests/test_DrawEvent.py | 1 - tests/test_FORM.py | 1 - tests/test_FourBranchSerialSystem.py | 1 - tests/test_JanonSensitivityAlgorithm.py | 1 - ...t_ProbabilitySimulationAlgorithmFactory.py | 1 - tests/test_RelabilityProblem14.py | 1 - tests/test_RelabilityProblem53.py | 1 - tests/test_RelabilityProblem54.py | 1 - tests/test_RelabilityProblem60.py | 1 - tests/test_RelabilityProblem63.py | 1 - tests/test_RelabilityProblem77.py | 1 - tests/test_RelabilityProblem8.py | 1 - tests/test_RelabilityProblem91.py | 1 - .../test_ReliabilityBenchmarkMetaAlgorithm.py | 1 - tests/test_ReliabilityBenchmarkProblem.py | 1 - tests/test_ReliabilityLibrary.py | 1 - tests/test_ReliabilityProblem107.py | 1 - tests/test_ReliabilityProblem110.py | 1 - tests/test_ReliabilityProblem111.py | 1 - tests/test_ReliabilityProblem22.py | 2 -- tests/test_ReliabilityProblem24.py | 1 - tests/test_ReliabilityProblem25.py | 1 - tests/test_ReliabilityProblem28.py | 1 - tests/test_ReliabilityProblem31.py | 1 - tests/test_ReliabilityProblem33.py | 1 - tests/test_ReliabilityProblem35.py | 1 - tests/test_ReliabilityProblem38.py | 1 - tests/test_ReliabilityProblem53.py | 1 - tests/test_ReliabilityProblem55.py | 1 - tests/test_ReliabilityProblem57.py | 1 - tests/test_ReliabilityProblem75.py | 1 - tests/test_ReliabilityProblem89.py | 1 - tests/test_RminusS.py | 1 - tests/test_SORM.py | 1 - .../test_SensitivityBenchmarkMetaAlgorithm.py | 1 - tests/test_SensitivityConvergence.py | 1 - tests/test_SensitivityDistribution.py | 1 - tests/test_SensitivityLibrary.py | 1 - tests/test_SubsetSampling.py | 1 - tests/test_axialbeam.py | 1 - tests/test_borehole_SA.py | 1 - tests/test_borgonovo.py | 1 - tests/test_dirichlet.py | 1 - tests/test_flooding.py | 1 - tests/test_gaussianproduct.py | 1 - tests/test_gaussiansum.py | 1 - tests/test_gsobol.py | 1 - tests/test_ishigami.py | 1 - tests/test_morris.py | 1 - tests/test_nloscillator_SA.py | 1 - tests/test_oakleyohagan.py | 1 - 137 files changed, 122 insertions(+), 189 deletions(-) create mode 100644 doc/examples/examples.rst diff --git a/ChangeLog b/ChangeLog index 9fd0c6a..5b17035 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -== 0.2 release (in-progress) == +== 0.2 release (2024-09-21) == - Fixed the number of X points in DrawEvent.draw() (PR #90) - Added Uncecomp 2021 examples in Jupyter Notebooks. @@ -13,7 +13,8 @@ - Added Borehole function for SA. - Fixed reference values of reliability problems: RP14, RP22, RP25, RP31, RP35, RP75, FourBranch. -- Updated to OpenTURNS v1.17. +- Updated to OpenTURNS v1.23 +- Sphinx documentation == 0.1.1 release == diff --git a/doc/conf.py b/doc/conf.py index 4cb20d3..04c3f6d 100755 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # otbenchmark documentation build configuration file, created by # sphinx-quickstart on Fri Jun 19 15:57:39 2015. @@ -48,7 +47,7 @@ 'examples_dirs': ['examples'], 'gallery_dirs': ['auto_examples'], 'show_signature': False, - 'ignore_pattern': 'rp8.py|rp33|drawevent|draw_cross_cuts|plot_bbrc' + 'ignore_pattern': 'plot_bbrc' } if Version(sphinx_gallery.__version__) >= Version("0.17.0"): diff --git a/doc/examples/README.txt b/doc/examples/README.txt index 7d4d0aa..8876bb2 100644 --- a/doc/examples/README.txt +++ b/doc/examples/README.txt @@ -1,2 +1,2 @@ -Examples -======== \ No newline at end of file +General examples +================ \ No newline at end of file diff --git a/doc/examples/examples.rst b/doc/examples/examples.rst new file mode 100644 index 0000000..5f8ddba --- /dev/null +++ b/doc/examples/examples.rst @@ -0,0 +1,8 @@ +======== +Examples +======== + +.. toctree:: + :maxdepth: 2 + + ../auto_examples/index.rst diff --git a/doc/examples/plot_draw_cross_cuts.py b/doc/examples/plot_draw_cross_cuts.py index efc74e5..509b534 100644 --- a/doc/examples/plot_draw_cross_cuts.py +++ b/doc/examples/plot_draw_cross_cuts.py @@ -21,8 +21,9 @@ event = problem.getEvent() g = event.getFunction() - -# ## Compute the bounds of the domain +# %% +# Compute the bounds of the domain +# -------------------------------- # %% inputVector = event.getAntecedent() diff --git a/doc/examples/plot_drawevent.py b/doc/examples/plot_drawevent.py index f39c5d3..68dfe83 100644 --- a/doc/examples/plot_drawevent.py +++ b/doc/examples/plot_drawevent.py @@ -96,7 +96,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/plot_uncecomp_ot_examples.py b/doc/examples/plot_uncecomp_ot_examples.py index 4487685..b700536 100644 --- a/doc/examples/plot_uncecomp_ot_examples.py +++ b/doc/examples/plot_uncecomp_ot_examples.py @@ -3,12 +3,14 @@ ================================= """ +# %% # In the otbenchmark package, we use several objects that must be known in order to distinguish which objects # come from the OpenTURNS library or from otbenchmark. # For reliability problems, there are three objects that cannot be ignored: -# * the `Distribution`, -# * the `Function`, -# * the `ThresholdEvent`. +# +# * the :class:`openturns.Distribution`, +# * the :class:`openturns.Function`, +# * the :class:`openturns.ThresholdEvent`. # # %% @@ -85,7 +87,7 @@ graph.setLegendPosition("topright") graph.setColors(ot.Drawable.BuildDefaultPalette(2)) view = otv.View(graph, figure_kw={"figsize": (4.5, 3.5)}) -view.save("two_samples.pdf") +# view.save("two_samples.pdf") # %% # Function @@ -143,7 +145,7 @@ graph.add(curve) graph.setColors(ot.Drawable.BuildDefaultPalette(2)) view = otv.View(graph, figure_kw={"figsize": (4.5, 3.5)}) -view.save("histo_output.pdf") +# view.save("histo_output.pdf") # %% graph = ot.KernelSmoothing().build(outputSample_ind).drawPDF() @@ -154,7 +156,7 @@ graph.add(curve) graph.setColors(ot.Drawable.BuildDefaultPalette(2)) view = otv.View(graph, figure_kw={"figsize": (4.5, 3.5)}) -view.save("kernel_output.pdf") +# view.save("kernel_output.pdf") # %% # ThresholdEvent diff --git a/doc/examples/reliability_problems/plot_case_rs.py b/doc/examples/reliability_problems/plot_case_rs.py index 61593b2..325ec99 100644 --- a/doc/examples/reliability_problems/plot_case_rs.py +++ b/doc/examples/reliability_problems/plot_case_rs.py @@ -46,7 +46,8 @@ print("%.1f %% confidence interval :[%.4f,%.4f] " % (level * 100, pmin, pmax)) # %% -# ## Plot the contours of the function +# Plot the contours of the function +# --------------------------------- # %% inputVector = event.getAntecedent() @@ -81,7 +82,8 @@ _ = otv.View(distribution.drawPDF()) # %% -# ## Visualise the safe and unsafe regions on a sample +# Visualise the safe and unsafe regions on a sample +# ------------------------------------------------- # %% sampleSize = 500 @@ -91,10 +93,11 @@ # %% cloud = drawEvent.drawSampleCrossCut(sampleSize) -cloud +_ = otv.View(cloud) # %% -# ## Draw the limit state surface +# Draw the limit state surface +# ---------------------------- # %% bounds = ot.Interval(lowerBound, upperBound) @@ -104,10 +107,11 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% -# ## Fill the event domain with a color +# Fill the event domain with a color +# ---------------------------------- # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_four_branch_serial_system_waarts.py b/doc/examples/reliability_problems/plot_four_branch_serial_system_waarts.py index 86dfe58..6915ef7 100644 --- a/doc/examples/reliability_problems/plot_four_branch_serial_system_waarts.py +++ b/doc/examples/reliability_problems/plot_four_branch_serial_system_waarts.py @@ -61,7 +61,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% # Fill the event domain with a color diff --git a/doc/examples/reliability_problems/plot_reliability_benchmark_table.py b/doc/examples/reliability_problems/plot_reliability_benchmark_table.py index b0659f5..fbe47a2 100644 --- a/doc/examples/reliability_problems/plot_reliability_benchmark_table.py +++ b/doc/examples/reliability_problems/plot_reliability_benchmark_table.py @@ -149,7 +149,7 @@ results[i][5] = benchmarkResult.computedProbability df = pd.DataFrame(results, index=problem_names, columns=metrics) -df.to_csv("reliability_benchmark_table-output.csv") +# df.to_csv("reliability_benchmark_table-output.csv") df # %% diff --git a/doc/examples/reliability_problems/plot_rp110.py b/doc/examples/reliability_problems/plot_rp110.py index 8693e03..c7f1508 100644 --- a/doc/examples/reliability_problems/plot_rp110.py +++ b/doc/examples/reliability_problems/plot_rp110.py @@ -67,7 +67,7 @@ nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) figure.setTitle(" Iso-values of limit state function") -figure +_ = otv.View(figure) # %% # Print the iso-values of the distribution @@ -95,7 +95,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp111.py b/doc/examples/reliability_problems/plot_rp111.py index f7d5589..639d107 100644 --- a/doc/examples/reliability_problems/plot_rp111.py +++ b/doc/examples/reliability_problems/plot_rp111.py @@ -62,7 +62,7 @@ nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) figure.setTitle(" Iso-values of limit state function") -figure +_ = otv.View(figure) # %% _ = otv.View(distribution.drawPDF()) @@ -85,7 +85,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp22.py b/doc/examples/reliability_problems/plot_rp22.py index fb77d43..49a46c9 100644 --- a/doc/examples/reliability_problems/plot_rp22.py +++ b/doc/examples/reliability_problems/plot_rp22.py @@ -68,8 +68,8 @@ # %% nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) -figure.setTitle(" Iso-values of limit state function") -figure +figure.setTitle("Iso-values of limit state function") +_ = otv.View(figure) # %% # Print the iso-values of the distribution @@ -99,8 +99,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph - +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp24.py b/doc/examples/reliability_problems/plot_rp24.py index 9bd9de4..aedbc06 100644 --- a/doc/examples/reliability_problems/plot_rp24.py +++ b/doc/examples/reliability_problems/plot_rp24.py @@ -67,7 +67,7 @@ nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) figure.setTitle(" Iso-values of limit state function") -figure +_ = otv.View(figure) # %% # Print the iso-values of the distribution @@ -94,7 +94,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% diff --git a/doc/examples/reliability_problems/plot_rp25.py b/doc/examples/reliability_problems/plot_rp25.py index 75aa79c..ac8a793 100644 --- a/doc/examples/reliability_problems/plot_rp25.py +++ b/doc/examples/reliability_problems/plot_rp25.py @@ -62,7 +62,7 @@ nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) figure.setTitle(" Iso-values of limit state function") -figure +_ = otv.View(figure) # %% # Print the iso-values of the distribution @@ -86,7 +86,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp28.py b/doc/examples/reliability_problems/plot_rp28.py index 8495e88..262b8de 100644 --- a/doc/examples/reliability_problems/plot_rp28.py +++ b/doc/examples/reliability_problems/plot_rp28.py @@ -77,8 +77,8 @@ # %% nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) -figure.setTitle(" Iso-values of limit state function") -figure +figure.setTitle("Iso-values of limit state function") +_ = otv.View(figure) # %% # Print the iso-values of the distribution @@ -106,7 +106,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp31.py b/doc/examples/reliability_problems/plot_rp31.py index 2a9b9f3..e0d8712 100644 --- a/doc/examples/reliability_problems/plot_rp31.py +++ b/doc/examples/reliability_problems/plot_rp31.py @@ -86,7 +86,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp35.py b/doc/examples/reliability_problems/plot_rp35.py index 077b799..d5be993 100644 --- a/doc/examples/reliability_problems/plot_rp35.py +++ b/doc/examples/reliability_problems/plot_rp35.py @@ -65,8 +65,8 @@ # %% nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) -figure.setTitle(" Iso-values of limit state function") -figure +figure.setTitle("Iso-values of limit state function") +_ = otv.View(figure) # %% # Print the iso-values of the distribution @@ -95,7 +95,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp53.py b/doc/examples/reliability_problems/plot_rp53.py index 8981a64..334d9a7 100644 --- a/doc/examples/reliability_problems/plot_rp53.py +++ b/doc/examples/reliability_problems/plot_rp53.py @@ -81,14 +81,13 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) _ = otv.View(domain) - # %% domain.add(cloud) _ = otv.View(domain) diff --git a/doc/examples/reliability_problems/plot_rp55.py b/doc/examples/reliability_problems/plot_rp55.py index 9a09c1c..79ccac7 100644 --- a/doc/examples/reliability_problems/plot_rp55.py +++ b/doc/examples/reliability_problems/plot_rp55.py @@ -57,11 +57,11 @@ # %% nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) -figure.setTitle(" Iso-values of limit state function") -figure +figure.setTitle("Iso-values of limit state function") +_ = otv.View(figure) # %% -# Print the iso-values of the distribution +# Plot the iso-values of the distribution # ---------------------------------------- # %% @@ -77,10 +77,11 @@ # %% cloud = drawEvent.drawSampleCrossCut(sampleSize) -cloud +_ = otv.View(cloud) # %% -# ## Draw the limit state surface +# Draw the limit state surface +# ---------------------------- # %% bounds = ot.Interval(lowerBound, upperBound) @@ -90,7 +91,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% diff --git a/doc/examples/reliability_problems/plot_rp57.py b/doc/examples/reliability_problems/plot_rp57.py index 9df6b87..1d36d9b 100644 --- a/doc/examples/reliability_problems/plot_rp57.py +++ b/doc/examples/reliability_problems/plot_rp57.py @@ -87,7 +87,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp75.py b/doc/examples/reliability_problems/plot_rp75.py index 4c4a2e9..b89369f 100644 --- a/doc/examples/reliability_problems/plot_rp75.py +++ b/doc/examples/reliability_problems/plot_rp75.py @@ -70,8 +70,8 @@ # %% nbPoints = [100, 100] figure = g.draw(lowerBound, upperBound, nbPoints) -figure.setTitle(" Iso-values of limit state function") -figure +figure.setTitle("Iso-values of limit state function") +_ = otv.View(figure) # %% # Print the iso-values of the distribution @@ -99,7 +99,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/reliability_problems/plot_rp89.py b/doc/examples/reliability_problems/plot_rp89.py index 8462514..799f51e 100644 --- a/doc/examples/reliability_problems/plot_rp89.py +++ b/doc/examples/reliability_problems/plot_rp89.py @@ -63,13 +63,13 @@ # %% nbPoints = [100, 100] -figure = g.draw(lowerBound, upperBound, nbPoints) -figure.setTitle(" Iso-values of limit state function") -figure +graph = g.draw(lowerBound, upperBound, nbPoints) +graph.setTitle("Iso-values of limit state function") +_ = otv.View(graph) # %% -# Print the iso-values of the distribution -# ---------------------------------------- +# Plot the iso-values of the distribution +# --------------------------------------- # %% _ = otv.View(distribution.drawPDF()) @@ -83,7 +83,8 @@ _ = otv.View(cloud) # %% -# ## Draw the limit state surface +# Draw the limit state surface +# ---------------------------- # %% bounds = ot.Interval(lowerBound, upperBound) @@ -92,7 +93,7 @@ # %% graph = drawEvent.drawLimitStateCrossCut(bounds) graph.add(cloud) -graph +_ = otv.View(graph) # %% domain = drawEvent.fillEventCrossCut(bounds) diff --git a/doc/examples/sensitivity_problems/plot_oakleyohagan_sensitivity.py b/doc/examples/sensitivity_problems/plot_oakleyohagan_sensitivity.py index 47c8023..25f18fb 100644 --- a/doc/examples/sensitivity_problems/plot_oakleyohagan_sensitivity.py +++ b/doc/examples/sensitivity_problems/plot_oakleyohagan_sensitivity.py @@ -25,8 +25,9 @@ exact_total_order = problem.getTotalOrderIndices() print(exact_total_order) - -# ## Plot the function +# %% +# Plot the function +# ----------------- # %% # Create X/Y data @@ -62,7 +63,8 @@ _ = otv.View(output_distribution.drawPDF()) # %% -# ## Perform sensitivity analysis +# Perform sensitivity analysis +# ---------------------------- # %% # Create X/Y data diff --git a/doc/examples/sensitivity_problems/plot_print_problems.py b/doc/examples/sensitivity_problems/plot_print_problems.py index 1164ac3..16150aa 100644 --- a/doc/examples/sensitivity_problems/plot_print_problems.py +++ b/doc/examples/sensitivity_problems/plot_print_problems.py @@ -51,6 +51,6 @@ # %% latex_code = df_problems_list.to_latex() -text_file = open("sensitivity_problems_list.tex", "w") -text_file.write(latex_code) -text_file.close() +# text_file = open("sensitivity_problems_list.tex", "w") +# text_file.write(latex_code) +# text_file.close() diff --git a/doc/index.rst b/doc/index.rst index 9fc8066..7b18290 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -8,7 +8,7 @@ User documentation :maxdepth: 2 user_manual/user_manual - ../auto_examples/index.rst + examples/examples Indices and tables ================== diff --git a/examples/scripts/analytical_functions.py b/examples/scripts/analytical_functions.py index f56c86e..d59ba29 100644 --- a/examples/scripts/analytical_functions.py +++ b/examples/scripts/analytical_functions.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- def gfun_22(x): diff --git a/examples/scripts/approximation_methods.py b/examples/scripts/approximation_methods.py index 732711f..b69f85a 100644 --- a/examples/scripts/approximation_methods.py +++ b/examples/scripts/approximation_methods.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- import openturns as ot diff --git a/examples/scripts/compute_reference_Borehole_indices.py b/examples/scripts/compute_reference_Borehole_indices.py index f21fbc5..f1b03b5 100644 --- a/examples/scripts/compute_reference_Borehole_indices.py +++ b/examples/scripts/compute_reference_Borehole_indices.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Compute reference Borehole Sobol' indices. """ diff --git a/examples/scripts/compute_reference_Flooding_indices.py b/examples/scripts/compute_reference_Flooding_indices.py index 35d4a28..089e828 100644 --- a/examples/scripts/compute_reference_Flooding_indices.py +++ b/examples/scripts/compute_reference_Flooding_indices.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Compute reference Flooding Sobol' indices. """ diff --git a/examples/scripts/compute_reference_Morris_indices.py b/examples/scripts/compute_reference_Morris_indices.py index 96bc20d..96bbc85 100644 --- a/examples/scripts/compute_reference_Morris_indices.py +++ b/examples/scripts/compute_reference_Morris_indices.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Compute reference Morris Sobol' indices. """ diff --git a/examples/scripts/compute_reference_NLOscillator_indices.py b/examples/scripts/compute_reference_NLOscillator_indices.py index 7d38868..1cfc84a 100644 --- a/examples/scripts/compute_reference_NLOscillator_indices.py +++ b/examples/scripts/compute_reference_NLOscillator_indices.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Compute reference NLOscillator Sobol' indices. """ diff --git a/examples/scripts/compute_reference_OakleyOHagan_indices.py b/examples/scripts/compute_reference_OakleyOHagan_indices.py index 2e8d23d..8a1cec4 100644 --- a/examples/scripts/compute_reference_OakleyOHagan_indices.py +++ b/examples/scripts/compute_reference_OakleyOHagan_indices.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Compute reference OakleyOHagan Sobol' indices. """ diff --git a/examples/scripts/generate_reference_Morris_parameters.py b/examples/scripts/generate_reference_Morris_parameters.py index 9c09a21..df10b32 100644 --- a/examples/scripts/generate_reference_Morris_parameters.py +++ b/examples/scripts/generate_reference_Morris_parameters.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Generate reference Morris Sobol' parameters. """ diff --git a/examples/scripts/ishigami-classeOTPFun.py b/examples/scripts/ishigami-classeOTPFun.py index d91817e..f828107 100644 --- a/examples/scripts/ishigami-classeOTPFun.py +++ b/examples/scripts/ishigami-classeOTPFun.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Pour OT v1.1 diff --git a/examples/scripts/simulation_methods.py b/examples/scripts/simulation_methods.py index d647b80..bde6745 100644 --- a/examples/scripts/simulation_methods.py +++ b/examples/scripts/simulation_methods.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- import openturns as ot diff --git a/examples/scripts/test-computeCDF.py b/examples/scripts/test-computeCDF.py index 51db52c..2fb26d0 100755 --- a/examples/scripts/test-computeCDF.py +++ b/examples/scripts/test-computeCDF.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ This script shows how to use the computeCDF method in order to compute exact probabilities using Distribution arithmetic. diff --git a/examples/scripts/testCrue-classeOTPFun.py b/examples/scripts/testCrue-classeOTPFun.py index 7e4e10b..e28f380 100644 --- a/examples/scripts/testCrue-classeOTPFun.py +++ b/examples/scripts/testCrue-classeOTPFun.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from openturns.viewer import View import openturns as ot diff --git a/otbenchmark/ReliabilityLibrary.py b/otbenchmark/ReliabilityLibrary.py index 2bc4fc6..b19acda 100644 --- a/otbenchmark/ReliabilityLibrary.py +++ b/otbenchmark/ReliabilityLibrary.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Manage reliability problems. """ diff --git a/otbenchmark/SensitivityLibrary.py b/otbenchmark/SensitivityLibrary.py index f867d6e..4c1dd0f 100644 --- a/otbenchmark/SensitivityLibrary.py +++ b/otbenchmark/SensitivityLibrary.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Manage sensitivity problems. """ diff --git a/otbenchmark/_ConditionalDistribution.py b/otbenchmark/_ConditionalDistribution.py index e4f67d6..cadfb18 100644 --- a/otbenchmark/_ConditionalDistribution.py +++ b/otbenchmark/_ConditionalDistribution.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ A class to create a conditional distribution. """ diff --git a/otbenchmark/_CrossCutDistribution.py b/otbenchmark/_CrossCutDistribution.py index ad3df78..d141df7 100644 --- a/otbenchmark/_CrossCutDistribution.py +++ b/otbenchmark/_CrossCutDistribution.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Created on Sun Jun 21 17:23:25 2020 diff --git a/otbenchmark/_CrossCutFunction.py b/otbenchmark/_CrossCutFunction.py index ada8c7f..cade1ee 100644 --- a/otbenchmark/_CrossCutFunction.py +++ b/otbenchmark/_CrossCutFunction.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Create a drawable cross-cut function. """ diff --git a/otbenchmark/_DrawEvent.py b/otbenchmark/_DrawEvent.py index aa9b5f9..f7bb366 100644 --- a/otbenchmark/_DrawEvent.py +++ b/otbenchmark/_DrawEvent.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Static methods to plot reliability problems. """ diff --git a/otbenchmark/_FORM.py b/otbenchmark/_FORM.py index 5850146..3da9238 100644 --- a/otbenchmark/_FORM.py +++ b/otbenchmark/_FORM.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Create a FORM object. """ diff --git a/otbenchmark/_JanonSensitivityAlgorithm.py b/otbenchmark/_JanonSensitivityAlgorithm.py index d3ba3fb..f6c0fe7 100644 --- a/otbenchmark/_JanonSensitivityAlgorithm.py +++ b/otbenchmark/_JanonSensitivityAlgorithm.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Estimates Sobol' indices with Janon estimator. diff --git a/otbenchmark/_LHS.py b/otbenchmark/_LHS.py index dc11a99..4e787f3 100644 --- a/otbenchmark/_LHS.py +++ b/otbenchmark/_LHS.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Create a LHS object. """ diff --git a/otbenchmark/_MorrisSensitivity.py b/otbenchmark/_MorrisSensitivity.py index 12c9169..1b1965a 100644 --- a/otbenchmark/_MorrisSensitivity.py +++ b/otbenchmark/_MorrisSensitivity.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ The non-monotonic function of Morris f: R^20 -> R. """ diff --git a/otbenchmark/_ProbabilitySimulationAlgorithmFactory.py b/otbenchmark/_ProbabilitySimulationAlgorithmFactory.py index e8a1cc8..99f70ff 100644 --- a/otbenchmark/_ProbabilitySimulationAlgorithmFactory.py +++ b/otbenchmark/_ProbabilitySimulationAlgorithmFactory.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Create a ProbabilitySimulationAlgorithm based on a reliability problem. """ diff --git a/otbenchmark/_ReliabilityBenchmarkMetaAlgorithm.py b/otbenchmark/_ReliabilityBenchmarkMetaAlgorithm.py index 941ac2c..39e4f37 100644 --- a/otbenchmark/_ReliabilityBenchmarkMetaAlgorithm.py +++ b/otbenchmark/_ReliabilityBenchmarkMetaAlgorithm.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Manage reliability problems. """ diff --git a/otbenchmark/_ReliabilityBenchmarkResult.py b/otbenchmark/_ReliabilityBenchmarkResult.py index 9ac0a0b..b3b5f73 100644 --- a/otbenchmark/_ReliabilityBenchmarkResult.py +++ b/otbenchmark/_ReliabilityBenchmarkResult.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Manage reliability problems. """ diff --git a/otbenchmark/_ReliabilityProblem107.py b/otbenchmark/_ReliabilityProblem107.py index 4c2bdd0..96ef42e 100644 --- a/otbenchmark/_ReliabilityProblem107.py +++ b/otbenchmark/_ReliabilityProblem107.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 14:39:26 2020 diff --git a/otbenchmark/_ReliabilityProblem110.py b/otbenchmark/_ReliabilityProblem110.py index f6a5404..c7f41b8 100644 --- a/otbenchmark/_ReliabilityProblem110.py +++ b/otbenchmark/_ReliabilityProblem110.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Thu Apr 23 11:05:38 2020 diff --git a/otbenchmark/_ReliabilityProblem111.py b/otbenchmark/_ReliabilityProblem111.py index 41a7b44..d2b2a22 100644 --- a/otbenchmark/_ReliabilityProblem111.py +++ b/otbenchmark/_ReliabilityProblem111.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 12:05:01 2020 diff --git a/otbenchmark/_ReliabilityProblem14.py b/otbenchmark/_ReliabilityProblem14.py index fa56605..db44d68 100644 --- a/otbenchmark/_ReliabilityProblem14.py +++ b/otbenchmark/_ReliabilityProblem14.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 11:50:49 2020 diff --git a/otbenchmark/_ReliabilityProblem24.py b/otbenchmark/_ReliabilityProblem24.py index 0585a6d..6f52b8c 100644 --- a/otbenchmark/_ReliabilityProblem24.py +++ b/otbenchmark/_ReliabilityProblem24.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 11:18:59 2020 diff --git a/otbenchmark/_ReliabilityProblem25.py b/otbenchmark/_ReliabilityProblem25.py index a2f9cab..f565998 100644 --- a/otbenchmark/_ReliabilityProblem25.py +++ b/otbenchmark/_ReliabilityProblem25.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 11:18:59 2020 diff --git a/otbenchmark/_ReliabilityProblem28.py b/otbenchmark/_ReliabilityProblem28.py index 847df0e..349b491 100644 --- a/otbenchmark/_ReliabilityProblem28.py +++ b/otbenchmark/_ReliabilityProblem28.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 11:18:59 2020 diff --git a/otbenchmark/_ReliabilityProblem31.py b/otbenchmark/_ReliabilityProblem31.py index a5f6400..61dee0d 100644 --- a/otbenchmark/_ReliabilityProblem31.py +++ b/otbenchmark/_ReliabilityProblem31.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 12:32:41 2020 diff --git a/otbenchmark/_ReliabilityProblem33.py b/otbenchmark/_ReliabilityProblem33.py index 9940777..28de850 100644 --- a/otbenchmark/_ReliabilityProblem33.py +++ b/otbenchmark/_ReliabilityProblem33.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 28 10:21:03 2020 diff --git a/otbenchmark/_ReliabilityProblem35.py b/otbenchmark/_ReliabilityProblem35.py index aefa074..4f73aff 100644 --- a/otbenchmark/_ReliabilityProblem35.py +++ b/otbenchmark/_ReliabilityProblem35.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 12:42:15 2020 diff --git a/otbenchmark/_ReliabilityProblem38.py b/otbenchmark/_ReliabilityProblem38.py index b6423a3..4362c2f 100644 --- a/otbenchmark/_ReliabilityProblem38.py +++ b/otbenchmark/_ReliabilityProblem38.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 12:45:56 2020 diff --git a/otbenchmark/_ReliabilityProblem54.py b/otbenchmark/_ReliabilityProblem54.py index 0b6c82f..b207891 100644 --- a/otbenchmark/_ReliabilityProblem54.py +++ b/otbenchmark/_ReliabilityProblem54.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 14:20:07 2020 diff --git a/otbenchmark/_ReliabilityProblem55.py b/otbenchmark/_ReliabilityProblem55.py index c689fb0..4a0f518 100644 --- a/otbenchmark/_ReliabilityProblem55.py +++ b/otbenchmark/_ReliabilityProblem55.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 10:22:51 2020 diff --git a/otbenchmark/_ReliabilityProblem57.py b/otbenchmark/_ReliabilityProblem57.py index 48581b7..1133a47 100644 --- a/otbenchmark/_ReliabilityProblem57.py +++ b/otbenchmark/_ReliabilityProblem57.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 10:52:22 2020 diff --git a/otbenchmark/_ReliabilityProblem60.py b/otbenchmark/_ReliabilityProblem60.py index 155072f..30ca593 100644 --- a/otbenchmark/_ReliabilityProblem60.py +++ b/otbenchmark/_ReliabilityProblem60.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue May 5 12:56:49 2020 diff --git a/otbenchmark/_ReliabilityProblem63.py b/otbenchmark/_ReliabilityProblem63.py index 829a9a9..fa71213 100644 --- a/otbenchmark/_ReliabilityProblem63.py +++ b/otbenchmark/_ReliabilityProblem63.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon May 4 13:14:27 2020 diff --git a/otbenchmark/_ReliabilityProblem75.py b/otbenchmark/_ReliabilityProblem75.py index 812a86a..e0c9060 100644 --- a/otbenchmark/_ReliabilityProblem75.py +++ b/otbenchmark/_ReliabilityProblem75.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 11:22:56 2020 diff --git a/otbenchmark/_ReliabilityProblem77.py b/otbenchmark/_ReliabilityProblem77.py index 2009662..071bf1a 100644 --- a/otbenchmark/_ReliabilityProblem77.py +++ b/otbenchmark/_ReliabilityProblem77.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed May 6 10:58:15 2020 diff --git a/otbenchmark/_ReliabilityProblem8.py b/otbenchmark/_ReliabilityProblem8.py index 21b7cd0..e9ebbd5 100644 --- a/otbenchmark/_ReliabilityProblem8.py +++ b/otbenchmark/_ReliabilityProblem8.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 11:26:53 2020 diff --git a/otbenchmark/_ReliabilityProblem89.py b/otbenchmark/_ReliabilityProblem89.py index 82c839a..a76f2c9 100644 --- a/otbenchmark/_ReliabilityProblem89.py +++ b/otbenchmark/_ReliabilityProblem89.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 11:39:49 2020 diff --git a/otbenchmark/_ReliabilityProblem91.py b/otbenchmark/_ReliabilityProblem91.py index af32bd8..1924808 100644 --- a/otbenchmark/_ReliabilityProblem91.py +++ b/otbenchmark/_ReliabilityProblem91.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Thu Apr 30 10:58:25 2020 diff --git a/otbenchmark/_SORM.py b/otbenchmark/_SORM.py index d331111..0b08bee 100644 --- a/otbenchmark/_SORM.py +++ b/otbenchmark/_SORM.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Create a SORM object. """ diff --git a/otbenchmark/_SensitivityBenchmarkMetaAlgorithm.py b/otbenchmark/_SensitivityBenchmarkMetaAlgorithm.py index 3fd15a5..d222f9d 100644 --- a/otbenchmark/_SensitivityBenchmarkMetaAlgorithm.py +++ b/otbenchmark/_SensitivityBenchmarkMetaAlgorithm.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Manage sensitivity problems. """ diff --git a/otbenchmark/_SensitivityConvergence.py b/otbenchmark/_SensitivityConvergence.py index 0a69300..1f090b1 100644 --- a/otbenchmark/_SensitivityConvergence.py +++ b/otbenchmark/_SensitivityConvergence.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Perform a convergence study of a sensitivity analysis estimator. """ diff --git a/otbenchmark/_SensitivityDistribution.py b/otbenchmark/_SensitivityDistribution.py index 64eda88..795d0e6 100644 --- a/otbenchmark/_SensitivityDistribution.py +++ b/otbenchmark/_SensitivityDistribution.py @@ -1,5 +1,3 @@ -#! /usr/bin/env python -# -*- coding: utf-8 -*- """ Analyses the distribution of Sobol' indices. """ diff --git a/otbenchmark/_SparsePolynomialChaosSensitivityAnalysis.py b/otbenchmark/_SparsePolynomialChaosSensitivityAnalysis.py index e8ebfbc..c9c8cfe 100644 --- a/otbenchmark/_SparsePolynomialChaosSensitivityAnalysis.py +++ b/otbenchmark/_SparsePolynomialChaosSensitivityAnalysis.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- """ Estimate sensitivity indices from sparse polynomial chaos with hyperbolic enumerate function and regression. diff --git a/otbenchmark/_SubsetSampling.py b/otbenchmark/_SubsetSampling.py index e0e21be..ddea4de 100644 --- a/otbenchmark/_SubsetSampling.py +++ b/otbenchmark/_SubsetSampling.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ A class to create a Subset algorithm. """ diff --git a/otbenchmark/__init__.py b/otbenchmark/__init__.py index 900d04a..414579d 100644 --- a/otbenchmark/__init__.py +++ b/otbenchmark/__init__.py @@ -125,4 +125,4 @@ "SensitivityDistribution", "JanonSensitivityAlgorithm", ] -__version__ = "1.0" +__version__ = "0.2" diff --git a/pyproject.toml b/pyproject.toml index e0b3400..fc46f21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,37 @@ +[project] +name = "otbenchmark" +version = "0.2" +dependencies = [ + "openturns>=1.23", + "matplotlib>=3", + "numpy<2", +] +requires-python = ">=3.8" +authors = [ + {name = "Michaël Baudin"}, + {name = "Youssef Jebroun"}, + {name = " Elias Fekhari"}, + {name = " Vincent Chabridon"}, +] +maintainers = [ + {name = "Michaël Baudin", email = "michael.baudin@edf.fr"} +] +description = "A benchmark library for OpenTURNS" +readme = "README.md" +license = {file = "LICENSE.LESSER"} +keywords = ["reliability", "sensitivity", "benchmark"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "License :: OSI Approved :: GNU Lesser General Public License (LGPL)", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "Natural Language :: French", + "Programming Language :: Python :: 3", + "Topic :: Software Development", + "Topic :: Scientific/Engineering", +] + [tool.black] line-length = 88 diff --git a/setup.py b/setup.py index dc4c08f..f661f4d 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( name="otbenchmark", keywords=["OpenTURNS", "benchmark"], - version="0.1.1", + version="0.2", packages=find_packages(), install_requires=["numpy<2", "matplotlib", "openturns>=1.23"], description="Benchmark problems for OpenTURNS", @@ -29,7 +29,7 @@ classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Console", - "License :: OSI Approved :: GNU General Public License (GPL)", + "License :: OSI Approved :: GNU Lesser General Public License (LGPL)", "Intended Audience :: Science/Research", "Intended Audience :: Developers", "Natural Language :: French", diff --git a/tests/demo_axialbeam.py b/tests/demo_axialbeam.py index 1dc22f8..b0e8538 100644 --- a/tests/demo_axialbeam.py +++ b/tests/demo_axialbeam.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """A demo of the AxialStressedBeamReliability class.""" import otbenchmark as otb diff --git a/tests/demo_ishigami.py b/tests/demo_ishigami.py index 4ec01e6..d9f3d7f 100644 --- a/tests/demo_ishigami.py +++ b/tests/demo_ishigami.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """A demo of the IshigamiSensitivity class.""" import otbenchmark as otb diff --git a/tests/test_ConditionalDistribution.py b/tests/test_ConditionalDistribution.py index 3acbad2..01b567c 100644 --- a/tests/test_ConditionalDistribution.py +++ b/tests/test_ConditionalDistribution.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for ConditionalDistribution class. diff --git a/tests/test_CrossCutDistribution.py b/tests/test_CrossCutDistribution.py index 7eff671..b2bef89 100644 --- a/tests/test_CrossCutDistribution.py +++ b/tests/test_CrossCutDistribution.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for ConditionalDistribution class. diff --git a/tests/test_CrossCutFunction.py b/tests/test_CrossCutFunction.py index 874fcb2..8fa93c2 100644 --- a/tests/test_CrossCutFunction.py +++ b/tests/test_CrossCutFunction.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for ConditionalDistribution class. diff --git a/tests/test_DrawEvent.py b/tests/test_DrawEvent.py index 4858af0..3621ee3 100644 --- a/tests/test_DrawEvent.py +++ b/tests/test_DrawEvent.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for DrawEvent class. diff --git a/tests/test_FORM.py b/tests/test_FORM.py index ec33514..ff2d364 100644 --- a/tests/test_FORM.py +++ b/tests/test_FORM.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for FORMFactory class. """ diff --git a/tests/test_FourBranchSerialSystem.py b/tests/test_FourBranchSerialSystem.py index e6604ca..62244ce 100644 --- a/tests/test_FourBranchSerialSystem.py +++ b/tests/test_FourBranchSerialSystem.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF """ Test for FourBranchSerialSystemReliability class. diff --git a/tests/test_JanonSensitivityAlgorithm.py b/tests/test_JanonSensitivityAlgorithm.py index 04e7f21..a79cd03 100644 --- a/tests/test_JanonSensitivityAlgorithm.py +++ b/tests/test_JanonSensitivityAlgorithm.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for JanonSensitivityAlgorithm class. diff --git a/tests/test_ProbabilitySimulationAlgorithmFactory.py b/tests/test_ProbabilitySimulationAlgorithmFactory.py index b6b8e60..868f982 100644 --- a/tests/test_ProbabilitySimulationAlgorithmFactory.py +++ b/tests/test_ProbabilitySimulationAlgorithmFactory.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for ProbabilitySimulationAlgorithmFactory class. """ diff --git a/tests/test_RelabilityProblem14.py b/tests/test_RelabilityProblem14.py index 9e1ffb9..4956abf 100644 --- a/tests/test_RelabilityProblem14.py +++ b/tests/test_RelabilityProblem14.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 11:50:49 2020 diff --git a/tests/test_RelabilityProblem53.py b/tests/test_RelabilityProblem53.py index f07f7bd..df79b21 100644 --- a/tests/test_RelabilityProblem53.py +++ b/tests/test_RelabilityProblem53.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 15 16:02:56 2020 diff --git a/tests/test_RelabilityProblem54.py b/tests/test_RelabilityProblem54.py index 495ce3c..8cdf4d2 100644 --- a/tests/test_RelabilityProblem54.py +++ b/tests/test_RelabilityProblem54.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 14:20:08 2020 diff --git a/tests/test_RelabilityProblem60.py b/tests/test_RelabilityProblem60.py index 2dd2a36..f2debbe 100644 --- a/tests/test_RelabilityProblem60.py +++ b/tests/test_RelabilityProblem60.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue May 5 12:56:49 2020 diff --git a/tests/test_RelabilityProblem63.py b/tests/test_RelabilityProblem63.py index 633b965..64aa359 100644 --- a/tests/test_RelabilityProblem63.py +++ b/tests/test_RelabilityProblem63.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon May 4 13:14:25 2020 diff --git a/tests/test_RelabilityProblem77.py b/tests/test_RelabilityProblem77.py index 97f9eaa..a5f0fcd 100644 --- a/tests/test_RelabilityProblem77.py +++ b/tests/test_RelabilityProblem77.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed May 6 10:58:16 2020 diff --git a/tests/test_RelabilityProblem8.py b/tests/test_RelabilityProblem8.py index 4a08f6e..c97484f 100644 --- a/tests/test_RelabilityProblem8.py +++ b/tests/test_RelabilityProblem8.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 11:44:35 2020 diff --git a/tests/test_RelabilityProblem91.py b/tests/test_RelabilityProblem91.py index 9d6661a..40b5111 100644 --- a/tests/test_RelabilityProblem91.py +++ b/tests/test_RelabilityProblem91.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Thu Apr 30 10:58:26 2020 diff --git a/tests/test_ReliabilityBenchmarkMetaAlgorithm.py b/tests/test_ReliabilityBenchmarkMetaAlgorithm.py index cb63ef7..9ce4977 100644 --- a/tests/test_ReliabilityBenchmarkMetaAlgorithm.py +++ b/tests/test_ReliabilityBenchmarkMetaAlgorithm.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for ReliabilityBenchmarkMetaAlgorithm class. """ diff --git a/tests/test_ReliabilityBenchmarkProblem.py b/tests/test_ReliabilityBenchmarkProblem.py index 694a530..286378b 100644 --- a/tests/test_ReliabilityBenchmarkProblem.py +++ b/tests/test_ReliabilityBenchmarkProblem.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF """ Test for ReliabilityBenchmarkProblem class. diff --git a/tests/test_ReliabilityLibrary.py b/tests/test_ReliabilityLibrary.py index e41a8ac..ffdf8ec 100644 --- a/tests/test_ReliabilityLibrary.py +++ b/tests/test_ReliabilityLibrary.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for ReliabilityLibrary class. """ diff --git a/tests/test_ReliabilityProblem107.py b/tests/test_ReliabilityProblem107.py index 458e404..9fec19d 100644 --- a/tests/test_ReliabilityProblem107.py +++ b/tests/test_ReliabilityProblem107.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 14:39:26 2020 diff --git a/tests/test_ReliabilityProblem110.py b/tests/test_ReliabilityProblem110.py index e74378a..f0f31dd 100644 --- a/tests/test_ReliabilityProblem110.py +++ b/tests/test_ReliabilityProblem110.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Thu Apr 23 11:05:39 2020 diff --git a/tests/test_ReliabilityProblem111.py b/tests/test_ReliabilityProblem111.py index a50822e..e98290b 100644 --- a/tests/test_ReliabilityProblem111.py +++ b/tests/test_ReliabilityProblem111.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 12:05:02 2020 diff --git a/tests/test_ReliabilityProblem22.py b/tests/test_ReliabilityProblem22.py index edc51df..2957a8d 100644 --- a/tests/test_ReliabilityProblem22.py +++ b/tests/test_ReliabilityProblem22.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 10:55:16 2020 diff --git a/tests/test_ReliabilityProblem24.py b/tests/test_ReliabilityProblem24.py index 801304e..e9a26bf 100644 --- a/tests/test_ReliabilityProblem24.py +++ b/tests/test_ReliabilityProblem24.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 10:55:16 2020 diff --git a/tests/test_ReliabilityProblem25.py b/tests/test_ReliabilityProblem25.py index 65f33d7..59e703e 100644 --- a/tests/test_ReliabilityProblem25.py +++ b/tests/test_ReliabilityProblem25.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 10:55:16 2020 diff --git a/tests/test_ReliabilityProblem28.py b/tests/test_ReliabilityProblem28.py index 5b81931..167d493 100644 --- a/tests/test_ReliabilityProblem28.py +++ b/tests/test_ReliabilityProblem28.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 10:55:16 2020 diff --git a/tests/test_ReliabilityProblem31.py b/tests/test_ReliabilityProblem31.py index 14c0911..4a2dea2 100644 --- a/tests/test_ReliabilityProblem31.py +++ b/tests/test_ReliabilityProblem31.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 12:32:41 2020 diff --git a/tests/test_ReliabilityProblem33.py b/tests/test_ReliabilityProblem33.py index 47d222b..96193c3 100644 --- a/tests/test_ReliabilityProblem33.py +++ b/tests/test_ReliabilityProblem33.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 28 10:31:45 2020 diff --git a/tests/test_ReliabilityProblem35.py b/tests/test_ReliabilityProblem35.py index 17d3fb3..8acabce 100644 --- a/tests/test_ReliabilityProblem35.py +++ b/tests/test_ReliabilityProblem35.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Mon Apr 20 12:42:16 2020 diff --git a/tests/test_ReliabilityProblem38.py b/tests/test_ReliabilityProblem38.py index e3a30a2..878e5b0 100644 --- a/tests/test_ReliabilityProblem38.py +++ b/tests/test_ReliabilityProblem38.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Apr 29 12:45:56 2020 diff --git a/tests/test_ReliabilityProblem53.py b/tests/test_ReliabilityProblem53.py index e0a8c8b..8421de4 100644 --- a/tests/test_ReliabilityProblem53.py +++ b/tests/test_ReliabilityProblem53.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Thu Apr 23 12:39:59 2020 diff --git a/tests/test_ReliabilityProblem55.py b/tests/test_ReliabilityProblem55.py index ac733f1..b908aeb 100644 --- a/tests/test_ReliabilityProblem55.py +++ b/tests/test_ReliabilityProblem55.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 10:22:52 2020 diff --git a/tests/test_ReliabilityProblem57.py b/tests/test_ReliabilityProblem57.py index dcfd2ed..5b19958 100644 --- a/tests/test_ReliabilityProblem57.py +++ b/tests/test_ReliabilityProblem57.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 10:52:22 2020 diff --git a/tests/test_ReliabilityProblem75.py b/tests/test_ReliabilityProblem75.py index 84c2689..8a17008 100644 --- a/tests/test_ReliabilityProblem75.py +++ b/tests/test_ReliabilityProblem75.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 11:22:57 2020 diff --git a/tests/test_ReliabilityProblem89.py b/tests/test_ReliabilityProblem89.py index 03e5334..29a6fc2 100644 --- a/tests/test_ReliabilityProblem89.py +++ b/tests/test_ReliabilityProblem89.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Apr 21 11:39:49 2020 diff --git a/tests/test_RminusS.py b/tests/test_RminusS.py index a7a4dbc..2390a5e 100644 --- a/tests/test_RminusS.py +++ b/tests/test_RminusS.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF """ Test for RminusSReliability class. diff --git a/tests/test_SORM.py b/tests/test_SORM.py index 7ae7171..b136f4b 100644 --- a/tests/test_SORM.py +++ b/tests/test_SORM.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for SORMFactory class. """ diff --git a/tests/test_SensitivityBenchmarkMetaAlgorithm.py b/tests/test_SensitivityBenchmarkMetaAlgorithm.py index 64fe4ef..69894f2 100644 --- a/tests/test_SensitivityBenchmarkMetaAlgorithm.py +++ b/tests/test_SensitivityBenchmarkMetaAlgorithm.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for SensitivityBenchmarkMetaAlgorithm class. """ diff --git a/tests/test_SensitivityConvergence.py b/tests/test_SensitivityConvergence.py index 4c6bd3d..eed8816 100644 --- a/tests/test_SensitivityConvergence.py +++ b/tests/test_SensitivityConvergence.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for SensitivityConvergence class. """ diff --git a/tests/test_SensitivityDistribution.py b/tests/test_SensitivityDistribution.py index 5dc7768..3443edc 100644 --- a/tests/test_SensitivityDistribution.py +++ b/tests/test_SensitivityDistribution.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for SensitivityDistribution class. """ diff --git a/tests/test_SensitivityLibrary.py b/tests/test_SensitivityLibrary.py index da69625..34c43fe 100644 --- a/tests/test_SensitivityLibrary.py +++ b/tests/test_SensitivityLibrary.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for SensitivityLibrary class. """ diff --git a/tests/test_SubsetSampling.py b/tests/test_SubsetSampling.py index 8d8172c..54ad6c6 100644 --- a/tests/test_SubsetSampling.py +++ b/tests/test_SubsetSampling.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Test for SORMFactory class. """ diff --git a/tests/test_axialbeam.py b/tests/test_axialbeam.py index 4886be7..e199d45 100644 --- a/tests/test_axialbeam.py +++ b/tests/test_axialbeam.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF """ Test for AxialStressedBeamReliability class. diff --git a/tests/test_borehole_SA.py b/tests/test_borehole_SA.py index 61a7f85..62c4246 100644 --- a/tests/test_borehole_SA.py +++ b/tests/test_borehole_SA.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 - 2021 EDF. """ Test for BoreholeSensitivity class. diff --git a/tests/test_borgonovo.py b/tests/test_borgonovo.py index 4b05b1d..2426ed1 100644 --- a/tests/test_borgonovo.py +++ b/tests/test_borgonovo.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2021 EDF. """ Test for BorgonovoSensitivity class. diff --git a/tests/test_dirichlet.py b/tests/test_dirichlet.py index 4d0d843..d55843c 100644 --- a/tests/test_dirichlet.py +++ b/tests/test_dirichlet.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 - 2021 EDF. """ Test for DirichletSensitivity class. diff --git a/tests/test_flooding.py b/tests/test_flooding.py index 548fc0b..5d017cc 100644 --- a/tests/test_flooding.py +++ b/tests/test_flooding.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 - 2021 EDF. """ Test for FloodingSensitivity class. diff --git a/tests/test_gaussianproduct.py b/tests/test_gaussianproduct.py index b3d1781..5a2d211 100644 --- a/tests/test_gaussianproduct.py +++ b/tests/test_gaussianproduct.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for GaussianProductSensitivity class. diff --git a/tests/test_gaussiansum.py b/tests/test_gaussiansum.py index c539fc1..d20e9d3 100644 --- a/tests/test_gaussiansum.py +++ b/tests/test_gaussiansum.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for GaussianSumSensitivity class. diff --git a/tests/test_gsobol.py b/tests/test_gsobol.py index a710a3b..87aa0d3 100644 --- a/tests/test_gsobol.py +++ b/tests/test_gsobol.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for GSobolSensitivity class. diff --git a/tests/test_ishigami.py b/tests/test_ishigami.py index 3c79386..ebb5055 100644 --- a/tests/test_ishigami.py +++ b/tests/test_ishigami.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 EDF. """ Test for IshigamiSensitivity class. diff --git a/tests/test_morris.py b/tests/test_morris.py index 1c7e2f7..c3a0391 100644 --- a/tests/test_morris.py +++ b/tests/test_morris.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2021 EDF. """ Test for MorrisSensitivity class. diff --git a/tests/test_nloscillator_SA.py b/tests/test_nloscillator_SA.py index 63b6624..c5d5146 100644 --- a/tests/test_nloscillator_SA.py +++ b/tests/test_nloscillator_SA.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2020 - 2021 EDF. """ Test for NLOscillatorSensitivity class. diff --git a/tests/test_oakleyohagan.py b/tests/test_oakleyohagan.py index 8c80594..ac46d2b 100644 --- a/tests/test_oakleyohagan.py +++ b/tests/test_oakleyohagan.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2021 EDF. """ Test for OakleyOHaganSensitivity class.