Skip to content

Commit 63f7bef

Browse files
committed
Add deltacode docs on readthedocs and Update .gitignore
Signed-off-by: ankit2001 <ankitchoudhary202.ac@gmail.com>
1 parent 6778882 commit 63f7bef

16 files changed

Lines changed: 1040 additions & 1 deletion

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ htmlcov
3737
.vscode
3838

3939
# Sphinx
40-
docs/_build
40+
/docs/_build
41+
/docs/build
42+
/docs/bin
43+
/docs/include
44+
/docs/share
45+
/docs/lib
4146

4247
.DS_Store
4348
*~

docs/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Minimal makefile for Sphinx documentation
2+
# You can set these variables from the command line.
3+
4+
SPHINXOPTS =
5+
SPHINXBUILD = sphinx-build
6+
SOURCEDIR = source
7+
BUILDDIR = build
8+
9+
# Put it first so that "make" without argument is like "make help".
10+
help:
11+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
12+
13+
.PHONY: help Makefile
14+
15+
# Catch-all target: route all unknown targets to Sphinx using the new
16+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
17+
%: Makefile
18+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
34+
:end
35+
popd

docs/requirements.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
alabaster==0.7.12
2+
Babel==2.7.0
3+
certifi==2019.9.11
4+
chardet==3.0.4
5+
doc8==0.8.0
6+
docutils==0.15.2
7+
idna==2.8
8+
imagesize==1.1.0
9+
Jinja2==2.10.3
10+
MarkupSafe==1.1.1
11+
packaging==19.2
12+
pbr==5.4.3
13+
Pygments==2.4.2
14+
pyparsing==2.4.2
15+
pytz==2019.3
16+
requests==2.22.0
17+
restructuredtext-lint==1.3.0
18+
six==1.12.0
19+
snowballstemmer==2.0.0
20+
Sphinx==2.2.0
21+
sphinx-rtd-theme==0.4.3
22+
sphinxcontrib-applehelp==1.0.1
23+
sphinxcontrib-devhelp==1.0.1
24+
sphinxcontrib-htmlhelp==1.0.2
25+
sphinxcontrib-jsmath==1.0.1
26+
sphinxcontrib-qthelp==1.0.2
27+
sphinxcontrib-serializinghtml==1.1.3
28+
stevedore==1.31.0
29+
urllib3==1.25.6

docs/scripts/doc8_style_check.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# halt script on error
3+
set -e
4+
# Check for Style Code Violations
5+
# (Here D000 is ignored to bypass the include statement errors as the files we are including are
6+
# not in the same source folder as the include statement.)
7+
doc8 --max-line-length 100 source --ignore D000 --quiet
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# halt script on error
3+
set -e
4+
# Build locally, and then check links
5+
sphinx-build -E -W -b linkcheck source build
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
Comprehensive Installation
2+
==========================
3+
4+
DeltaCode requires Python 2.7.x and is tested on Linux, Mac, and Windows. Make sure Python 2.7 is
5+
installed first.
6+
7+
System Requirements
8+
-------------------
9+
10+
- Hardware : DeltaCode will run best with a modern X86 processor and at least 1GB of RAM and 250MB
11+
of disk.
12+
13+
- Supported operating systems : DeltaCode should run on these OSes:
14+
15+
#. Linux: on most recent 64-bit Linux distributions (32-bit distros are only partially
16+
supported),
17+
#. Mac: on recent Mac OSX (10.6.8 and up),
18+
#. Windows: on Windows 7 and up (32- or 64-bit) using a 32-bit Python.
19+
20+
Prerequisites
21+
-------------
22+
23+
DeltaCode needs a Python 2.7 interpreter.
24+
25+
- **On Linux**:
26+
27+
Use your package manager to install ``python2.7``. If Python 2.7 is not available from your
28+
package manager, you must compile it from sources.
29+
30+
For instance, visit https://github.com/dejacode/about-code-tool/wiki/BuildingPython27OnCentos6
31+
for instructions to compile Python from sources on Centos.
32+
33+
- **On Windows**:
34+
35+
Use the Python 2.7 32-bit (e.g. the Windows x86 MSI installer) for X86 regardless of whether
36+
you run Windows on 32-bit or 64-bit. **DO NOT USE Python X86_64 installer** even if you run
37+
64 bit Windows.
38+
39+
Download Python from this url:
40+
https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi
41+
42+
Install Python on the c: drive and use all default installer options.
43+
See the Windows installation section for more installation details.
44+
45+
- **On Mac**:
46+
47+
Download and install Python from this url:
48+
49+
https://www.python.org/ftp/python/2.7.14/python-2.7.14-macosx10.6.pkg
50+
51+
Installation on Linux and Mac
52+
-----------------------------
53+
54+
Download and extract the latest ScanCode release from:
55+
https://github.com/nexB/deltacode/releases/latest
56+
57+
Open a terminal in the extracted directory and run::
58+
59+
./deltacode --help
60+
61+
This will configure DeltaCode and display the command line help.
62+
63+
Installation on Windows
64+
-----------------------
65+
66+
Download the latest ScanCode release zip file from:
67+
https://github.com/nexB/deltacode/releases/latest
68+
69+
- In Windows Explorer, select the downloaded DeltaCode zip and right-click.
70+
71+
- In the pop-up menu select 'Extract All...'
72+
73+
- In the pop-up window 'Extract zip folders' use the default options to extract.
74+
75+
- Once the extraction is complete, a new Windows Explorer window will pop-up.
76+
77+
- In this Explorer window, select the new folder that was created and right-click.
78+
79+
- In the pop-up menu select 'Properties'
80+
81+
- In the pop-up window 'Properties', select the Location value. Copy this in clipboard.
82+
83+
- Press the start menu button.
84+
85+
- In the search box type
86+
87+
::
88+
89+
cmd
90+
91+
- Select 'cmd.exe' listed in the search results.
92+
93+
- A new 'cmd.exe' window pops-up.
94+
95+
- In this window (aka. a command prompt), type this (this is 'cd' followed by a space)
96+
97+
::
98+
99+
cd
100+
101+
- then right-click in this window and select Paste. This will paste the path where you extracted
102+
DeltaCode.
103+
104+
- Press Enter.
105+
106+
- This will change the current location of your command prompt to the root directory where
107+
DeltaCode is installed.
108+
109+
- Then type
110+
111+
::
112+
113+
deltacode --help
114+
115+
- Press enter. This will configure your DeltaCode installation.
116+
117+
- Several messages are displayed followed by the deltacode command help.
118+
119+
- The installation is complete.
120+
121+
Un-installation
122+
---------------
123+
124+
- Delete the directory in which you extracted DeltaCode.
125+
- Delete any temporary files created in your system temp directory under a deltacode directory.

docs/source/conf.py

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/master/config
8+
9+
# -- Path setup --------------------------------------------------------------
10+
11+
# If extensions (or modules to document with autodoc) are in another directory,
12+
# add these directories to sys.path here. If the directory is relative to the
13+
# documentation root, use os.path.abspath to make it absolute, like shown here.
14+
#
15+
# import os
16+
# import sys
17+
# sys.path.insert(0, os.path.abspath('.'))
18+
19+
20+
# -- Project information -----------------------------------------------------
21+
22+
project = 'DeltaCode'
23+
copyright = '2019, AboutCode.org'
24+
author = 'AboutCode.org'
25+
26+
# The short X.Y version
27+
version = '1.0.0'
28+
29+
30+
# -- General configuration ---------------------------------------------------
31+
32+
# If your documentation needs a minimal Sphinx version, state it here.
33+
#
34+
# needs_sphinx = '1.0'
35+
36+
# Add any Sphinx extension module names here, as strings. They can be
37+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
38+
# ones.
39+
extensions = [
40+
'sphinx.ext.autodoc',
41+
'sphinx.ext.doctest',
42+
'sphinx.ext.intersphinx',
43+
'sphinx.ext.todo',
44+
'sphinx.ext.coverage',
45+
'sphinx.ext.mathjax',
46+
'sphinx.ext.ifconfig',
47+
'sphinx.ext.viewcode',
48+
'sphinx.ext.githubpages',
49+
]
50+
51+
# Add any paths that contain templates here, relative to this directory.
52+
templates_path = ['_templates']
53+
54+
# The suffix(es) of source filenames.
55+
# You can specify multiple suffix as a list of string:
56+
#
57+
# source_suffix = ['.rst', '.md']
58+
source_suffix = '.rst'
59+
60+
# The master toctree document.
61+
master_doc = 'index'
62+
63+
# The language for content autogenerated by Sphinx. Refer to documentation
64+
# for a list of supported languages.
65+
#
66+
# This is also used if you do content translation via gettext catalogs.
67+
# Usually you set "language" from the command line for these cases.
68+
language = None
69+
70+
# List of patterns, relative to source directory, that match files and
71+
# directories to ignore when looking for source files.
72+
# This pattern also affects html_static_path and html_extra_path.
73+
exclude_patterns = []
74+
75+
# The name of the Pygments (syntax highlighting) style to use.
76+
pygments_style = None
77+
78+
79+
# -- Options for HTML output -------------------------------------------------
80+
81+
# The theme to use for HTML and HTML Help pages. See the documentation for
82+
# a list of builtin themes.
83+
#
84+
html_theme = 'sphinx_rtd_theme'
85+
86+
# Theme options are theme-specific and customize the look and feel of a theme
87+
# further. For a list of options available for each theme, see the
88+
# documentation.
89+
#
90+
# html_theme_options = {}
91+
92+
# Add any paths that contain custom static files (such as style sheets) here,
93+
# relative to this directory. They are copied after the builtin static files,
94+
# so a file named "default.css" will overwrite the builtin "default.css".
95+
html_static_path = ['_static']
96+
97+
# Custom sidebar templates, must be a dictionary that maps document names
98+
# to template names.
99+
#
100+
# The default sidebars (for documents that don't match any pattern) are
101+
# defined by theme itself. Builtin themes are using these templates by
102+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
103+
# 'searchbox.html']``.
104+
#
105+
# html_sidebars = {}
106+
107+
108+
# -- Options for HTMLHelp output ---------------------------------------------
109+
110+
# Output file base name for HTML help builder.
111+
htmlhelp_basename = 'DeltaCodedoc'
112+

0 commit comments

Comments
 (0)