-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
8,711 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
[flake8] | ||
max-line-length = 80 | ||
ignore = E501,W503,E302,E402,E203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
*~ | ||
*.swp | ||
*.pyc | ||
*.egg-info | ||
.nfs* | ||
.coverage* | ||
*.DS_Store | ||
.envrc | ||
coverage.xml | ||
test_results.xml | ||
junit-coverage.xml | ||
html/ | ||
build/ | ||
doc/api/ | ||
dist/ | ||
cache/ | ||
.venv/ | ||
_citools/ | ||
_work/ | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
changelog.md | ||
.pixi/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
include: | ||
- project: software/dev-profile | ||
file: /gitlab/pixi.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 24.4.2 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/docformatter | ||
rev: v1.7.5 | ||
hooks: | ||
- id: docformatter | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.10.0 | ||
hooks: | ||
- id: mypy | ||
args: [ | ||
--install-types, | ||
--non-interactive, | ||
--no-strict-optional, | ||
--ignore-missing-imports, | ||
] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.15.2 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-added-large-files | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: check-json | ||
- id: debug-statements | ||
- id: check-case-conflict | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
- repo: https://github.com/fsfe/reuse-tool | ||
rev: v3.0.2 | ||
hooks: | ||
- id: reuse | ||
exclude: | | ||
(?x)( | ||
^.pixi/| | ||
^.pixi.lock| | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# SPDX-FileCopyrightText: Copyright © 2023 Idiap Research Institute <contact@idiap.ch> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
version: 2 | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.11" | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: auto-intersphinx | ||
Upstream-Contact: André Anjos <andre.anjos@idiap.ch> | ||
Source: https://gitlab.idiap.ch/bob/auto-intersphinx/ | ||
|
||
Files: | ||
pixi.lock | ||
src/auto_intersphinx/catalog.json | ||
tests/data/* | ||
Copyright: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
License: BSD-3-Clause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Copyright (c) <year> <owner>. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
SPDX-License-Identifier: BSD-3-Clause | ||
--> | ||
|
||
[![latest-docs](https://img.shields.io/badge/docs-latest-orange.svg)](https://auto-intersphinx.readthedocs.io/en/latest/) | ||
[![build](https://gitlab.idiap.ch/software/auto-intersphinx/badges/main/pipeline.svg)](https://gitlab.idiap.ch/software/auto-intersphinx/commits/main) | ||
[![coverage](https://gitlab.idiap.ch/software/auto-intersphinx/badges/main/coverage.svg)](https://www.idiap.ch/software/biosignal/docs/software/auto-intersphinx/main/coverage/index.html) | ||
[![repository](https://img.shields.io/badge/gitlab-project-0000c0.svg)](https://gitlab.idiap.ch/software/auto-intersphinx) | ||
|
||
# Automatically Links Package Documentation from Their Names | ||
|
||
This package contains a [Sphinx](https://www.sphinx-doc.org/) plugin that can | ||
fill | ||
[intersphinx](https://www.sphinx-doc.org/en/main/usage/extensions/intersphinx.html) | ||
mappings based on package names. It simplifies the use of that plugin by | ||
removing the need of knowing URLs for various API catologs you may want to | ||
cross-reference. | ||
|
||
For installation and usage instructions, check-out our documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
.. | ||
.. SPDX-License-Identifier: BSD-3-Clause | ||
.. _auto_intersphinx.api: | ||
|
||
============ | ||
Python API | ||
============ | ||
|
||
This section includes information for using the Python API of | ||
``auto-intersphinx``. | ||
|
||
.. autosummary:: | ||
:toctree: api | ||
|
||
auto_intersphinx | ||
auto_intersphinx.catalog | ||
|
||
|
||
.. include:: links.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
.. SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
.. | ||
.. SPDX-License-Identifier: BSD-3-Clause | ||
======================== | ||
Command-line Interface | ||
======================== | ||
|
||
This section includes information for using scripts shipped with | ||
``auto-intersphinx``. | ||
|
||
|
||
auto-intersphinx | ||
---------------- | ||
|
||
.. argparse:: | ||
:module: auto_intersphinx.cli | ||
:func: make_parser | ||
:prog: auto-intersphinx | ||
:nosubcommands: | ||
:nodescription: | ||
|
||
Commands to handle sphinx catalogs. | ||
|
||
Sub-commands: | ||
|
||
* :ref:`auto_intersphinx.cli.check_packages`: Discover documentation cross-references for packages | ||
* :ref:`auto_intersphinx.cli.dump_objects`: Dumps all the objects given an (inter) Sphinx inventory URL | ||
* :ref:`auto_intersphinx.cli.update_catalog`: Discover documentation cross-references for packages | ||
|
||
|
||
.. _auto_intersphinx.cli.check_packages: | ||
|
||
check-packages | ||
-------------- | ||
|
||
.. argparse:: | ||
:module: auto_intersphinx.cli | ||
:func: make_parser | ||
:prog: auto-intersphinx | ||
:path: check-packages | ||
|
||
|
||
.. _auto_intersphinx.cli.dump_objects: | ||
|
||
dump-objects | ||
------------ | ||
|
||
.. argparse:: | ||
:module: auto_intersphinx.cli | ||
:func: make_parser | ||
:prog: auto-intersphinx | ||
:path: dump-objects | ||
|
||
|
||
.. _auto_intersphinx.cli.update_catalog: | ||
|
||
update-catalog | ||
-------------- | ||
|
||
.. argparse:: | ||
:module: auto_intersphinx.cli | ||
:func: make_parser | ||
:prog: auto-intersphinx | ||
:path: update-catalog | ||
|
||
|
||
.. include:: links.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# SPDX-FileCopyrightText: Copyright © 2022 Idiap Research Institute <contact@idiap.ch> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
import os | ||
import time | ||
|
||
from importlib.metadata import distribution | ||
|
||
# -- General configuration ----------------------------------------------------- | ||
|
||
# If your documentation needs a minimal Sphinx version, state it here. | ||
needs_sphinx = "1.3" | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be extensions | ||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | ||
extensions = [ | ||
"sphinx.ext.todo", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.doctest", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.viewcode", | ||
"auto_intersphinx", | ||
"sphinx_autodoc_typehints", | ||
"sphinx_copybutton", | ||
"sphinx_inline_tabs", | ||
"sphinxarg.ext", | ||
] | ||
|
||
# Be picky about warnings | ||
nitpicky = True | ||
|
||
# Ignores stuff we can't easily resolve on other project's sphinx manuals | ||
nitpick_ignore = [] | ||
|
||
# Allows the user to override warnings from a separate file | ||
if os.path.exists("nitpick-exceptions.txt"): | ||
for line in open("nitpick-exceptions.txt"): | ||
if line.strip() == "" or line.startswith("#"): | ||
continue | ||
dtype, target = line.split(None, 1) | ||
target = target.strip() | ||
nitpick_ignore.append((dtype, target)) | ||
|
||
# Always includes todos | ||
todo_include_todos = True | ||
|
||
# Generates auto-summary automatically | ||
autosummary_generate = True | ||
|
||
# Create numbers on figures with captions | ||
numfig = True | ||
|
||
# If we are on OSX, the 'dvipng' path maybe different | ||
dvipng_osx = "/Library/TeX/texbin/dvipng" | ||
if os.path.exists(dvipng_osx): | ||
pngmath_dvipng = dvipng_osx | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ["_templates"] | ||
|
||
# The suffix of source filenames. | ||
source_suffix = ".rst" | ||
|
||
# The main toctree document. | ||
master_doc = "index" | ||
|
||
# General information about the project. | ||
project = "auto-intersphinx" | ||
package = distribution(project) | ||
|
||
copyright = f"{time.strftime('%Y')}, Idiap Research Institute" # noqa: A001 | ||
|
||
# The short X.Y version. | ||
version = package.version | ||
# The full version, including alpha/beta/rc tags. | ||
release = version | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
exclude_patterns = ["links.rst"] | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = "sphinx" | ||
pygments_dark_style = "monokai" | ||
|
||
# A list of ignored prefixes for module index sorting. | ||
# modindex_common_prefix = [] | ||
|
||
# Some variables which are useful for generated material | ||
project_variable = project.replace(".", "_") | ||
short_description = package.metadata["Summary"] | ||
owner = ["Idiap Research Institute"] | ||
|
||
# -- Options for HTML output --------------------------------------------------- | ||
|
||
html_theme = "furo" | ||
|
||
html_theme_options = { | ||
"source_edit_link": f"https://gitlab.idiap.ch/software/{project}/-/edit/main/doc/{{filename}}", | ||
} | ||
|
||
html_title = f"{project} {release}" | ||
|
||
# -- Post configuration -------------------------------------------------------- | ||
|
||
# Default processing flags for sphinx | ||
autodoc_member_order = "bysource" | ||
autodoc_default_options = { | ||
"members": True, | ||
"undoc-members": True, | ||
"show-inheritance": True, | ||
} | ||
|
||
auto_intersphinx_packages = [("python", "3"), "sphinx", "requests", "packaging"] | ||
auto_intersphinx_catalog = "catalog.json" |
Oops, something went wrong.