Skip to content

Commit

Permalink
Merge pull request #46 from JSchmie/sphinx_action
Browse files Browse the repository at this point in the history
Sphinx action
  • Loading branch information
JSchmie authored Feb 12, 2024
2 parents abff572 + 96f7dce commit 9ed741b
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 7 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get install libsndfile1-dev
pip install --upgrade pip
pip install -r requirements.txt
pip install --upgrade --force-reinstall torch==1.11.0+cpu torchvision==0.12.0+cpu torchaudio==0.11.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu
pip install numpy==1.25
pip install --upgrade sphinx sphinx_rtd_theme myst-parser
pip install --upgrade markdown-it-py[plugins]
pip install --upgrade mdit-py-plugins
- name: Sphinx build
run: |
cp README.md ./source/README.md
cp LICENSE ./source/LICENSE
cp -r Pictures ./source/Pictures
sphinx-apidoc -o source scraibe/
sphinx-build -M html source docs
make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/sphinx_action' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.TOKEN_GH }}
publish_dir: ./docs/html
force_orphan: true
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ During post-diarization, each audio segment is processed by the OpenAI `Whisper`

The following graphic illustrates the whole pipeline:

![Pipeline](Pictures/pipeline.png#gh-dark-mode-only)
![Pipeline](Pictures/pipeline_light.png#gh-light-mode-only)
![Pipeline](./Pictures/pipeline.png#gh-dark-mode-only)
![Pipeline](./Pictures/pipeline_light.png#gh-light-mode-only)

## Install `ScrAIbe` :

Expand Down Expand Up @@ -131,7 +131,7 @@ The default address is: http://127.0.0.1:7860 or http://0.0.0.0:7860
After the app is running, you can upload your audio file and select the desired options.
An example is shown below:

![Gradio App](Pictures/gradio_app.png)
![Gradio App](./Pictures//gradio_app.png)


### Running a Docker container
Expand Down Expand Up @@ -177,7 +177,7 @@ For further guidance, check: https://blog.roboflow.com/use-the-gpu-in-docker/

## Documentation

For further insights, check the [documentation page]().
For further insights, check the [documentation page](https://jschmie.github.io/ScrAIbe/).

## Contributions

Expand Down Expand Up @@ -207,12 +207,12 @@ For queries contact [Jacob Schmieder]([email protected])

## License

ScrAIbe is licensed under GNU General Public License.
ScrAIbe is licensed under [GNU General Public License](LICENSE).

## Acknowledgments

Special thanks go to the KIDA project and the BMEL (Bundesministerium für Ernährung und Landwirtschaft), especially to the AI Consultancy Team.

![KIDA](Pictures/kida_dark.png#gh-dark-mode-only)   ![BMEL](Pictures/BMEL_dark.png#gh-dark-mode-only)      ![DBFZ](Pictures/DBFZ_dark.png#gh-dark-mode-only)       ![MRI](Pictures/MRI.png#gh-dark-mode-only)
![KIDA](./Pictures/kida_dark.png#gh-dark-mode-only)   ![BMEL](./Pictures/BMEL_dark.png#gh-dark-mode-only)      ![DBFZ](./Pictures/DBFZ_dark.png#gh-dark-mode-only)       ![MRI](./Pictures/MRI.png#gh-dark-mode-only)

![KIDA](Pictures/kida.png#gh-light-mode-only)   ![BMEL](Pictures/BMEL.jpg#gh-light-mode-only)      ![DBFZ](Pictures/DBFZ.png#gh-light-mode-only)       ![MRI](Pictures/MRI.png#gh-light-mode-only)
![KIDA](./Pictures/kida.png#gh-light-mode-only)   ![BMEL](./Pictures/BMEL.jpg#gh-light-mode-only)      ![DBFZ](./Pictures/DBFZ.png#gh-light-mode-only)       ![MRI](./Pictures/MRI.png#gh-light-mode-only)
84 changes: 84 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../'))


# -- Project information -----------------------------------------------------

project = 'ScrAIbe: Streamlined Conversation Recording with Automated Intelligence Based Environment'
copyright = '2023, Jacob Schmieder'
author = 'Jacob Schmieder'

# The full version, including alpha/beta/rc tags
release = '0.1.1'


# -- General configuration ---------------------------------------------------

# 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.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon',
'myst_parser']

# Napoleon settings
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = True
napoleon_include_private_with_doc = True
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# Add source file parsers
source_suffix = {
'.rst': 'restructuredtext',
'.txt': 'markdown',
'.md': 'markdown',
}


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# 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']
21 changes: 21 additions & 0 deletions source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Welcome to ScrAIbe: Streamlined Conversation Recording with Automated Intelligence Based Environment's documentation!
=====================================================================================================================

.. automodule:: scraibe
:members:

.. toctree::
:maxdepth: 2
:caption: Contents:

../README.md

modules


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
7 changes: 7 additions & 0 deletions source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
scraibe
=======

.. toctree::
:maxdepth: 4

scraibe

0 comments on commit 9ed741b

Please sign in to comment.