Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JiQi535 committed Apr 11, 2022
2 parents 303e6e0 + ad4b858 commit 3600e70
Show file tree
Hide file tree
Showing 161 changed files with 19,328 additions and 16,791 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
pydocstyle --count pymatgen
- name: pylint
run: |
pylint pymatgen
pylint pymatgen
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
max-parallel: 20
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: ['3.9']

runs-on: ${{ matrix.os }}

Expand Down
54 changes: 48 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,56 @@
exclude: ^(docs|.*test_files|cmd_line|dev_scripts)

default_language_version:
python: python3.8

ci:
autoupdate_schedule: monthly
skip: [flake8, mypy]

repos:

- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --in-place
- --remove-unused-variables
- --remove-all-unused-imports
- --expand-star-imports
- --ignore-init-module-imports

- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.1.0
hooks:
- id: check-yaml
exclude: pymatgen/analysis/vesta_cutoffs.yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: flake8
args: ["--max-line-length=120"]

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: 20.8b1 # Replace by any tag/version: https://github.com/psf/black/tags
rev: 22.1.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.930
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
- id: mypy
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ 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.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you use pymatgen-diffusion in your research, please cite the following
work::

Deng, Z.; Zhu, Z.; Chu, I.H.; Ong, S. P. Data-Driven First-Principles
Methods for the Study and Design of Alkali Superionic Conductors,
Methods for the Study and Design of Alkali Superionic Conductors,
Chem. Mater., 2016, acs.chemmater.6b02648, doi:10.1021/acs.chemmater.6b02648.

You should also include the following citation for the pymatgen core package
Expand All @@ -48,14 +48,14 @@ given that it forms the basis for most of the analyses::
Persson, Gerbrand Ceder. *Python Materials Genomics (pymatgen) : A Robust,
Open-Source Python Library for Materials Analysis.* Computational
Materials Science, 2013, 68, 314-319. doi:10.1016/j.commatsci.2012.10.028.

In addtion, some of the analyses may also have relevant publications that
you should cite. Please consult the documentation of each module.

Contributing
============

We welcome contributions in all forms. If you'd like to contribute, please
We welcome contributions in all forms. If you'd like to contribute, please
fork this repository, make changes and send us a pull request!

Acknowledgements
Expand Down
12 changes: 6 additions & 6 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; pymatgen-diffusion 2021.4.29 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/flasky.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<title>Overview: module code &#8212; pymatgen-diffusion 2022.1.15 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/flasky.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
Expand Down Expand Up @@ -36,7 +36,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pymatgen-diffusion 2021.4.29 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">pymatgen-diffusion 2022.1.15 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Overview: module code</a></li>
</ul>
</div>
Expand Down Expand Up @@ -85,7 +85,7 @@ <h1>All modules for which code is available</h1>
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
Expand Down
19 changes: 9 additions & 10 deletions docs/_modules/pymatgen/analysis/diffusion/aimd/clustering.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pymatgen.analysis.diffusion.aimd.clustering &#8212; pymatgen-diffusion 2021.4.29 documentation</title>
<link rel="stylesheet" href="../../../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../../../_static/flasky.css" type="text/css" />
<script id="documentation_options" data-url_root="../../../../../" src="../../../../../_static/documentation_options.js"></script>
<title>pymatgen.analysis.diffusion.aimd.clustering &#8212; pymatgen-diffusion 2022.1.15 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../../../_static/flasky.css" />
<script data-url_root="../../../../../" id="documentation_options" src="../../../../../_static/documentation_options.js"></script>
<script src="../../../../../_static/jquery.js"></script>
<script src="../../../../../_static/underscore.js"></script>
<script src="../../../../../_static/doctools.js"></script>
Expand Down Expand Up @@ -36,7 +36,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../../../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../../../../index.html">pymatgen-diffusion 2021.4.29 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../../../../index.html">pymatgen-diffusion 2022.1.15 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../../../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pymatgen.analysis.diffusion.aimd.clustering</a></li>
</ul>
Expand All @@ -48,8 +48,7 @@ <h3>Navigation</h3>
<div class="body" role="main">

<h1>Source code for pymatgen.analysis.diffusion.aimd.clustering</h1><div class="highlight"><pre>
<span></span><span class="c1"># coding: utf-8</span>
<span class="c1"># Copyright (c) Materials Virtual Lab.</span>
<span></span><span class="c1"># Copyright (c) Materials Virtual Lab.</span>
<span class="c1"># Distributed under the terms of the BSD License.</span>

<span class="sd">&quot;&quot;&quot;</span>
Expand Down Expand Up @@ -166,7 +165,7 @@ <h1>Source code for pymatgen.analysis.diffusion.aimd.clustering</h1><div class="
<span class="sd"> iterations: Number of iterations thus far.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">iterations</span> <span class="o">&gt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">max_iterations</span><span class="p">:</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Max iterations </span><span class="si">%d</span><span class="s2"> reached!&quot;</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">max_iterations</span><span class="p">)</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Max iterations </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">max_iterations</span><span class="si">}</span><span class="s2"> reached!&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">if</span> <span class="n">old_centroids</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">False</span>
Expand Down Expand Up @@ -242,7 +241,7 @@ <h1>Source code for pymatgen.analysis.diffusion.aimd.clustering</h1><div class="
<span class="sd"> iterations: Number of iterations thus far.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">iterations</span> <span class="o">&gt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">max_iterations</span><span class="p">:</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span><span class="s2">&quot;Max iterations </span><span class="si">%d</span><span class="s2"> reached!&quot;</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">max_iterations</span><span class="p">)</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Max iterations </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">max_iterations</span><span class="si">}</span><span class="s2"> reached!&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">if</span> <span class="n">old_centroids</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">False</span>
Expand Down Expand Up @@ -295,7 +294,7 @@ <h1>Source code for pymatgen.analysis.diffusion.aimd.clustering</h1><div class="
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
Expand Down
Loading

0 comments on commit 3600e70

Please sign in to comment.