Skip to content

Commit

Permalink
Add basic documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed Jan 29, 2022
1 parent 753b526 commit a3cf6c9
Show file tree
Hide file tree
Showing 13 changed files with 188 additions and 23 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: GH-Pages
on: [push, pull_request]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Checkout
uses: actions/checkout@v2.3.1

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build
run: |
cd docs
make html
touch ./_build/html/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
branch: gh-pages
folder: ./docs/_build/html
git-config-name: Nicola Coretti
git-config-email: nico.coretti@gmail.com
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_build/
*.egg-info
.tox
*.orig
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include .coveragerc .pylintrc .travis.yml Makefile MANIFEST.in tox.ini
include *.md *.rst *.txt contrib/* scripts/*
include *.md *.rst *.txt docs/* contrib/* scripts/*
exclude contrib/PKGBUILD
recursive-include examples *.t
recursive-include tests *.py *.sh *.t
22 changes: 0 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ The format in a nutshell:
.. _Prysk's own test suite: https://github.com/nicoretti/prysk/blob/master/tests/usage.t
.. _Perl-compatible regular expressions: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions


Installation
------------

Install using pip ::

pip install prysk

Usage
-----

Expand Down Expand Up @@ -188,17 +180,3 @@ waiting for the test shell's ``stdout`` to be fully closed.

.. _unified context diff: https://en.wikipedia.org/wiki/Diff#Unified_format
.. _its own example tests: https://github.com/nicoretti/prysk/tree/master/examples


Development
-----------

Download the official development repository using Git_::

git clone https://github.com/nicoretti/prysk.git

Visit GitHub_ if you'd like to fork the project, watch for new changes, or
report issues.

.. _Git: http://git-scm.com/
.. _GitHub: https://github.com/nicoretti/prysk
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 = .
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)
76 changes: 76 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 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 = 'prysk'
author = 'Brodie Rao, Nicola Coretti & Contributors'
copyright = author
# The full version, including alpha/beta/rc tags
release = '0.8.0'

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

# 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 = ['_build', 'Thumbs.db', '.DS_Store']

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

html_context = {
"display_github": True,
"github_user": "Nicoretti",
"github_repo": project,
"github_version": "master",
"conf_py_path": "/docs/",
"source_suffix": 'rst',
}

html_theme_options = {
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'vcs_pageview_mode': '',
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False,
}

# 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']
11 changes: 11 additions & 0 deletions docs/development.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Development
-----------
Download the official development repository using Git_::

git clone https://github.com/nicoretti/prysk.git

Visit GitHub_ if you'd like to fork the project, watch for new changes, or
report issues.

.. _Git: http://git-scm.com/
.. _GitHub: https://github.com/nicoretti/prysk
3 changes: 3 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Examples
--------
TBD
3 changes: 3 additions & 0 deletions docs/format.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Format
------
TBD
25 changes: 25 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. Prysk documentation master file, created by
sphinx-quickstart on Fri Jan 28 20:26:40 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Prysk's documentation!
=================================

.. toctree::
:maxdepth: 1
:caption: Contents:

readme
installation
format
examples
development
news

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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
7 changes: 7 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Installation
------------

Install using pip ::

pip install prysk

8 changes: 8 additions & 0 deletions NEWS.rst → docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
News
======

Prysk
+++++
Version 0.8 (TBD, 2022)
---------------------------
TBD

Cram
++++
Version 0.7 (Feb. 24, 2016)
---------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/readme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../README.rst

0 comments on commit a3cf6c9

Please sign in to comment.