Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Melle Dijkstra committed Feb 24, 2018
1 parent a68b25d commit 6b861c0
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 98 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Python Music Player
[![GitHub license](https://img.shields.io/github/license/MelleDijkstra/PythonMusicPlayer.svg)](https://github.com/MelleDijkstra/PythonMusicPlayer/blob/master/LICENSE)
[![PyPI version](https://badge.fury.io/py/melon-music-player.svg)](https://badge.fury.io/py/melon-music-player)
[![GitHub issues](https://img.shields.io/github/issues/MelleDijkstra/PythonMusicPlayer.svg)](https://github.com/MelleDijkstra/PythonMusicPlayer/issues)
[![Documentation Status](https://readthedocs.org/projects/pythonmusicplayer/badge/?version=latest)](http://pythonmusicplayer.readthedocs.io/en/latest/?badge=latest)

[![Twitter](https://img.shields.io/twitter/url/https/github.com/MelleDijkstra/PythonMusicPlayer.svg?style=social)](https://twitter.com/intent/tweet?text=MelonMusicPlayer:&url=https%3A%2F%2Fgithub.com%2FMelleDijkstra%2FPythonMusicPlayer)

Expand Down
3 changes: 1 addition & 2 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# ignore generated documentation
_build
_templates
build
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = MelonMusicPlayer
SOURCEDIR = .
BUILDDIR = _build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
4 changes: 2 additions & 2 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
set SOURCEDIR=source
set BUILDDIR=build
set SPHINXPROJ=MelonMusicPlayer

if "%1" == "" goto help
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/modules.rst → docs/source/_static/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ PythonMusicPlayer
=================

.. toctree::
:maxdepth: 4
:maxdepth: 4

mpserver
mpserver
65 changes: 36 additions & 29 deletions docs/_static/mpserver.rst → docs/source/_static/mpserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,75 +4,82 @@ mpserver package
Submodules
----------

mpserver\.grpc module
-----------------------
.. automodule:: mpserver.grpc
:members:
:undoc-members:
:show-inheritance:

mpserver\.config module
-----------------------

.. automodule:: mpserver.config
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

mpserver\.datastructures module
-------------------------------

.. automodule:: mpserver.datastructures
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

mpserver\.interfaces module
---------------------------

.. automodule:: mpserver.interfaces
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

mpserver\.musicdownloader module
--------------------------------

.. automodule:: mpserver.musicdownloader
:members:
:undoc-members:
:show-inheritance:
.. automodule:: mpserver.mediadownloader
:members:
:undoc-members:
:show-inheritance:

mpserver\.musicmodels module
----------------------------

.. automodule:: mpserver.musicmodels
:members:
:undoc-members:
:show-inheritance:
.. automodule:: mpserver.models
:members:
:undoc-members:
:show-inheritance:

mpserver\.musicplayer module
----------------------------

.. automodule:: mpserver.musicplayer
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

mpserver\.musicserver module
----------------------------

.. automodule:: mpserver.musicserver
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

mpserver\.tools module
----------------------

.. automodule:: mpserver.tools
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: mpserver
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
90 changes: 45 additions & 45 deletions docs/conf.py → docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# MelonMusicPlayer documentation build configuration file, created by
# sphinx-quickstart on Wed Jan 10 22:10:27 2018.
# Configuration file for the Sphinx documentation builder.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config

# -- 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
Expand All @@ -20,9 +15,22 @@
import os
import sys

sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../../'))


# -- General configuration ------------------------------------------------
# -- Project information -----------------------------------------------------

project = 'MelonMusicPlayer'
copyright = '2018, Melle Dijkstra'
author = 'Melle Dijkstra'

# The short X.Y version
version = '3.0'
# The full version, including alpha/beta/rc tags
release = '3.0.0-alpha'


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

# If your documentation needs a minimal Sphinx version, state it here.
#
Expand All @@ -31,7 +39,10 @@
# 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']
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -45,20 +56,6 @@
# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'MelonMusicPlayer'
copyright = '2018, Melle Dijkstra'
author = 'Melle Dijkstra'

# 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 = '2.0'
# The full version, including alpha/beta/rc tags.
release = '2.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
Expand All @@ -68,16 +65,14 @@

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

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
Expand All @@ -98,21 +93,21 @@
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
'**': [
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
]
}
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}

# -- Options for HTMLHelp output ------------------------------------------

# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'MelonMusicPlayerdoc'

# -- Options for LaTeX output ---------------------------------------------

# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
Expand Down Expand Up @@ -140,7 +135,8 @@
'Melle Dijkstra', 'manual'),
]

# -- Options for manual page output ---------------------------------------

# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
Expand All @@ -149,7 +145,8 @@
[author], 1)
]

# -- Options for Texinfo output -------------------------------------------

# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
Expand All @@ -159,3 +156,6 @@
author, 'MelonMusicPlayer', 'One line description of project.',
'Miscellaneous'),
]


# -- Extension configuration -------------------------------------------------
12 changes: 6 additions & 6 deletions docs/index.rst → docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. MelonMusicPlayer documentation master file, created by
sphinx-quickstart on Wed Jan 10 22:10:27 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
sphinx-quickstart on Sat Feb 24 23:45:08 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to MelonMusicPlayer's documentation!
============================================
Expand All @@ -11,10 +11,10 @@ If you really want good documentation, please feel free to contact me!
[email protected]**

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

_static/modules
_static/modules

Indices and tables
==================
Expand Down
5 changes: 5 additions & 0 deletions generate-docs.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
set currdir = %cd%
cd docs
make html
cd %currdir%
13 changes: 12 additions & 1 deletion mpserver/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
__all__ = ['musicplayer', 'musicserver', 'models.py', 'grpc']
__all__ = [
'config',
'datamanager',
'datastructures',
'interfaces',
'mediadownloader',
'models',
'musicplayer',
'musicserver',
'tools',
'grpc'
]
5 changes: 4 additions & 1 deletion mpserver/grpc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
__all__ = ['mmp_pb2', 'mmp_pb2_grpc']
__all__ = [
'mmp_pb2',
'mmp_pb2_grpc'
]
14 changes: 7 additions & 7 deletions mpserver/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ def print_progress_bar(iteration: int, total: int, prefix: str = '', suffix: str
"""
Call in a loop to create terminal progress bar
@params:
iteration - Required : current iteration (Int)
total - Required : total iterations (Int)
prefix - Optional : prefix string (Str)
suffix - Optional : suffix string (Str)
decimals - Optional : positive number of decimals in percent complete (Int)
length - Optional : character length of bar (Int)
fill - Optional : bar fill character (Str)
iteration - Required : current iteration (Int)
total - Required : total iterations (Int)
prefix - Optional : prefix string (Str)
suffix - Optional : suffix string (Str)
decimals - Optional : positive number of decimals in percent complete (Int)
length - Optional : character length of bar (Int)
fill - Optional : bar fill character (Str)
"""
percent = ("{0:." + str(decimals) + "f}").format(100 * (iteration / float(total)))
filled_length = int(length * iteration // total)
Expand Down

0 comments on commit 6b861c0

Please sign in to comment.