Skip to content

Commit

Permalink
1. Update the setup file
Browse files Browse the repository at this point in the history
  • Loading branch information
mzy2240 committed Oct 12, 2022
1 parent c97bea4 commit 3f36727
Show file tree
Hide file tree
Showing 16 changed files with 138 additions and 114 deletions.
3 changes: 3 additions & 0 deletions docs/doctrees/environment.pickle
Git LFS file not shown
4 changes: 2 additions & 2 deletions docs/doctrees/esa.doctree
Git LFS file not shown
2 changes: 1 addition & 1 deletion docs/doctrees/overview.doctree
Git LFS file not shown
4 changes: 2 additions & 2 deletions docs/doctrees/snippets.doctree
Git LFS file not shown
4 changes: 2 additions & 2 deletions docs/doctrees/welcome.doctree
Git LFS file not shown
2 changes: 1 addition & 1 deletion docs/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +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: 4f06ae4ed648b0cdfbe03160978092d7
config: e15d26700d04c6a0e5beedc559d9479f
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.3.2',
VERSION: '1.3.3',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
196 changes: 98 additions & 98 deletions docs/html/esa.html

Large diffs are not rendered by default.

Binary file modified docs/html/objects.inv
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/html/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ <h2>Testing Coverage<a class="headerlink" href="#testing-coverage" title="Permal
<p>The ESA team strives to write good tests with 100% coverage. The table
below provides the latest test coverage data for ESA.</p>
<table class="colwidths-auto docutils align-left" id="id3">
<caption><span class="caption-text">ESA’s testing coverage as of 2022-09-27 (Git commit: 0e92b98)</span><a class="headerlink" href="#id3" title="Permalink to this table"></a></caption>
<caption><span class="caption-text">ESA’s testing coverage as of 2022-10-12 (Git commit: dffb9ef)</span><a class="headerlink" href="#id3" title="Permalink to this table"></a></caption>
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>Num. Statements</p></th>
Expand All @@ -335,9 +335,9 @@ <h2>Testing Coverage<a class="headerlink" href="#testing-coverage" title="Permal
<td><p>100</p></td>
</tr>
<tr class="row-odd"><td><p>esa/saw.py</p></td>
<td><p>1146</p></td>
<td><p>1158</p></td>
<td><p>0</p></td>
<td><p>1146</p></td>
<td><p>1158</p></td>
<td><p>100</p></td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/html/snippets.html
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ <h2>Contingency Analysis using PW Built-in capability<a class="headerlink" href=
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="n">saw</span><span class="o">.</span><span class="n">GetParametersMultipleElement</span><span class="p">(</span><span class="s1">&#39;Contingency&#39;</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;CTGLabel&#39;</span><span class="p">,</span> <span class="s1">&#39;CTGSolved&#39;</span><span class="p">,</span> <span class="s1">&#39;CTGProc&#39;</span><span class="p">,</span> <span class="s1">&#39;CTGCustMonViol&#39;</span><span class="p">,</span> <span class="s1">&#39;CTGViol&#39;</span><span class="p">])</span>
</pre></div>
</div>
<p>The result is stored as a dataframe.</p>
<p>The result is presented in a Pandas DataFrame.</p>
</section>
<section id="create-simple-graph-model">
<h2>Create Simple Graph Model<a class="headerlink" href="#create-simple-graph-model" title="Permalink to this heading"></a></h2>
Expand Down
6 changes: 6 additions & 0 deletions docs/html/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,12 @@ <h3>Credits and Thanks<a class="headerlink" href="#credits-and-thanks" title="Pe
<p>Changes made with each ESA release are listed here. Please note that
versions prior to 1.0.0 are not listed here, but are still available on
<a class="reference external" href="https://pypi.org/project/esa/#history">PyPi</a>.</p>
<section id="version-1-3-3">
<h3>Version 1.3.3<a class="headerlink" href="#version-1-3-3" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>Fix the <cite>get_shift_factor_matrix</cite> function when the system is large</p></li>
</ul>
</section>
<section id="version-1-3-2">
<h3>Version 1.3.2<a class="headerlink" href="#version-1-3-2" title="Permalink to this heading"></a></h3>
<ul class="simple">
Expand Down
3 changes: 2 additions & 1 deletion docs/rst/snippets/pw_contingency_analysis_2000.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ Use ESA to obtain the CA result
.. code:: python
>>> result = saw.GetParametersMultipleElement('Contingency', ['CTGLabel', 'CTGSolved', 'CTGProc', 'CTGCustMonViol', 'CTGViol'])
The result is stored as a dataframe.
The result is presented in a Pandas DataFrame.
2 changes: 1 addition & 1 deletion esa/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
__email__ = "me@zeyumao.com"
__license__ = "Apache License 2.0"
__copyright__ = "Copyright 2022 - Zeyu Mao"
__version__ = "1.3.3"
__version__ = "1.3.3"
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
long_description = fh.read()

# Update the __version__ in __init__ before installing:
# Update the __version__ in __about__ before installing:
# Path to __init__.py:
init_path = os.path.join('esa', '__init__.py')
about_path = os.path.join('esa', '__about__.py')
# Read __init__.py:
with open(init_path, 'r') as fh:
__init__ = fh.read()
Expand All @@ -24,6 +26,18 @@
with open(init_path, 'w') as fh:
fh.write(__init__)

# Read __about__.py:
with open(about_path, 'r') as fh:
__about__ = fh.read()

# Update the version:
__about__ = re.sub(r'__version__\s*=\s*[\'"][0-9]+\.[0-9]+\.[0-9]+[\'"]',
'__version__ = "{}"'.format(__version__), __about__)

# Write new __about__.py:
with open(about_path, 'w') as fh:
fh.write(__about__)

setuptools.setup(
name='esa',
version=__version__,
Expand Down

0 comments on commit 3f36727

Please sign in to comment.