Skip to content

Commit

Permalink
Merge branch 'main' into add-linkcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
melissawm authored Nov 7, 2024
2 parents e0cbb0a + 7cb63ef commit b48a621
Show file tree
Hide file tree
Showing 205 changed files with 1,014 additions and 736 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
branches:
- main
workflow_dispatch:
inputs:
target_directory:
description: 'The directory to deploy the docs to'
required: true
default: 'dev'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -104,23 +109,6 @@ jobs:
# Downloads to '/home/runner/work/docs/docs/html'
path: html

- name: get directory name
# if this is a tag, use the tag name as the directory name else dev
env:
REF: ${{ github.ref }}
run: |
TAG="${GITHUB_REF/refs\/tags\/v/}"
VER="${TAG/a*/}" # remove alpha identifier
VER="${VER/b*/}" # remove beta identifier
VER="${VER/rc*/}" # remove rc identifier
VER="${VER/post*/}" # remove post identifier
if [[ "$REF" == "refs/tags/v"* ]]; then
echo "branch_name=$VER" >> "$GITHUB_ENV"
else
echo "branch_name=dev" >> "$GITHUB_ENV"
fi
- name: Deploy Docs
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main'))
uses: peaceiris/actions-gh-pages@v4
Expand All @@ -129,5 +117,5 @@ jobs:
external_repository: napari/napari.github.io
publish_dir: ./html
publish_branch: gh-pages
destination_dir: ${{ env.branch_name }}
destination_dir: ${{ github.event.inputs.target_directory || 'dev' }}
cname: napari.org
2 changes: 1 addition & 1 deletion EULA.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ https://napari.org.

<!-- Links -->

[napari_installers]: https://napari.org/stable/index.html#installation
[napari_installers]: https://napari.org/stable/tutorials/fundamentals/installation.html

<!-- List of EULAs starts here -->
<!--
Expand Down
4 changes: 2 additions & 2 deletions docs/_scripts/update_preference_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from qtpy.QtWidgets import QMessageBox

from napari._qt.dialogs.preferences_dialog import PreferencesDialog
from napari._qt.qt_event_loop import get_app
from napari._qt.qt_event_loop import get_qapp
from napari._qt.qt_resources import get_stylesheet
from napari.settings import NapariSettings

Expand Down Expand Up @@ -99,7 +99,7 @@ def generate_images():
section of the docs.
"""

app = get_app()
app = get_qapp()
pref = PreferencesDialog()
pref.setStyleSheet(get_stylesheet("dark"))
pref.show()
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
19 changes: 17 additions & 2 deletions docs/_static/version_switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,26 @@
"url": "https://napari.org/dev/"
},
{
"name": "stable (0.5.1)",
"version": "0.5.1",
"name": "stable (0.5.4)",
"version": "0.5.4",
"preferred": true,
"url": "https://napari.org/stable/"
},
{
"name": "0.5.3",
"version": "0.5.3",
"url": "https://napari.org/0.5.3/"
},
{
"name": "0.5.2",
"version": "0.5.2",
"url": "https://napari.org/0.5.2/"
},
{
"name": "0.5.1",
"version": "0.5.1",
"url": "https://napari.org/0.5.1/"
},
{
"name": "0.5.0",
"version": "0.5.0",
Expand Down
9 changes: 9 additions & 0 deletions docs/_templates/calendar-template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<nav class="bd-docs-nav bd-links">
<div class="bd-toc-item navbar-nav">
<ul class="nav bd-sidenav">
<li class="toctree-l1">
<a class="reference internal" href="community/meeting_schedule.html">Community calendar</a>
</li>
</ul>
</div>
</nav>
101 changes: 52 additions & 49 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,58 @@ subtrees:
- file: further-resources/napari-workshops
- file: further-resources/sample_data
- file: gallery
- file: release/index
subtrees:
- entries:
- file: release/release_0_5_4
- file: release/release_0_5_3
- file: release/release_0_5_2
- file: release/release_0_5_1
- file: release/release_0_5_0
- file: release/release_0_4_19
- file: release/release_0_4_18
- file: release/release_0_4_17
- file: release/release_0_4_16
- file: release/release_0_4_15
- file: release/release_0_4_14
- file: release/release_0_4_13
- file: release/release_0_4_12
- file: release/release_0_4_11
- file: release/release_0_4_10
- file: release/release_0_4_9
- file: release/release_0_4_8
- file: release/release_0_4_7
- file: release/release_0_4_6
- file: release/release_0_4_5
- file: release/release_0_4_4
- file: release/release_0_4_3
- file: release/release_0_4_2
- file: release/release_0_4_1
- file: release/release_0_4_0
- file: release/release_0_3_8
- file: release/release_0_3_7
- file: release/release_0_3_6
- file: release/release_0_3_5
- file: release/release_0_3_4
- file: release/release_0_3_3
- file: release/release_0_3_2
- file: release/release_0_3_1
- file: release/release_0_3_0
- file: release/release_0_2_12
- file: release/release_0_2_11
- file: release/release_0_2_10
- file: release/release_0_2_9
- file: release/release_0_2_8
- file: release/release_0_2_7
- file: release/release_0_2_6
- file: release/release_0_2_5
- file: release/release_0_2_4
- file: release/release_0_2_3
- file: release/release_0_2_1
- file: release/release_0_2_0
- file: release/release_0_1_5
- file: release/release_0_1_3
- file: release/release_0_1_0
- file: plugins/index
subtrees:
- entries:
Expand Down Expand Up @@ -178,55 +230,6 @@ subtrees:
- file: naps/7-key-binding-dispatch
- file: naps/8-telemetry
- file: naps/9-multiple-canvases
- file: release/index
subtrees:
- entries:
- file: release/release_0_5_1
- file: release/release_0_5_0
- file: release/release_0_4_19
- file: release/release_0_4_18
- file: release/release_0_4_17
- file: release/release_0_4_16
- file: release/release_0_4_15
- file: release/release_0_4_14
- file: release/release_0_4_13
- file: release/release_0_4_12
- file: release/release_0_4_11
- file: release/release_0_4_10
- file: release/release_0_4_9
- file: release/release_0_4_8
- file: release/release_0_4_7
- file: release/release_0_4_6
- file: release/release_0_4_5
- file: release/release_0_4_4
- file: release/release_0_4_3
- file: release/release_0_4_2
- file: release/release_0_4_1
- file: release/release_0_4_0
- file: release/release_0_3_8
- file: release/release_0_3_7
- file: release/release_0_3_6
- file: release/release_0_3_5
- file: release/release_0_3_4
- file: release/release_0_3_3
- file: release/release_0_3_2
- file: release/release_0_3_1
- file: release/release_0_3_0
- file: release/release_0_2_12
- file: release/release_0_2_11
- file: release/release_0_2_10
- file: release/release_0_2_9
- file: release/release_0_2_8
- file: release/release_0_2_7
- file: release/release_0_2_6
- file: release/release_0_2_5
- file: release/release_0_2_4
- file: release/release_0_2_3
- file: release/release_0_2_1
- file: release/release_0_2_0
- file: release/release_0_1_5
- file: release/release_0_1_3
- file: release/release_0_1_0
- file: roadmaps/index
subtrees:
- entries:
Expand Down
2 changes: 1 addition & 1 deletion docs/community/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ developer community (including the SC members) fails to reach such a consensus
in a reasonable timeframe, the SC is the entity that resolves the issue.

Members of the SC also have the "owner" role within the [napari GitHub organization](https://github.com/napari)
and are ultimately responsible for managing the napari GitHub account, the [@napari_imaging](https://twitter.com/napari_imaging)
and are ultimately responsible for managing the napari GitHub account, the [@napari_imaging](https://x.com/napari_imaging)
twitter account, the [napari website](https://napari.org), and other similar napari owned resources.

The SC will be no less than three members and no more than five members,
Expand Down
21 changes: 20 additions & 1 deletion docs/community/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,32 @@ There are several different ways to be a part of the napari community. From
being a code or documentation contributor, to creating educational content or
examples, you are welcome to help develop and improve napari.

## Questions

To ask questions and interact with the team, you can join our
[zulip chat](https://napari.zulipchat.com/login/) or participate in our
[meetings](meeting-schedule).

To ask general questions about napari usage to the community, including plugins,
you can visit ![forum image.sc logo](../images/image_sc_logo.png) [forum.image.sc/tag/napari](https://forum.image.sc/tag/napari)

## News and updates

To trace latest news from napari you may follow us on:
* ![twitter logo](../images/twitter_logo.svg) twitter/X [napari_imaging](https://x.com/napari_imaging/)
* ![mastodon logo](../images/mastodon_logo.svg) mastodon [fosstodon.org/@napari](https://fosstodon.org/@napari)


## Contributing and Bug reporting

The napari development happens in the napari GitHub repository [github.com/napari/napari](https://github.com/napari/napari).
If you spot a bug, please check our [issues list](https://github.com/napari/napari/issues) . If you
do not find a matching report, please open a new issue.

If you are interested in contributing, check out our
[contributing guide](contributing).
[contributing guide](napari-contributing).

## Blog
To read announcements, learn more about who is using napari and see what our
community has to say, check out our blog, the
[Island Dispatch](https://napari.org/island-dispatch).
2 changes: 1 addition & 1 deletion docs/community/mission_and_values.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ As noted above, we'll be beginning to actively work on the plugin infrastructure

## Acknowledgements

We share a lot of our mission and values with the `scikit-image` project with whom we share founding members, and acknowledge the influence of their [mission and values statement](https://scikit-image.org/docs/dev/values.html) on this document.
We share a lot of our mission and values with the `scikit-image` project with whom we share founding members, and acknowledge the influence of their [mission and values statement](https://scikit-image.org/docs/stable/about/values.html) on this document.
2 changes: 1 addition & 1 deletion docs/community/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You can read a full history of the project’s founding and early development in

Over time, napari has grown to over 80 direct contributors. Talley Lambert, from Harvard Medical School, began contributing around the time of Juan's blog post, and has been a critical driver of napari's development ever since. We have core developers located in three continents and three biweekly community calls spread across the day to try to accommodate users and contributors in any time zone.

Read more about napari’s [mission and values](https://napari.org/community/mission_and_values.html), how to get started as a [contributor](https://napari.org/developers/contributing.html) or join us in our [zulip chat](https://napari.zulipchat.com/login/) for a more synchronous conversation. You can also follow us on [twitter](https://twitter.com/napari_imaging).
Read more about napari’s [mission and values](https://napari.org/stable/community/mission_and_values.html), how to get started as a [contributor](https://napari.org/stable/developers/contributing.html) or join us in our [zulip chat](https://napari.zulipchat.com/login/) for a more synchronous conversation. You can also follow us on [twitter](https://x.com/napari_imaging).

## Institutional and funding Partners

Expand Down
53 changes: 46 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@
"footer_end": ["napari-copyright"],
}

html_sidebars = {
"**": ["search-field.html", "sidebar-nav-bs"],
"index": ["search-field.html" , "calendar-template"],
}

html_context = {
# use Light theme only, don't auto switch (default)
"default_mode": "light"
Expand All @@ -139,7 +144,7 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_logo = "images/logo.png"
html_logo = "_static/images/logo.png"
html_sourcelink_suffix = ''
html_title = 'napari'

Expand Down Expand Up @@ -276,7 +281,7 @@ def napari_scraper(block, block_vars, gallery_conf):
"""
imgpath_iter = block_vars['image_path_iterator']

if app := napari.qt.get_app():
if app := napari.qt.get_qapp():
app.processEvents()
else:
return ""
Expand All @@ -294,14 +299,37 @@ def napari_scraper(block, block_vars, gallery_conf):

return scrapers.figure_rst(img_paths, gallery_conf['src_dir'])

from sphinx_gallery import gen_rst

gen_rst.EXAMPLE_HEADER = """
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "{0}"
.. LINE NUMBERS ARE GIVEN BELOW.
.. only:: html
.. note::
:class: sphx-glr-download-link-note
:ref:`Go to the end <sphx_glr_download_{1}>`
to download the full example as a Python script or as a
Jupyter notebook.{2}
.. rst-class:: sphx-glr-example-title
.. _sphx_glr_{1}:
"""

sphinx_gallery_conf = {
# path to your example scripts (this value is set in the Makefile)
# 'examples_dirs': '../../napari/examples',
'gallery_dirs': 'gallery', # path to where to save gallery generated output
'filename_pattern': '/*.py',
'ignore_pattern': 'README.rst|/*_.py',
'default_thumb_file': Path(__file__).parent / 'images' / 'logo.png',
'default_thumb_file': Path(__file__).parent / '_static' / 'images' / 'logo.png',
'plot_gallery': "'True'", # https://github.com/sphinx-gallery/sphinx-gallery/pull/304/files
'download_all_examples': False,
'min_reported_time': 10,
Expand Down Expand Up @@ -410,12 +438,23 @@ def get_attributes(item, obj, modulename):
autosummary_ignore_module_all = False

linkcheck_anchors_ignore = [r'^!', r'L\d+-L\d+', r'r\d+', r'issuecomment-\d+']

linkcheck_ignore = [
'https://napari.zulipchat.com/',
'../_tags',
'https://en.wikipedia.org/wiki/Napari#/media/File:Tabuaeran_Kiribati.jpg',
"https://napari.zulipchat.com/",
"../_tags",
"https://en.wikipedia.org/wiki/Napari#/media/File:Tabuaeran_Kiribati.jpg",
"http://localhost:8000",
"https://datadryad.org/stash/downloads/file_stream/182482",
"https://github.com/napari/docs/issues/new/choose",
"https://github.com/napari/napari/issues/new/choose",
"https://github.com/napari/napari/issues/new",
"https://napari-hub.org",
"https://github.com/napari/napari/releases/latest",
"https://onlinelibrary.wiley.com/doi/10.1002/col.20327",
]
linkcheck_allowed_redirects = {
r"https://youtu\.be/.*": r"https://www\.youtube\.com/.*",
r"https://github\.com/napari/napari/releases/download/.*": r"https://objects\.githubusercontent\.com/.*",
}


def rewrite_github_anchor(app, uri: str):
Expand Down
Loading

0 comments on commit b48a621

Please sign in to comment.