Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
419657b
DOCS: Limit matplotlib plot formats
dopplershift Aug 9, 2020
741b640
DOCS: Move to pydata-sphinx-theme
dopplershift Aug 9, 2020
4b58298
DOCS: Add cleanall target
dopplershift Aug 11, 2020
2e3f520
DOCS: Cleanup conf.py a bit
dopplershift Aug 11, 2020
fc8496d
DOCS: Add version chooser to theme
dopplershift Aug 11, 2020
af536b8
DOC: Reorganize to better fit new theme
dopplershift Aug 11, 2020
a4beccb
DOC: Add basic doc server
dopplershift Aug 11, 2020
619710b
DOC: Improve styling
dopplershift Aug 11, 2020
15efea2
DOC: Simplify landing page with cards
dopplershift Aug 11, 2020
41c521b
DOCS: List pydata-sphinx-theme in our requirements
dopplershift Aug 12, 2020
8055196
DOC: Update to new horizontal logo
dopplershift Nov 25, 2020
9fb11a6
DOC: Set canonical link in header of pages
dopplershift Nov 25, 2020
e8589da
DOC: Adjust theming of cards
dopplershift Nov 25, 2020
7f1f956
CI: Fix running linkchecker
dopplershift Nov 26, 2020
a9df607
DOC: Update references to Unidata gallery/training
dopplershift Nov 26, 2020
1e55ee4
DOC: Reorganize things
dopplershift Nov 26, 2020
6f982fa
DOC: Separate the media links from the user guide main
dopplershift Dec 1, 2020
cc8f102
DOC: Change from relative doc links to absolute paths
dopplershift Dec 1, 2020
d2f74c0
DOC: Clean-up the user guide some more
dopplershift Dec 1, 2020
4d0729d
DOC: Merge units doc page into units tutorial
dopplershift Dec 3, 2020
ba885a4
DOC: Add stub for 1.0 upgrade guide
dopplershift Dec 4, 2020
385f3e0
DOC: Some more slight tweaks to doc style
dopplershift Dec 4, 2020
94751ff
DOC: Tweaks to banner handling
dopplershift Dec 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ jobs:
python -m pip install --no-binary :all: shapely
python -m pip install -c ci/${{ matrix.dep-versions }} numpy
python -m pip install -r ci/doc_requirements.txt -r ci/extra_requirements.txt -c ci/${{ matrix.dep-versions }} ${{ matrix.git-versions }}
python -m pip install -f https://unidata-python.s3.amazonaws.com/wheelhouse/index.html sphinx_rtd_theme==0.2.5b1.post1

# This imports CartoPy to find its map data cache directory
- name: Get CartoPy maps dir
Expand All @@ -101,15 +100,21 @@ jobs:
- name: Install self
run: python -m pip install -c ci/${{ matrix.dep-versions }} .

- name: Enable linkchecker for PRs
if: ${{ github.event_name == 'pull_request' && matrix.check-links == true }}
run: echo "LINKCHECKER=linkcheck" >> $GITHUB_ENV

- name: Build docs
run: |
export TEST_DATA_DIR=$GITHUB_WORKSPACE/staticdata
pushd docs
make overridecheck html ${{ env.LINKCHECKER }} O=-W
make overridecheck html O=-W
popd

- name: Enable linkchecker for PRs
# Doing the linkchecker separately so that we avoid problems with vendored LICENSE
# files in the build directory
if: ${{ github.event_name == 'pull_request' && matrix.check-links == true }}
run: |
pushd docs
find build/html/_static -name LICENSE.md -delete
make linkcheck
popd

- name: Upload docs as artifact
Expand Down
5 changes: 5 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ Need some help using MetPy to solve your problem?
## Issues
Find a problem with MetPy? Looking for a feature we don't have? File an issue!
* [Issue Tracker (GitHub)](https://github.com/Unidata/MetPy/issues)

## Code of Conduct
We want everyone to feel welcome to contribute to MetPy and participate in discussions. In that
spirit please have a look at our
[`code of conduct`](https://github.com/Unidata/MetPy/blob/master/CODE_OF_CONDUCT.md).
1 change: 1 addition & 0 deletions ci/doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sphinx==3.3.1
pydata-sphinx-theme==0.4.1
sphinx-gallery==0.8.1
myst-parser==0.12.10
netCDF4==1.5.4
Expand Down
1 change: 0 additions & 1 deletion docs/CONTRIBUTING.md

This file was deleted.

5 changes: 4 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Sphinx doesn't know to clean out the debris from sphinx-gallery
cleanall: clean
rm -rf $(SOURCEDIR)/examples $(SOURCEDIR)/tutorials $(SOURCEDIR)/api/generated

clean:
rm -rf $(BUILDDIR)/* $(SOURCEDIR)/examples $(SOURCEDIR)/tutorials $(SOURCEDIR)/api/generated
rm -rf $(BUILDDIR)/*

# Check that all functions in modules with template overrides are present in the doc file
overridecheck:
Expand Down
1 change: 0 additions & 1 deletion docs/SUPPORT.md

This file was deleted.

43 changes: 43 additions & 0 deletions docs/_static/doc_shared.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const project = "MetPy";

$(document).ready(function() {
cur_ver = DOCUMENTATION_OPTIONS.VERSION;
end = cur_ver.lastIndexOf('.');
if (end > -1) {
cur_ver = 'v' + cur_ver.substring(0, end);
}
console.log('cur_ver: ' + cur_ver);

$.getJSON('/' + project + '/versions.json', function(data) {
if (cur_ver !== data.latest) {
let msg;
if (cur_ver.includes('dev') || data.prereleases.indexOf(cur_ver) > -1) {
msg = 'development / pre-release';
} else {
msg = 'previous';
}
content = $('<div class="alert alert-secondary alert-version" role="alert">This documentation page is for a ' + msg +
' version. For the latest release version, go to <a class="alert-link" href="https://unidata.github.io/MetPy/latest/">https://unidata.github.io/MetPy/latest/</a>');
$('#banner').append(content);
}

$.each(data.versions, function() {
if (this !== 'latest') {
const url = DOCUMENTATION_OPTIONS.URL_ROOT + '../' + this;
const name = this.startsWith('v') ? this.substring(1) : this;
$('#version-menu').append('<a class="dropdown-item" href="' + url + '">' + name + '</a>');
}
});
});
});

// Borrowed from Bokeh docs to look for a banner.html at the base of the docs repo and add that
// to the banner if present.
$(document).ready(function () {
$.get('/' + project + '/banner.html', function (data) {
if (data.length > 0) {
console.log(data);
$('#banner').prepend(data);
}
})
})
Binary file added docs/_static/metpy_horizontal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 0 additions & 17 deletions docs/_static/pop_ver.js

This file was deleted.

Binary file removed docs/_static/radar.png
Binary file not shown.
Binary file removed docs/_static/sounding.png
Binary file not shown.
94 changes: 94 additions & 0 deletions docs/_static/theme-unidata.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/* UCAR style heading towards use of Poppins font */
.header-style, h1, h2, h3, h4, h5, h6 {
font-family: Poppins, sans-serif;
}

/* Unidata header color */
.bg-unidata {
background-color: #06778F;
}

/* Override the default color set in the original theme */
.navbar-nav>.active>.nav-link {
color: #fff !important;
font-weight: 400 !important;
}

/* Override the default logo height */
.navbar-brand {
height: 50px;
}

/* Enhance the links to function docs in the gallery examples */
div[class^="highlight"] a {
background-color: #EEEEEE;
}

/* Control the appearance of the version alert banner */
#banner .alert-version, .alert-news {
margin: 1em;
padding: 0.5em;
font-family: "Work Sans", sans-serif;
font-weight: 600; font-size: 16px;
}

.intro-card {
background: #d8e5e8;
border: none;
border-radius: 0;
padding: 30px 10px 10px 10px;
margin: 10px 0px;
}

.intro-card .card-text {
margin: 20px 0px;
}

.card-button {
background-color: #fafafa;
border: none;
color: #484848;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 0.9rem;
border-radius: 0.5rem;
max-width: 220px;
padding: 0.5rem 0rem;
margin-top: auto;
}

.card-button a {
color: #484848;
}

.card-button p {
margin-top: 0;
margin-bottom: 0rem;
color: #484848;
}

/* Tweaks to the appearance of the sidebars */
.bd-sidebar {
flex: 0 0 20%;
border-right: none;
}

.bd-toc .tocsection {
border-left: none;
}

.bd-toc .section-nav {
border-left: none;
}

/* Can remove once theme releases new version */
/* xarray output display in bootstrap */
.xr-wrap[hidden] {
display: block !important;
}

.xr-var-data pre {
border: none;
box-shadow: none;
}
25 changes: 0 additions & 25 deletions docs/_static/theme_override.css

This file was deleted.

30 changes: 0 additions & 30 deletions docs/_templates/breadcrumbs.html

This file was deleted.

62 changes: 62 additions & 0 deletions docs/_templates/docs-navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<div class="container-xl">

<a class="navbar-brand" href="{{ pathto(master_doc) }}">
{% if logo %}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo" />
{% else %}
<p class="title">{{ project }}</p>
{% endif %}
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

{# Removed col-lg-10 to match align:left from next version #}
<div id="navbar-menu" class="collapse navbar-collapse">
<ul id="navbar-main-elements" class="navbar-nav mr-auto">

{# Begin adding version chooser #}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Version {{ version }}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown" id="version-menu"></div>
</li>
{# End #}

{% set nav = get_nav_object(maxdepth=1, collapse=True) %}
{% for main_nav_item in nav %}
<li class="nav-item {% if main_nav_item.active%}active{% endif %}">
<a class="nav-link" href="{{ main_nav_item.url }}">{{ main_nav_item.title }}</a>
</li>
{% endfor %}
{% for external_link in theme_external_links %}
<li class="nav-item">
<a class="nav-link nav-external" href="{{ external_link.url }}">{{ external_link.name }}<i class="fas fa-external-link-alt"></i></a>
</li>
{% endfor %}
</ul>


{% if theme_search_bar_position == 'navbar' %}
{%- include "search-field.html" %}
{% endif %}

<ul class="navbar-nav">
{% if theme_github_url | length > 2 %}
<li class="nav-item">
<a class="nav-link" href="{{ theme_github_url }}" target="_blank" rel="noopener">
<span><i class="fab fa-github-square"></i></span>
</a>
</li>
{% endif %}
{% if theme_twitter_url | length > 2 %}
<li class="nav-item">
<a class="nav-link" href="{{ theme_twitter_url }}" target="_blank" rel="noopener">
<span><i class="fab fa-twitter-square"></i></span>
</a>
</li>
{% endif %}
</ul>
</div>
</div>
14 changes: 0 additions & 14 deletions docs/_templates/footer.html

This file was deleted.

22 changes: 22 additions & 0 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends "!layout.html" %}

{% block fonts %}
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap');
</style>
{{ super() }}
{% endblock %}

{% block extrahead %}
{{ super() }}
<link rel="canonical" href="https://unidata.github.io/MetPy/latest/{{ pagename }}{{ file_suffix }}" />
{% endblock %}

{% block docs_navbar %}
<nav class="navbar navbar-dark navbar-expand-lg bg-unidata fixed-top bd-navbar shadow" id="navbar-main">
{%- include "docs-navbar.html" %}
</nav>

{# Added to support a banner with an alert #}
<div class="container-fluid" id="banner"></div>
{% endblock %}
4 changes: 4 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ Reference Guide
metpy.interpolate
metpy.xarray

.. toctree::

references

* :ref:`modindex`
* :ref:`genindex`
Loading