Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from NCAR:main #31

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
206061a
Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.0 (#241)
dependabot[bot] Sep 2, 2024
8074b2e
Bump pypa/gh-action-pypi-publish from 1.10.0 to 1.10.1 (#242)
dependabot[bot] Sep 9, 2024
8c4edcc
Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.2 (#243)
dependabot[bot] Sep 23, 2024
29b89f6
Update pre-commit (#247)
kafitzgerald Oct 8, 2024
18d74ac
Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3 (#245)
dependabot[bot] Oct 8, 2024
7883acd
Fix link check (#249)
kafitzgerald Oct 16, 2024
5832be4
Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 (#250)
dependabot[bot] Nov 4, 2024
0583ca2
[pre-commit.ci] pre-commit autoupdate (#251)
pre-commit-ci[bot] Nov 5, 2024
649f33a
Bump pypa/gh-action-pypi-publish from 1.11.0 to 1.12.2 (#254)
dependabot[bot] Nov 11, 2024
a4cd369
Fix documentation theme configuration (#253)
kafitzgerald Nov 11, 2024
42f6fc3
Update tests and turn on image comparison testing in CI (#257)
kafitzgerald Dec 9, 2024
3179551
Update citation docs and remove broken link (#260)
kafitzgerald Dec 11, 2024
745c2c9
[pre-commit.ci] pre-commit autoupdate (#255)
pre-commit-ci[bot] Dec 11, 2024
818cdb8
Bump pypa/gh-action-pypi-publish from 1.12.2 to 1.12.3 (#261)
dependabot[bot] Dec 16, 2024
036cae0
update docs env to avoid xarray bug
kafitzgerald Dec 18, 2024
74863a3
Merge pull request #264 from kafitzgerald/fix_xarray_docs_issue
jukent Dec 18, 2024
1754e7c
Bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4 (#267)
dependabot[bot] Jan 27, 2025
2fba1b3
Update CODE_OF_CONDUCT.md
erogluorhan Jan 31, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- name: tests
run: |
python -m pytest
python -m pytest --mpl

link-check:
runs-on: ubuntu-latest
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/pre-commit.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
python -m twine check dist/*

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.9.0
uses: pypa/gh-action-pypi-publish@v1.12.4
with:
skip-existing: true
verbose: true
24 changes: 15 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
repos:
- repo: https://github.com/pre-commit/mirrors-yapf # To format the code to conform YAPF
rev: v0.31.0
- repo: https://github.com/google/yapf # To format the code to conform YAPF
rev: v0.43.0
hooks:
- id: yapf
args: ['--in-place', '--recursive', '--style', 'google']
require_serial: true

- repo: https://github.com/myint/docformatter # To format the doc strings to conform PEP257
rev: v1.4
hooks:
- id: docformatter
args: [--in-place]

# - repo: https://github.com/PyCQA/docformatter # To format the doc strings to conform PEP257
# rev: v1.7.5
# hooks:
# - id: docformatter
# args: [--in-place]
#
- repo: https://github.com/pre-commit/pre-commit-hooks # Some common pre-commit hooks
rev: v3.4.0
rev: v5.0.0
hooks:
- id: check-yaml # Checks the syntax of .yaml files.
args: [--allow-multiple-documents]
exclude: 'meta.yaml' # Exclude this because it gives an error for '%' in Line 1 and couldn't fix yet
- id: end-of-file-fixer # Makes sure files end with a newline.
- id: trailing-whitespace # Checks for any tabs or spaces after the last non-whitespace character on the line.
- id: check-docstring-first # Checks that code comes after the docstrings.
- id: check-yaml # Check valid yml file

ci:
autofix_prs: false
autoupdate_schedule: monthly
9 changes: 4 additions & 5 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Examples of behaviors that contribute to a positive environment include:
Examples of unacceptable behavior include, but are not limited to:

- Harassment, intimidation, or discrimination in any form
- Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested
- Physical, verbal, or written abuse by anyone to anyone
- Unwelcome sexual attention or advances
- Personal attacks directed at other guests, members, participants, etc.
- Publishing others’ private information, such as a physical or electronic address, without explicit permission
Expand Down Expand Up @@ -68,9 +68,8 @@ Upon receipt of a complaint, the project administrator(s) may take any action de
circumstances. Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits,
email, issues, and other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently
any contributor for other behaviors that are deemed inappropriate, threatening, offensive, or harmful. Project administrators
also have the right to report violations to UCAR HR and/or UCAR’s Office of Diversity, Equity and Inclusion (ODEI), as well
as a participant’s home institution and/or law enforcement. In the event an incident is reported to UCAR, UCAR will follow
its Harassment Reporting and Complaint Procedure.
also have the right to report violations to UCAR HR, as well as a participant’s home institution and/or law enforcement. In
the event an incident is reported to UCAR, UCAR will follow its Harassment Reporting and Complaint Procedure.

## Attribution

Expand All @@ -79,4 +78,4 @@ Participant Code of Conduct, which also borrows from the American Geophysical Un
Code of Conduct applies to both UCAR employees as well as participants in activities run by UCAR. The original version of this
for all software projects that have strong management from UCAR or UCAR staff is available on the UCAR website at
[https://doi.org/10.5065/6w2c-a132](https://doi.org/10.5065/6w2c-a132). The date that it was adopted by this project was 2
October 2023. When responding to complaints, UCAR HR and ODEI will do so based on the latest published version.
October 2023. When responding to complaints, UCAR HR will do so based on the latest published version.
2 changes: 1 addition & 1 deletion build_envs/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- myst-nb
- nbsphinx
- sphinx-design
- xarray
- xarray!=2024.11.0
- geocat-datafiles
- pip:
- -e ..
35 changes: 13 additions & 22 deletions docs/citation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,24 @@ users to access older releases. This ensures that users are not only able to cit
software version through DOIs but are also able to download & use the corresponding release for
reproducibility purposes.

Please find DOIs for all the GeoCAT-viz versions `here
<https://zenodo.org/search?page=1&size=20&q=conceptrecid:%226678345%22&sort=-version&all_versions=True>`_.
DOIs for all the GeoCAT-viz versions can be found `here on Zenodo
<https://zenodo.org/search?q=parent.id%3A6678345&f=allversions%3Atrue&l=list&p=1&s=10&sort=version>`_.

Example citations
^^^^^^^^^^^^^^^^^

If you would like to cite GeoCAT-viz as a whole (without referring to a specific version), use
the following text:

**Visualization & Analysis Systems Technologies. (2020).
Geoscience Community Analysis Toolkit: GeoCAT-viz [Software].
Boulder, CO: NSF NCAR Computational and Information Systems Lab. doi:10.5281/zenodo.6678345.**

Instead, if you would like to cite a specific version of GeoCAT-viz, use the following text:

**Visualization & Analysis Systems Technologies. (\<Year\>).
Geoscience Community Analysis Toolkit: GeoCAT-viz (v\<version\>) [Software].
Boulder, CO, USA: NSF NCAR Computational and Information Systems Lab. doi:\<DOI\>.**

In the above citation text, update the year, GeoCAT-viz version, and DOI as appropriate. For
example:
Citing a specific version of GeoCAT-viz:

**Visualization & Analysis Systems Technologies. (2022).
Geoscience Community Analysis Toolkit: GeoCAT-viz (v2022.05.0) [Software].
Boulder, CO, USA: NSF NCAR Computational and Information Systems Lab. doi:10.5281/zenodo.6678351.**

Please note: The DOI minting service, Zenodo, might be suggesting their own citation text (as
they are the publisher of such DOIs) in their website. We prefer the text we recommend here to be used;
however, either way is acceptable.
.. attention::

Requires updating the year, GeoCAT-viz version, and DOI

Citing GeoCAT-viz without referring to a specific version:

For further information, please refer to
`GeoCAT homepage - Citation <https://geocat.ucar.edu/pages/citation.html>`_.
**Visualization & Analysis Systems Technologies. (2020).
Geoscience Community Analysis Toolkit: GeoCAT-viz [Software].
Boulder, CO: NSF NCAR Computational and Information Systems Lab. doi:10.5281/zenodo.6678345.**
47 changes: 24 additions & 23 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,30 @@ def __getattr__(cls, name):
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = dict(
# analytics_id='' this is configured in rtfd.io
# canonical_url="",
repository_url="https://github.com/NCAR/geocat-viz",
repository_branch="main",
path_to_docs="docs",
use_edit_page_button=True,
use_repository_button=True,
use_issues_button=True,
home_page_in_toc=False,
navbar_footer_text="",
extra_footer=
"<em>This material is based upon work supported by the NSF National Center for Atmospheric Research, a major facility sponsored by the U.S. National Science Foundation and managed by the University Corporation for Atmospheric Research. Any opinions, findings and conclusions or recommendations expressed in this material do not necessarily reflect the views of the U.S. National Science Foundation.</em>",
)
html_theme_options = {
"repository_url":
"https://github.com/NCAR/geocat-viz",
"repository_branch":
"main",
"path_to_docs":
"docs",
"use_edit_page_button":
True,
"use_repository_button":
True,
"use_issues_button":
True,
"home_page_in_toc":
False,
"navbar_footer_text":
"",
"logo": {
"image_light": '_static/images/logos/NSF_NCAR_light.svg',
"image_dark": '_static/images/logos/NSF_NCAR_dark.svg',
},
"extra_footer":
"<em>This material is based upon work supported by the NSF National Center for Atmospheric Research, a major facility sponsored by the U.S. National Science Foundation and managed by the University Corporation for Atmospheric Research. Any opinions, findings and conclusions or recommendations expressed in this material do not necessarily reflect the views of the U.S. National Science Foundation.</em>",
}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
Expand All @@ -237,15 +247,6 @@ def __getattr__(cls, name):
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_theme_options = {
"logo": {
"image_light": '_static/images/logos/NSF_NCAR_light.svg',
"image_dark": '_static/images/logos/NSF_NCAR_dark.svg',
}
}

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ plotting packages.

Release Notes <release-notes.rst>
Contributor's Guide <contrib.rst>
Roadmap <https://geocat.ucar.edu/pages/roadmap.html>

.. toctree::
:maxdepth: 2
Expand Down
10 changes: 9 additions & 1 deletion docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@
Release Notes
=============

v2024.07.0 (unreleased)
v2024.xx.0 (unreleased)
---------------------------

Documentation
^^^^^^^^^^^^^
* Remove link to broken NCL_vector_5.py example by `Katelyn FitzGerald`_ in (pr::`249`)
* Fix documentation theme configuration by `Katelyn FitzGerald`_ in (pr::`253`)
* Minor updates and removal of broken link on citation page by`Katelyn FitzGerald`_ in (pr::`260`)

Internal Changes
^^^^^^^^^^^^^^^^
* Update pre-commit versions and configuration by `Katelyn FitzGerald`_ in (:pr:`247`)
* Remove M1 workaround for CI and tokens that are no longer needed by `Katelyn FitzGerald`_ in (:pr:`232`)
* Modify tests to avoid hitting an unrelated Xarray bug and turn on image comparison testing by `Katelyn FitzGerald`_ in (:pr:`257`)

Testing
^^^^^^^
Expand Down
3 changes: 2 additions & 1 deletion src/geocat/viz/taylor.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,8 @@ def add_ygrid(self,

*arr*.

This method will be deprecated in favor of `TaylorDiagram.add_std_grid()`
This method will be deprecated in favor of
`TaylorDiagram.add_std_grid()`
"""

warnings.warn(
Expand Down
2 changes: 0 additions & 2 deletions src/geocat/viz/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@ def add_height_from_pressure_axis(ax,
- `NCL_h_lat_6.py <https://geocat-examples.readthedocs.io/en/latest/gallery/Contours/NCL_h_lat_6.html?highlight=add_height_from_pressure_axis>`_

- `NCL_h_lat_7.py <https://geocat-examples.readthedocs.io/en/latest/gallery/Contours/NCL_h_lat_7.html?highlight=add_height_from_pressure_axis>`_

- `NCL_h_vector_5.py <https://geocat-examples.readthedocs.io/en/latest/gallery/Vectors/NCL_vector_5.html?highlight=add_height_from_pressure_axis>`_
"""

# Create the right hand axis, inheriting from the left
Expand Down
Binary file modified tests/baseline/test_plot_contour_labels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline/test_xr_add_cyclic_longitudes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 6 additions & 18 deletions tests/test_taylor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
from geocat.viz.taylor import TaylorDiagram


@pytest.mark.mpl_image_compare(tolerance=0.02,
remove_text=True,
style='default')
@pytest.mark.mpl_image_compare(tolerance=2, remove_text=True, style='default')
def test_add_model_set():
fig = plt.figure(figsize=(10, 10))
taylor = TaylorDiagram(fig=fig, label='REF')
Expand All @@ -21,9 +19,7 @@ def test_add_model_set():
return fig


@pytest.mark.mpl_image_compare(tolerance=0.02,
remove_text=True,
style='default')
@pytest.mark.mpl_image_compare(tolerance=2, remove_text=True, style='default')
def test_add_legend():
fig = plt.figure(figsize=(10, 10))
taylor = TaylorDiagram(fig=fig, label='REF')
Expand All @@ -50,9 +46,7 @@ def test_add_legend():
return fig


@pytest.mark.mpl_image_compare(tolerance=0.02,
remove_text=True,
style='default')
@pytest.mark.mpl_image_compare(tolerance=2, remove_text=True, style='default')
def test_add_bias_legend():
fig = plt.figure(figsize=(10, 10))
taylor = TaylorDiagram(fig=fig, label='REF')
Expand All @@ -72,9 +66,7 @@ def test_add_bias_legend():
return fig


@pytest.mark.mpl_image_compare(tolerance=0.02,
remove_text=True,
style='default')
@pytest.mark.mpl_image_compare(tolerance=2, remove_text=True, style='default')
def test_add_model_name():
fig = plt.figure(figsize=(10, 10))
taylor = TaylorDiagram(fig=fig, label='REF')
Expand All @@ -94,9 +86,7 @@ def test_add_model_name():
return fig


@pytest.mark.mpl_image_compare(tolerance=0.02,
remove_text=True,
style='default')
@pytest.mark.mpl_image_compare(tolerance=2, remove_text=True, style='default')
def test_add_corr_grid():
fig = plt.figure(figsize=(10, 10))
taylor = TaylorDiagram(fig=fig, label='REF')
Expand All @@ -116,9 +106,7 @@ def test_add_corr_grid():
return fig


@pytest.mark.mpl_image_compare(tolerance=0.02,
remove_text=True,
style='default')
@pytest.mark.mpl_image_compare(tolerance=2, remove_text=True, style='default')
def test_add_contours():
fig = plt.figure(figsize=(10, 10))
taylor = TaylorDiagram(fig=fig, label='REF')
Expand Down
Loading