Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ htmlcov
.vscode

# Sphinx
docs/_build
/docs/_build
/docs/build
/docs/bin
/docs/include
/docs/share
/docs/lib

.DS_Store
*~
Expand Down
18 changes: 18 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Minimal makefile for Sphinx documentation
# You can set these variables from the command line.

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.http://sphinx-doc.org/
exit /b 1
)

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

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

:end
popd
29 changes: 29 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
alabaster==0.7.12
Babel==2.7.0
certifi==2019.9.11
chardet==3.0.4
doc8==0.8.0
docutils==0.15.2
idna==2.8
imagesize==1.1.0
Jinja2==2.10.3
MarkupSafe==1.1.1
packaging==19.2
pbr==5.4.3
Pygments==2.4.2
pyparsing==2.4.2
pytz==2019.3
requests==2.22.0
restructuredtext-lint==1.3.0
six==1.12.0
snowballstemmer==2.0.0
Sphinx==2.2.0
sphinx-rtd-theme==0.4.3
sphinxcontrib-applehelp==1.0.1
sphinxcontrib-devhelp==1.0.1
sphinxcontrib-htmlhelp==1.0.2
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.2
sphinxcontrib-serializinghtml==1.1.3
stevedore==1.31.0
urllib3==1.25.6
7 changes: 7 additions & 0 deletions docs/scripts/doc8_style_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# halt script on error
set -e
# Check for Style Code Violations
# (Here D000 is ignored to bypass the include statement errors as the files we are including are
# not in the same source folder as the include statement.)
doc8 --max-line-length 100 source --ignore D000 --quiet
5 changes: 5 additions & 0 deletions docs/scripts/sphinx_build_link_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# halt script on error
set -e
# Build locally, and then check links
sphinx-build -E -W -b linkcheck source build
125 changes: 125 additions & 0 deletions docs/source/comprehensive_installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
Comprehensive Installation
==========================

DeltaCode requires Python 2.7.x and is tested on Linux, Mac, and Windows. Make sure Python 2.7 is
installed first.

System Requirements
-------------------

- Hardware : DeltaCode will run best with a modern X86 processor and at least 1GB of RAM and 250MB
of disk.

- Supported operating systems : DeltaCode should run on these OSes:

#. Linux: on most recent 64-bit Linux distributions (32-bit distros are only partially
supported),
#. Mac: on recent Mac OSX (10.6.8 and up),
#. Windows: on Windows 7 and up (32- or 64-bit) using a 32-bit Python.

Prerequisites
-------------

DeltaCode needs a Python 2.7 interpreter.

- **On Linux**:

Use your package manager to install ``python2.7``. If Python 2.7 is not available from your
package manager, you must compile it from sources.

For instance, visit https://github.com/dejacode/about-code-tool/wiki/BuildingPython27OnCentos6
for instructions to compile Python from sources on Centos.

- **On Windows**:

Use the Python 2.7 32-bit (e.g. the Windows x86 MSI installer) for X86 regardless of whether
you run Windows on 32-bit or 64-bit. **DO NOT USE Python X86_64 installer** even if you run
64 bit Windows.

Download Python from this url:
https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi

Install Python on the c: drive and use all default installer options.
See the Windows installation section for more installation details.

- **On Mac**:

Download and install Python from this url:

https://www.python.org/ftp/python/2.7.14/python-2.7.14-macosx10.6.pkg

Installation on Linux and Mac
-----------------------------

Download and extract the latest ScanCode release from:
https://github.com/nexB/deltacode/releases/latest

Open a terminal in the extracted directory and run::

./deltacode --help

This will configure DeltaCode and display the command line help.

Installation on Windows
-----------------------

Download the latest ScanCode release zip file from:
https://github.com/nexB/deltacode/releases/latest

- In Windows Explorer, select the downloaded DeltaCode zip and right-click.

- In the pop-up menu select 'Extract All...'

- In the pop-up window 'Extract zip folders' use the default options to extract.

- Once the extraction is complete, a new Windows Explorer window will pop-up.

- In this Explorer window, select the new folder that was created and right-click.

- In the pop-up menu select 'Properties'

- In the pop-up window 'Properties', select the Location value. Copy this in clipboard.

- Press the start menu button.

- In the search box type

::

cmd

- Select 'cmd.exe' listed in the search results.

- A new 'cmd.exe' window pops-up.

- In this window (aka. a command prompt), type this (this is 'cd' followed by a space)

::

cd

- then right-click in this window and select Paste. This will paste the path where you extracted
DeltaCode.

- Press Enter.

- This will change the current location of your command prompt to the root directory where
DeltaCode is installed.

- Then type

::

deltacode --help

- Press enter. This will configure your DeltaCode installation.

- Several messages are displayed followed by the deltacode command help.

- The installation is complete.

Un-installation
---------------

- Delete the directory in which you extracted DeltaCode.
- Delete any temporary files created in your system temp directory under a deltacode directory.
112 changes: 112 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# 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/master/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
# 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 = 'DeltaCode'
copyright = '2019, AboutCode.org'
author = 'AboutCode.org'

# The short X.Y version
version = '1.0.0'


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

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

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

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

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# 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 name of the Pygments (syntax highlighting) style to use.
pygments_style = None


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

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

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

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# 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 ---------------------------------------------

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

Loading