Skip to content

Commit

Permalink
Merge pull request #850 from StingraySoftware/fix_redirects
Browse files Browse the repository at this point in the history
Fix redirects in docs; make better warning about Numba
  • Loading branch information
matteolucchini1 authored Oct 16, 2024
2 parents aee67bb + 33bb091 commit 2a861ce
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/citing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If possible, we ask that you cite a DOI corresponding to the specific version of

.. include:: _zenodo.rst

If this isn't possible — for example, because you worked with an unreleased version of the code — you can cite Stingray's `concept DOI <https://zenodo.org/help/versioning>`__, `10.5281/zenodo.1490116 <https://zenodo.org/record/1490116>`__ (`BibTeX <https://zenodo.org/record/1490116/export/hx>`__), which will always resolve to the latest release.
If this isn't possible — for example, because you worked with an unreleased version of the code — you can cite Stingray's `concept DOI <https://zenodo.org/help/versioning>`__, `10.5281/zenodo.1490116 <https://zenodo.org/records/1490116>`__ (`BibTeX <https://zenodo.org/records/1490116/export/hx>`__), which will always resolve to the latest release.

Papers
======
Expand Down
11 changes: 8 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,13 @@
# (source start file, name, description, authors, manual section).
man_pages = [("index", project.lower(), project + " Documentation", [author], 1)]

# Trust the links from doi.org, even if they might have Client errors or other minor issues
linkcheck_ignore = [r"https://doi.org/"]
# Trust the links from these sites, even if they might have Client errors or other minor issues
linkcheck_ignore = [
r"https://doi.org/",
r"https://arxiv.org/",
r"https://.*adsabs.harvard.edu/",
r"https://zenodo.org/",
]

# -- Options for the edit_on_github extension ---------------------------------

Expand Down Expand Up @@ -197,7 +202,7 @@ class Release(object):

@property
def zenodo_url(self):
return f"https://zenodo.org/record/{self.doi.split('.')[-1]}"
return f"https://zenodo.org/records/{self.doi.split('.')[-1]}"

@property
def github_url(self):
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ filterwarnings = [
"ignore:.*Number of segments used in averaging.*:UserWarning",
"ignore:.*:astropy.units.core.UnitsWarning",
"ignore:.*cannot be added to FITS Header:astropy.utils.exceptions.AstropyUserWarning",
"ignore:Numba not installed:UserWarning",
"ignore:The recommended numba package is not installed:UserWarning",
"ignore:More than 20 figures have been opened.:RuntimeWarning",
"ignore:This platform does not support:RuntimeWarning",
"ignore:Some error bars in the Averaged:UserWarning",
Expand Down
4 changes: 3 additions & 1 deletion stingray/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
from numba import njit, prange, vectorize, float32, float64, int32, int64
from numba.core.errors import NumbaValueError, NumbaNotImplementedError, TypingError
except ImportError:
warnings.warn("Numba not installed. Faking it")
warnings.warn(
"The recommended numba package is not installed. Some functionality might be slower."
)
HAS_NUMBA = False
NumbaValueError = NumbaNotImplementedError = TypingError = Exception

Expand Down

0 comments on commit 2a861ce

Please sign in to comment.