Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Apr 19, 2022
1 parent cca1ef5 commit bb19c1f
Show file tree
Hide file tree
Showing 305 changed files with 7,559 additions and 6,666 deletions.
72 changes: 52 additions & 20 deletions docs/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ var Documentation = {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
this.initOnKeyListeners();
},

/**
Expand Down Expand Up @@ -269,6 +267,13 @@ var Documentation = {
window.history.replaceState({}, '', url);
},

/**
* helper function to focus on search bar
*/
focusSearchBar : function() {
$('input[name=q]').first().focus();
},

/**
* make the url absolute
*/
Expand All @@ -291,27 +296,54 @@ var Documentation = {
},

initOnKeyListeners: function() {
// only install a listener if it is really needed
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
return;

$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box, textarea, dropdown or button
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
&& !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
}
break;
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
break;
&& activeElementType !== 'BUTTON') {
if (event.altKey || event.ctrlKey || event.metaKey)
return;

if (!event.shiftKey) {
switch (event.key) {
case 'ArrowLeft':
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
break;
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
}
break;
case 'ArrowRight':
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
break;
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
break;
case 'Escape':
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
break;
Documentation.hideSearchWords();
return false;
}
}

// some keyboard layouts may need Shift to get /
switch (event.key) {
case '/':
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
break;
Documentation.focusSearchBar();
return false;
}
}
});
Expand Down
6 changes: 4 additions & 2 deletions docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '2022.3.24',
VERSION: '2022.4.19',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
};
8 changes: 2 additions & 6 deletions docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ var Search = {
}
// stem the word
var word = stemmer.stemWord(tmp[i].toLowerCase());
// prevent stemmer from cutting word smaller than two chars
if(word.length < 3 && tmp[i].length >= 3) {
word = tmp[i];
}
var toAppend;
// select the correct list
if (word[0] == '-') {
Expand Down Expand Up @@ -276,7 +272,7 @@ var Search = {
setTimeout(function() {
displayNextItem();
}, 5);
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
} else if (DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY) {
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
Expand All @@ -293,7 +289,7 @@ var Search = {
}, 5);
}});
} else {
// no source available, just display title
// just display title
Search.output.append(listItem);
setTimeout(function() {
displayNextItem();
Expand Down
4 changes: 2 additions & 2 deletions docs/addons.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pymatgen Add-ons &mdash; pymatgen 2022.3.24 documentation</title>
<title>Pymatgen Add-ons &mdash; pymatgen 2022.4.19 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -37,7 +37,7 @@
<a href="index.html" class="icon icon-home"> pymatgen
</a>
<div class="version">
2022.3.24
2022.4.19
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
29 changes: 24 additions & 5 deletions docs/change_log.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Change log &mdash; pymatgen 2022.3.24 documentation</title>
<title>Change log &mdash; pymatgen 2022.4.19 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -39,7 +39,7 @@
<a href="index.html" class="icon icon-home"> pymatgen
</a>
<div class="version">
2022.3.24
2022.4.19
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand All @@ -53,6 +53,8 @@
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Change log</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#v2022-4-19">v2022.4.19</a></li>
<li class="toctree-l2"><a class="reference internal" href="#v2022-3-29">v2022.3.29</a></li>
<li class="toctree-l2"><a class="reference internal" href="#v2022-3-24">v2022.3.24</a></li>
<li class="toctree-l2"><a class="reference internal" href="#v2022-3-22">v2022.3.22</a></li>
<li class="toctree-l2"><a class="reference internal" href="#v2022-3-7">v2022.3.7</a></li>
Expand Down Expand Up @@ -389,6 +391,23 @@

<section id="change-log">
<h1>Change log<a class="headerlink" href="#change-log" title="Permalink to this headline"></a></h1>
<section id="v2022-4-19">
<h2>v2022.4.19<a class="headerlink" href="#v2022-4-19" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>Fix for discharged and charged entries in conversion battery. (&#64;peikai)`pylint` in <cite>.pre-commit-config.yaml</cite>.</p></li>
<li><p>Allow skipping of structure reduction in StructureMatcher.group_structures (&#64;lan496)</p></li>
<li><p>Return NotImplemented for composition comparison methods. (&#64;janosh)</p></li>
<li><p>BSPlotter bug fixes (&#64;fraricci)</p></li>
<li><p>Misc bug fixes and deprecation fixes.</p></li>
</ul>
</section>
<section id="v2022-3-29">
<h2>v2022.3.29<a class="headerlink" href="#v2022-3-29" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>Major update to CP2K module, PR #2475 from &#64;nwinner</p></li>
<li><p>Bug fix to remove problematic import, PR #2477 from &#64;mkhorton</p></li>
</ul>
</section>
<section id="v2022-3-24">
<h2>v2022.3.24<a class="headerlink" href="#v2022-3-24" title="Permalink to this headline"></a></h2>
<ul class="simple">
Expand Down Expand Up @@ -516,7 +535,7 @@ <h2>v2022.0.17<a class="headerlink" href="#v2022-0-17" title="Permalink to this
<section id="v2022-0-16">
<h2>v2022.0.16<a class="headerlink" href="#v2022-0-16" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>Fix to allow PhaseDiagram to be JSON serializable with computed data cached (&#64;mkhorton, #2276)</p></li>
<li><p>Fix to allow PhaseDiagram to be JSON-serializable with computed data cached (&#64;mkhorton, #2276)</p></li>
<li><p>Temporarily revert #2239 pending investigation into slow-down in some nearest neighbor finding routines. This does not affect the behavior of any of these classes.</p></li>
</ul>
</section>
Expand Down Expand Up @@ -2976,7 +2995,7 @@ <h2>v2.7.1<a class="headerlink" href="#v2-7-1" title="Permalink to this headline
immutability) which will perform exactly the same way as the previous
classes. With this change, the <code class="xref py py-mod docutils literal notranslate"><span class="pre">pymatgen.core.structure_modifier</span></code>
module is now deprecated and will be removed in a future version.</p></li>
<li><p>read_structure and write_structure now supports pymatgen’s json serialized
<li><p>read_structure and write_structure now supports pymatgen’s JSON-serialized
structures.</p></li>
<li><p>read_mol and write_mol functions now available (analogues of
read_structure and write_structure for molecules)</p></li>
Expand Down Expand Up @@ -3155,7 +3174,7 @@ <h2>v2.3.1<a class="headerlink" href="#v2-3-1" title="Permalink to this headline
data by running through the x-axis first, followed by y, then z.</p></li>
<li><p>Bug fix for reverse_readline so that it works for gzipped and bzipped
strucutures (courtesy of Anubhav Jain).</p></li>
<li><p>Fix “lossy” composition to_dict method. Now composition.to_dict properly
<li><p>Fix “lossy” composition to_dict method. Now composition.to_dict properly
returns a correct species string as a key for compositions using species,
instead of just the element symbols.</p></li>
<li><p>Miscellaneous bug fixes.</p></li>
Expand Down
4 changes: 2 additions & 2 deletions docs/compatibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Compatibility &mdash; pymatgen 2022.3.24 documentation</title>
<title>Compatibility &mdash; pymatgen 2022.4.19 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -39,7 +39,7 @@
<a href="index.html" class="icon icon-home"> pymatgen
</a>
<div class="version">
2022.3.24
2022.4.19
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
14 changes: 10 additions & 4 deletions docs/contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contributing &mdash; pymatgen 2022.3.24 documentation</title>
<title>Contributing &mdash; pymatgen 2022.4.19 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -39,7 +39,7 @@
<a href="index.html" class="icon icon-home"> pymatgen
</a>
<div class="version">
2022.3.24
2022.4.19
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -126,7 +126,13 @@ <h2>Direct contributions to pymatgen main distribution<a class="headerlink" href
<p>Note that the entire Github repo is fairly large because of the presence of test files, but these are absolutely
necessary for rigorous testing of the code.</p>
</li>
<li><p>It is highly recommended you install all the optional dependencies as well.</p></li>
<li><p>It is highly recommended you install all the optional dependencies as well:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">requirements</span><span class="o">.</span><span class="n">txt</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">requirements</span><span class="o">-</span><span class="n">optional</span><span class="o">.</span><span class="n">txt</span>
<span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">requirements</span><span class="o">-</span><span class="n">dev</span><span class="o">.</span><span class="n">txt</span>
</pre></div>
</div>
</li>
<li><p>Code (see <a class="reference internal" href="#coding-guidelines">Coding Guidelines</a>). Commit early and commit often. Keep your code up to date. You need to add the main
repository to the list of your remotes. Let’s name the upstream repo as mpmaster (materialsproject master):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">remote</span> <span class="n">add</span> <span class="n">mpmaster</span> <span class="n">git</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">materialsproject</span><span class="o">/</span><span class="n">pymatgen</span><span class="o">.</span><span class="n">git</span>
Expand Down Expand Up @@ -156,7 +162,7 @@ <h2>Direct contributions to pymatgen main distribution<a class="headerlink" href
local repo directory and fix all errors before continuing further.</p></li>
<li><p>If you have <a class="reference external" href="https://pre-commit.com/">pre-commit</a> installed you can use
the provided <code class="code docutils literal notranslate"><span class="pre">.pre-commit-config.yaml</span></code> file to perform automatic style checks
before publishing your code. The pre-commit hooks can be installed using:</p>
before publishing your code. The pre-commit hooks can be installed using:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pre</span><span class="o">-</span><span class="n">commit</span> <span class="n">install</span>
</pre></div>
</div>
Expand Down
Loading

0 comments on commit bb19c1f

Please sign in to comment.