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

moved latest warning banner logic to conf.py #5508

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

tkknight
Copy link
Contributor

🚀 Pull Request

Description

Moved the latest warning banner logic from a template into conf.py. A recent feature added to the pydata-sphinx-theme allows this, see https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/announcements.html#provide-local-html-in-your-theme

The theme does have a version switcher banner (see https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/version-dropdown.html) but this uses a json file to list all versions. We automate this via Read The Docs so was not a suitable option, just using the announcement feature works.

Current banner

image

New banner (this PR)

image

The text is also shortened which reads better imho. Note the "dirty" release version, this is due to the docs being built locally and not on Read the Docs. This new banner is only visible once build on Read The Docs AND it is the latest docs, so this PR docs build should work but not show the banner. This was tested by overriding some variables, see https://github.com/SciTools/iris/blob/main/docs/src/conf.py#L57

A whatsnew will be done in a separate PR.


Consult Iris pull request check list

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (10cec69) 89.37% compared to head (acffb1b) 89.37%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5508   +/-   ##
=======================================
  Coverage   89.37%   89.37%           
=======================================
  Files          89       89           
  Lines       22446    22446           
  Branches     5387     5387           
=======================================
  Hits        20061    20061           
  Misses       1639     1639           
  Partials      746      746           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ESadek-MO ESadek-MO self-requested a review October 25, 2023 09:52
@bjlittle bjlittle mentioned this pull request Oct 26, 2023
1 task
@bjlittle bjlittle requested review from bjlittle and removed request for ESadek-MO October 26, 2023 11:11
Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkknight This is a lovely change. Great to see this pulled into the conf.py, where it's more visible.

Thanks 🍻

Please add your whatsnew comment in a follow-on PR 👍 (as agreed)

@bjlittle bjlittle merged commit cc52dca into SciTools:main Oct 26, 2023
16 checks passed
tkknight added a commit to tkknight/iris that referenced this pull request Oct 26, 2023
* upstream/main:
  moved latest warning banner logic to conf.py (SciTools#5508)
  updated layout of top navbar (SciTools#5505)
  Oblique and Rotated Mercator (SciTools#5548)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5549)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5527)
  Bump scitools/workflows from 2023.09.1 to 2023.10.0 (SciTools#5540)
  nep29 drop table schedule numpy>1.21 (SciTools#5525)
  Updated environment lockfiles (SciTools#5545)
  Replaced `NotImplementedError` with `NotImplemented` (SciTools#5544)
  Gallery: show colour bar stealing space from multiple axes (SciTools#5537)
  Updated environment lockfiles (SciTools#5524)
  Set some memory benchmarks to on-demand to reduce noise. (SciTools#5481)
  updating docs and stale comment (SciTools#5522)
  Ensure removal of release candidate from What's New title. (SciTools#5526)
  Updated environment lockfiles (SciTools#5513)
  Docs page on filtering warnings (SciTools#5509)
  Replaced pkg_resources version parser with packager version parser. (SciTools#5511)
  Categorise warnings (SciTools#5498)
  Updated all np.product calls to np.prod (SciTools#5493)
@tkknight tkknight mentioned this pull request Oct 26, 2023
@tkknight tkknight deleted the warning_bar branch November 9, 2023 15:13
HGWright added a commit to HGWright/iris that referenced this pull request Nov 17, 2023
* 'guess_coord' of github.com:HGWright/iris: (82 commits)
  [pre-commit.ci] auto fixes from pre-commit.com hooks
  [pre-commit.ci] pre-commit autoupdate (SciTools#5579)
  Relicense to from LGPL-3 to BSD-3 (SciTools#5577)
  Allow `add_season_year()` to optionally send spans backwards (SciTools#5573)
  Added xarray phrasebook doc page (SciTools#5564)
  fixed spacing (SciTools#5572)
  DOCS: Removed broken git links. (SciTools#5569)
  More sensible time axis and tick labels for 2D plots (SciTools#5561)
  removed now incorrect statement. (SciTools#5555)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5558)
  Exempt major release label from stalebot (SciTools#5559)
  updated link (SciTools#5556)
  Added whatsnew. (SciTools#5552)
  moved latest warning banner logic to conf.py (SciTools#5508)
  updated layout of top navbar (SciTools#5505)
  Oblique and Rotated Mercator (SciTools#5548)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5549)
  [pre-commit.ci] pre-commit autoupdate (SciTools#5527)
  Bump scitools/workflows from 2023.09.1 to 2023.10.0 (SciTools#5540)
  nep29 drop table schedule numpy>1.21 (SciTools#5525)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants