-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update riseclipse-python-launcher-docs 2127dce
- Loading branch information
0 parents
commit 22434b4
Showing
67 changed files
with
9,867 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: ab06bdb9b7429c8e9fbfcc48055f2cec | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<!DOCTYPE html> | ||
<html class="writer-html5" lang="en" data-content_root="../"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Overview: module code — RiseClipse Python API 1.0.0 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" /> | ||
|
||
|
||
<!--[if lt IE 9]> | ||
<script src="../_static/js/html5shiv.min.js"></script> | ||
<![endif]--> | ||
|
||
<script src="../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../_static/documentation_options.js?v=8d563738"></script> | ||
<script src="../_static/doctools.js?v=9a2dae69"></script> | ||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="../_static/js/theme.js"></script> | ||
<link rel="index" title="Index" href="../genindex.html" /> | ||
<link rel="search" title="Search" href="../search.html" /> | ||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
<div class="wy-grid-for-nav"> | ||
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
|
||
|
||
|
||
<a href="../index.html" class="icon icon-home"> | ||
RiseClipse Python API | ||
</a> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
</div> | ||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> | ||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../modules.html">riseclipse</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > | ||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../index.html">RiseClipse Python API</a> | ||
</nav> | ||
|
||
<div class="wy-nav-content"> | ||
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li> | ||
<li class="breadcrumb-item active">Overview: module code</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
</li> | ||
</ul> | ||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<h1>All modules for which code is available</h1> | ||
<ul><li><a href="java_runner.html">java_runner</a></li> | ||
<li><a href="riseclipse_download.html">riseclipse_download</a></li> | ||
<li><a href="riseclipse_output.html">riseclipse_output</a></li> | ||
<li><a href="riseclipse_parser.html">riseclipse_parser</a></li> | ||
<li><a href="riseclipse_validator.html">riseclipse_validator</a></li> | ||
<li><a href="riseclipse_validator_scl.html">riseclipse_validator_scl</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
<footer> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2024, CentraleSupélec & EDF.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> | ||
provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
|
||
</footer> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
<script> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
<!DOCTYPE html> | ||
<html class="writer-html5" lang="en" data-content_root="../"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>java_runner — RiseClipse Python API 1.0.0 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" /> | ||
|
||
|
||
<!--[if lt IE 9]> | ||
<script src="../_static/js/html5shiv.min.js"></script> | ||
<![endif]--> | ||
|
||
<script src="../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../_static/documentation_options.js?v=8d563738"></script> | ||
<script src="../_static/doctools.js?v=9a2dae69"></script> | ||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="../_static/js/theme.js"></script> | ||
<link rel="index" title="Index" href="../genindex.html" /> | ||
<link rel="search" title="Search" href="../search.html" /> | ||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
<div class="wy-grid-for-nav"> | ||
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
|
||
|
||
|
||
<a href="../index.html" class="icon icon-home"> | ||
RiseClipse Python API | ||
</a> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
</div> | ||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> | ||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../modules.html">riseclipse</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > | ||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../index.html">RiseClipse Python API</a> | ||
</nav> | ||
|
||
<div class="wy-nav-content"> | ||
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li> | ||
<li class="breadcrumb-item"><a href="index.html">Module code</a></li> | ||
<li class="breadcrumb-item active">java_runner</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
</li> | ||
</ul> | ||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<h1>Source code for java_runner</h1><div class="highlight"><pre> | ||
<span></span><span class="c1"># *************************************************************************</span> | ||
<span class="c1"># ** Copyright (c) 2024 CentraleSupélec & EDF.</span> | ||
<span class="c1"># ** All rights reserved. This program and the accompanying materials</span> | ||
<span class="c1"># ** are made available under the terms of the Eclipse Public License v2.0</span> | ||
<span class="c1"># ** which accompanies this distribution, and is available at</span> | ||
<span class="c1"># ** https://www.eclipse.org/legal/epl-v20.html</span> | ||
<span class="c1"># ** </span> | ||
<span class="c1"># ** This file is part of the RiseClipse tool</span> | ||
<span class="c1"># ** </span> | ||
<span class="c1"># ** Contributors:</span> | ||
<span class="c1"># ** Computer Science Department, CentraleSupélec</span> | ||
<span class="c1"># ** EDF R&D</span> | ||
<span class="c1"># ** Contacts:</span> | ||
<span class="c1"># ** [email protected]</span> | ||
<span class="c1"># ** [email protected]</span> | ||
<span class="c1"># ** Web site:</span> | ||
<span class="c1"># ** https://riseclipse.github.io</span> | ||
<span class="c1"># *************************************************************************</span> | ||
|
||
<span class="kn">from</span> <span class="nn">abc</span> <span class="kn">import</span> <span class="n">ABC</span> | ||
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">run</span> | ||
<span class="kn">from</span> <span class="nn">shutil</span> <span class="kn">import</span> <span class="n">which</span> | ||
|
||
<div class="viewcode-block" id="JavaRunner"> | ||
<a class="viewcode-back" href="../java_runner.html#java_runner.JavaRunner">[docs]</a> | ||
<span class="k">class</span> <span class="nc">JavaRunner</span><span class="p">(</span><span class="n">ABC</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Abstract class that carry out the execution of a ``jar`` file.</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> Attributes:</span> | ||
<span class="sd"> java_command (str): The path to the ``java`` command used to execute the jar file.</span> | ||
<span class="sd"> jar_file (str): The path to the ``jar`` file that will be executed.</span> | ||
<span class="sd"> result_code (None or int): The result code after execution of the ``jar`` file.</span> | ||
<span class="sd"> """</span> | ||
|
||
<div class="viewcode-block" id="JavaRunner.__init__"> | ||
<a class="viewcode-back" href="../java_runner.html#java_runner.JavaRunner.__init__">[docs]</a> | ||
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">jar_path</span><span class="p">:</span> <span class="nb">str</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Initialize the JavaRunner object.</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> The ``java`` command that will be used is initialized with ``shutil.which()``</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> Args:</span> | ||
<span class="sd"> jar_path: The path to the ``jar`` file.</span> | ||
|
||
<span class="sd"> """</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">jar_file</span> <span class="o">=</span> <span class="n">jar_path</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">java_command</span> <span class="o">=</span> <span class="n">which</span><span class="p">(</span><span class="s2">"java"</span><span class="p">)</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">result_code</span> <span class="o">=</span> <span class="kc">None</span></div> | ||
|
||
|
||
<div class="viewcode-block" id="JavaRunner.set_jar_file"> | ||
<a class="viewcode-back" href="../java_runner.html#java_runner.JavaRunner.set_jar_file">[docs]</a> | ||
<span class="k">def</span> <span class="nf">set_jar_file</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">jar_path</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Change the ``jar`` file that will be executed.</span> | ||
|
||
<span class="sd"> Args:</span> | ||
<span class="sd"> jar_path: The path to the ``jar`` file.</span> | ||
<span class="sd"> """</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">jar_file</span> <span class="o">=</span> <span class="n">jar_path</span></div> | ||
|
||
|
||
<div class="viewcode-block" id="JavaRunner.set_java_command"> | ||
<a class="viewcode-back" href="../java_runner.html#java_runner.JavaRunner.set_java_command">[docs]</a> | ||
<span class="k">def</span> <span class="nf">set_java_command</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">command</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Change the ``java`` command that will be used to execute the ``jar`` file.</span> | ||
|
||
<span class="sd"> Args:</span> | ||
<span class="sd"> command: The path to the ``java`` command.</span> | ||
<span class="sd"> """</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">java_command</span> <span class="o">=</span> <span class="n">command</span></div> | ||
|
||
|
||
<div class="viewcode-block" id="JavaRunner.get_result_code"> | ||
<a class="viewcode-back" href="../java_runner.html#java_runner.JavaRunner.get_result_code">[docs]</a> | ||
<span class="k">def</span> <span class="nf">get_result_code</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">int</span><span class="p">:</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Returns the result code after execution of the ``jar`` file.</span> | ||
<span class="sd"> Before execution, None is returned.</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> Returns:</span> | ||
<span class="sd"> The result code or None.</span> | ||
<span class="sd"> """</span> | ||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">result_code</span></div> | ||
|
||
|
||
<div class="viewcode-block" id="JavaRunner.run"> | ||
<a class="viewcode-back" href="../java_runner.html#java_runner.JavaRunner.run">[docs]</a> | ||
<span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">arguments</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">])</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> | ||
<span class="w"> </span><span class="sd">"""</span> | ||
<span class="sd"> Executes the ``jar`` file using the current ``java`` command and the given arguments.</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> Args:</span> | ||
<span class="sd"> arguments: The arguments that are added to the command line.</span> | ||
|
||
<span class="sd"> Returns:</span> | ||
<span class="sd"> The text displayed on stdout while the ``jar`` executes.</span> | ||
<span class="sd"> """</span> | ||
<span class="n">command</span> <span class="o">=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">java_command</span><span class="p">,</span> <span class="s1">'-jar'</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">jar_file</span><span class="p">]</span> <span class="o">+</span> <span class="p">[</span><span class="n">a</span> <span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="n">arguments</span><span class="p">]</span> | ||
<span class="n">result</span> <span class="o">=</span> <span class="n">run</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">capture_output</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">text</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">result_code</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="n">returncode</span> | ||
|
||
<span class="k">return</span> <span class="n">result</span><span class="o">.</span><span class="n">stdout</span></div> | ||
</div> | ||
|
||
|
||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
<footer> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2024, CentraleSupélec & EDF.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> | ||
provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
|
||
</footer> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
<script> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.