Skip to content

Commit

Permalink
Merge pull request #42 from levi-rs/fix-readthedocs
Browse files Browse the repository at this point in the history
Fix ReadTheDocs generation
  • Loading branch information
levi-rs committed Aug 8, 2017
2 parents 3fb318b + 0a85ae7 commit 636b2b4
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 24 deletions.
6 changes: 3 additions & 3 deletions docs/Makefile
Expand Up @@ -4,9 +4,9 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = traw
SOURCEDIR = source
BUILDDIR = build
SPHINXPROJ = TRAW
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
26 changes: 11 additions & 15 deletions docs/source/conf.py → docs/conf.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# traw documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 7 18:36:34 2017.
# TRAW documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 8 14:11:40 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
Expand Down Expand Up @@ -31,11 +31,7 @@
# 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.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode']
extensions = []

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -50,7 +46,7 @@
master_doc = 'index'

# General information about the project.
project = 'traw'
project = 'TRAW'
copyright = '2017, Levi Noecker'
author = 'Levi Noecker'

Expand All @@ -73,13 +69,13 @@
# 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 = []
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# 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 = True
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------
Expand Down Expand Up @@ -119,7 +115,7 @@
# -- Options for HTMLHelp output ------------------------------------------

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


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -146,7 +142,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'traw.tex', 'traw Documentation',
(master_doc, 'TRAW.tex', 'TRAW Documentation',
'Levi Noecker', 'manual'),
]

Expand All @@ -156,7 +152,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'traw', 'traw Documentation',
(master_doc, 'traw', 'TRAW Documentation',
[author], 1)
]

Expand All @@ -167,8 +163,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'traw', 'traw Documentation',
author, 'traw', 'One line description of project.',
(master_doc, 'TRAW', 'TRAW Documentation',
author, 'TRAW', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
37 changes: 37 additions & 0 deletions docs/credentials.rst
@@ -0,0 +1,37 @@
Credentials
-----------
The TRAW Client can pull in credentials in three ways:

* Passing parameters to ``__init__`` during traw.Client instantiation

.. code-block:: python
client = traw.Client(username='user@email.com', password='password', url='url')
# client = traw.Client(username='user@email.com', user_api_key='userapikey', url='url')
* Setting environment variables

.. code-block:: bash
$ export TRAW_USERNAME="user@email.com"
$ export TRAW_PASSWORD="userapikey"
$ # export TRAW_USER_API_KEY="userapikey" # (Optional) - in place of TRAW_PASSWORD
  $ export TRAW_URL="https://example.testrail.net"

* Writing them to a configuration file in the user's home directory

.. code-block:: bash
$ cat ~/.traw_config
[TRAW]
username = <username>
password = <password>
  # user_api_key = <user_api_key> # (Optional) - in place of password
url = <url>

You can create multiple clients to access different TestRail installations:

.. code-block:: python
client1 = traw.Client(username='user1@email.com', password='password', url='https://example.testrail.net')
client2 = traw.Client(username='user2@email.com', password='password', url='https://your.domain.com')
8 changes: 5 additions & 3 deletions docs/source/index.rst → docs/index.rst
@@ -1,15 +1,17 @@
.. traw documentation master file, created by
sphinx-quickstart on Mon Aug 7 18:36:34 2017.
.. TRAW documentation master file, created by
sphinx-quickstart on Tue Aug 8 14:11:40 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to traw's documentation!
Welcome to TRAW's documentation!
================================

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

credentials



Indices and tables
Expand Down
6 changes: 3 additions & 3 deletions docs/make.bat
Expand Up @@ -7,9 +7,9 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=python -msphinx
)
set SOURCEDIR=source
set BUILDDIR=build
set SPHINXPROJ=traw
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=TRAW

if "%1" == "" goto help

Expand Down

0 comments on commit 636b2b4

Please sign in to comment.