Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stefantaubert/en-tts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.2
Choose a base ref
...
head repository: stefantaubert/en-tts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 12 commits
  • 13 files changed
  • 1 contributor

Commits on Apr 23, 2024

  1. update

    stefantaubert committed Apr 23, 2024
    Copy the full SHA
    bfa9b0f View commit details
  2. update

    stefantaubert committed Apr 23, 2024
    Copy the full SHA
    8029288 View commit details

Commits on Apr 24, 2024

  1. add documentation template

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    5de4974 View commit details
  2. update

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    d82fee3 View commit details
  3. update

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    1e129f5 View commit details
  4. .

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    809d332 View commit details
  5. .

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    1c357a6 View commit details
  6. .

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    a6c7177 View commit details
  7. .

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    4713853 View commit details
  8. .

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    d814aea View commit details
  9. .

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    4e21de1 View commit details
  10. update

    stefantaubert committed Apr 24, 2024
    Copy the full SHA
    7fc3bf1 View commit details
74 changes: 74 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Documentation

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Install dependencies
run: |
python -m pip install uv
python -m uv pip install --system -r ./docs/requirements.txt
- name: Build documentation
run: sphinx-build -a -b html --keep-going ./docs/source ./docs/_build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/_build

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 6 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -17,6 +17,12 @@ build = "*"
mypy = "*"
pandas-stubs = "*"
types-tqdm = "*"
sphinx = ">=7.3.7"
furo = ">=2024.1.29"
docutils = ">=0.20.1"
sphinxcontrib-programoutput = ">=0.17"
sphinx_copybutton = ">=0.5.2"
sphinx_remove_toctrees = "*"

[packages]
numpy = ">=1.18.5"
1,208 changes: 986 additions & 222 deletions Pipfile.lock

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions docs/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)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
6 changes: 6 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sphinx==7.3.7
# Older versions break Sphinx even though they're declared to be supported.
docutils==0.20.1
sphinxcontrib-programoutput==0.17
sphinx_copybutton==0.5.2
furo==2024.1.29
126 changes: 126 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/* Prevents two-dimensional scrolling and content loss. */
h1,
code,
li {
overflow-wrap: break-word;
}

/* Provides padding to push down the "breadcrumb" navigation in nested pages. */
.content {
padding: 1em 3em;
}

/* Improves spacing around custom sidebar section*/
.sidebar-div {
margin: var(--sidebar-caption-space-above) 0 0 0;
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);
}

/* Custom sidebar heading text. Example: Feedback Section heading. */
.sidebar-heading {
color: var(--color-sidebar-caption-text);
font-size: var(--font-size--normal);
font-weight: 700;
}

/* Improves text used in custom sidebar section. Example: Feedback section content.*/
.sidebar-text {
color: var(--color-sidebar-caption-text);
font-size: var(--sidebar-item-font-size);
line-height: 1.4;
}

/* Removes empty space above the sidebar-tree (under "Feedback" section) */
.sidebar-tree {
margin-top: 0px;
}

/* Adds padding around AWS Logo in the left sidebar. */
.sidebar-logo {
padding: 20% 15%;
}

/* Hides a div by default. */
.show-div-sm {
display: none;
}

/* Hides a div by default. */
.show-div-md {
display: none;
}

/* Positions items starting from the right. */
.justify-content-right {
justify-content: right;
}

/* Positions items starting from the left. */
.justify-content-left {
justify-content: left;
}

/* Hides the sidebar and prevents keyboard users from focusing on elements. */
.hide-sidebar {
visibility: hidden;
}

/* Hides the icon by default and applies relevant styling. */
.nav-close-icon {
color: var(--color-foreground-secondary);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}

/* Safeguard for ensuring menus are always visible on larger screens. */
@media (min-width: 82em) {
.hide-sidebar {
visibility: visible;
}
}

/* We only want to show the close-icon on medium-small screens. */
@media (max-width: 67em) {

/* Displays a div on a small screen. */
.show-div-sm {
display: flex;
}
}

@media (max-width: 82em) {

/* Displays a div on a medium screen. */
.show-div-md {
display: flex;
}
}

/* Apply furo styled admonition titles for <h3>. */
h3.admonition-title {
position: relative;
margin: 0 -0.5rem 0.5rem;
padding-left: 2.5rem;
padding-right: .5rem;
padding-top: .4rem;
padding-bottom: .4rem;
font-weight: 700;
font-size: 1.5em;
line-height: 1.25;
border-radius: unset;
background-color: var(--color-admonition-title-background);
}

/* Apply furo styled admonition icons before <h3>. */
h3.admonition-title::before {
content: "";
position: absolute;
left: 0.5rem;
width: 1.5rem;
height: 1.5rem;
background-color: var(--color-admonition-title);
mask-image: var(--icon-admonition-default);
mask-repeat: no-repeat;
}
8 changes: 8 additions & 0 deletions docs/source/_templates/sidebar/close-icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="sidebar-div show-div-sm justify-content-right">
<label class="nav-close-icon" id="nav-menu-close" for="__navigation" tabindex="0">
<div class="visually-hidden">Toggle site navigation sidebar</div>
<i class="icon"><svg>
<use href="#svg-close"></use>
</svg></i>
</label>
</div>
7 changes: 7 additions & 0 deletions docs/source/_templates/sidebar/feedback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="sidebar-div">
<p class="sidebar-heading">Feedback</p>
<p class="sidebar-text">
Do you have a suggestion to improve this website or en-tts?
<a href="https://github.com/stefantaubert/en-tts/issues">Give us feedback</a>.
</p>
</div>
91 changes: 91 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# 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 -----------------------------------------------------

import datetime

from en_tts_app.globals import APP_NAME, APP_VERSION

project = APP_NAME
author = 'Stefan Taubert'

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


# -- 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.viewcode',
'sphinx_copybutton', 'sphinx_remove_toctrees']

# 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 = []

# The suffix of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
current_year = datetime.date.today().year
copyright = f'{current_year}, Stefan Taubert'

# -- 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 = 'furo'

# 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']

# List of custom CSS files relative to _static directory.
html_css_files = [
'css/custom.css',
]

# Custom sidebar templates, maps document names to template names.
html_show_sourcelink = False
html_sidebars = {
"**": [
"sidebar/close-icon.html",
"sidebar/brand.html",
"sidebar/search.html",
"sidebar/scroll-start.html",
"sidebar/feedback.html",
"sidebar/navigation.html",
"sidebar/scroll-end.html",
]
}

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = True
20 changes: 20 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. en-tts documentation master file, created by
sphinx-quickstart on Wed Apr 24 14:19:40 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to en-tts's documentation!
==================================

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



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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
10 changes: 0 additions & 10 deletions src/en_tts_app/helper.py

This file was deleted.

3 changes: 1 addition & 2 deletions src/en_tts_cli/cli.py
Original file line number Diff line number Diff line change
@@ -8,8 +8,7 @@
from tempfile import gettempdir
from typing import Callable, Generator, List, Tuple, cast

from en_tts_app import APP_NAME, APP_VERSION, get_file_logger, run_main
from en_tts_app.logging_configuration import initialize_logging
from en_tts_app import APP_NAME, APP_VERSION, get_file_logger, initialize_logging, run_main
from en_tts_cli.main import init_synthesize_eng_parser, init_synthesize_ipa_parser

INVOKE_HANDLER_VAR = "invoke_handler"