Skip to content

Commit 78640f3

Browse files
authored
Update copyright in conf.py (#4642)
1 parent 74d4272 commit 78640f3

2 files changed

Lines changed: 17 additions & 19 deletions

File tree

doc/conf.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
1313
import os
14-
import sys
1514
import shutil
16-
from pathlib import Path
15+
import datetime
16+
import importlib.util
1717
# sys.path.insert(0, os.path.abspath('.'))
1818

1919
on_rtd = os.environ.get('READTHEDOCS') == 'True'
@@ -50,7 +50,7 @@
5050
# -- Project information -----------------------------------------------------
5151

5252
project = 'SpikeInterface'
53-
copyright = '2022-2025, SpikeInterface Team'
53+
copyright = f'2022-{datetime.date.today().year}, SpikeInterface Team'
5454
author = 'SpikeInterface Team'
5555

5656

@@ -99,13 +99,12 @@
9999
# The theme to use for HTML and HTML Help pages. See the documentation for
100100
# a list of builtin themes.
101101
#
102-
try:
103-
import sphinx_rtd_theme
104102

103+
if importlib.util.find_spec("sphinx_rtd_theme") is not None:
105104
html_theme = "sphinx_rtd_theme"
106-
except ImportError:
107-
print("RTD theme not installed, using default")
108-
html_theme = 'alabaster'
105+
else:
106+
html_theme = "alabaster"
107+
109108

110109
# Add any paths that contain custom static files (such as style sheets) here,
111110
# relative to this directory. They are copied after the builtin static files,

doc/development/development.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ There are various ways to contribute to SpikeInterface as a user or developer. S
1010
* Creating a new spike sorter.
1111
* Designing a new post-processing algorithm.
1212
* Enhancing documentation, including docstrings, tutorials, and examples.
13-
* Crafting tutorials for common workflows (e.g., spike sorting, post-processing, etc.).
13+
* Crafting tutorials for common workflows (e.g., spike sorting, postprocessing, etc.).
1414
* Writing unit tests to expand code coverage and use case scenarios.
1515
* Reporting bugs and issues.
1616

@@ -384,12 +384,11 @@ In order to check if your spike sorter is installed, a :code:`try` - :code:`exce
384384
sorter is implemented in Python (installed with the package :code:`myspikesorter`), this block will look as follows:
385385

386386
.. code-block:: python
387-
388-
try:
389-
import myspikesorter
390-
HAVE_MSS = True
391-
except ImportError:
392-
HAVE_MSS = False
387+
import importlib.util
388+
if importlib.util.find_spec("myspikesorter"):
389+
HAVE_MYSORTER = True
390+
else:
391+
HAVE_MYSORTER = False
393392
394393
Then, you can start creating a new class:
395394

@@ -402,7 +401,7 @@ Then, you can start creating a new class:
402401
"""
403402
404403
sorter_name = 'myspikesorter'
405-
installed = HAVE_MSS
404+
installed = HAVE_MYSORTER
406405
407406
_default_params = {
408407
'param1': None,
@@ -436,7 +435,7 @@ Now you can start filling out the required methods:
436435
def is_installed(cls):
437436
438437
# Fill code to check sorter installation. It returns a boolean
439-
return HAVE_MSS
438+
return HAVE_MYSORTER
440439
441440
@classmethod
442441
def _setup_recording(cls, recording, output_folder, params, verbose):
@@ -498,15 +497,15 @@ Checklist
498497
* In the top level ``__init__`` (located at ``src/spikeinterface/__init__.py``) set ``DEV_MODE`` to ``False`` (this is used for the docker installations)
499498
* Create a new release note for the appropriate version on doc/releases/new_version_tag.
500499

501-
There can be large releases like:
500+
It can be a large release like:
502501

503502
``doc/releases/0.101.0.rst``
504503

505504
Which contain a section called "Main Changes" and minor releases which include only bug fixes like:
506505

507506
``doc/releases/0.101.2.rst``
508507

509-
To collect all the PRs and bug fixes we have a script in:
508+
To collect all the PRs and bug fixes we have a bash script in:
510509
``doc/scripts/``
511510
called ``auto-release-notes.sh``. Run it with ``bash auto-release-notes.sh`` and it will create the release notes for the module specific changes.
512511

0 commit comments

Comments
 (0)