Skip to content

Commit

Permalink
Update basic doc building
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe committed Aug 27, 2024
1 parent 0980465 commit 2cae1d7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 16 deletions.
16 changes: 16 additions & 0 deletions conch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,19 @@ def concatenate_files(files):
# raise(AcousticSimError('Files for concatenation must have the same sampling rates.'))
out = np.append(out, proc)
return out


def get_conch_version() -> str:
"""
Get the current conch version
Returns
-------
str
Conch version
"""
try:
from ._version import version as __version__ # noqa
except ImportError:
__version__ = "1.0.0"
return __version__
24 changes: 9 additions & 15 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

import sys
import os
from datetime import date
sys.path.insert(0, os.path.abspath("../../"))
from conch.utils import get_conch_version # noqa

import mock

Expand Down Expand Up @@ -60,18 +63,18 @@
master_doc = 'index'

# General information about the project.
project = 'Conch'
copyright = '2017, Michael McAuliffe'
project = 'Conch-sounds'
copyright = f'2017-{date.today().year}, Michael McAuliffe'
author = 'Michael McAuliffe'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.2.0'
version = ".".join(get_conch_version().split(".", maxsplit=2)[:2])
# The full version, including alpha/beta/rc tags.
release = '0.2.0'
release = get_conch_version()

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -97,7 +100,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'pydata-sphinx-theme'
html_theme = 'pydata_sphinx_theme'

# 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
Expand All @@ -114,16 +117,7 @@
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
'donate.html',
]
}
html_sidebars = {"**": ["search-field.html", "sidebar-nav-bs.html", "sidebar-ethical-ads.html"]}


# -- Options for HTMLHelp output ------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Welcome to Conch's documentation!
:maxdepth: 2
:caption: Contents:

analysis
similarity


Indices and tables
Expand Down
1 change: 0 additions & 1 deletion rtd_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dependencies:
- sphinx
- numpydoc
- sphinx-design
- sphinx-click
- sphinx-intl
- pydata-sphinx-theme
- myst-parser
Expand Down

0 comments on commit 2cae1d7

Please sign in to comment.