Skip to content

Commit 70cc71c

Browse files
Adds Travis-CI for sphinx-build and linkcheck
This adds test scripts to check build status of Spinx Documentation along with adding checks for broken links. Also fixes some broken links and updates doc_maintenance.rst Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent d5b1de7 commit 70cc71c

18 files changed

Lines changed: 47 additions & 17 deletions

File tree

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
sudo: false
2+
language: python
3+
python:
4+
- "3.6"
5+
install:
6+
- pip install Sphinx sphinx_rtd_theme
7+
before_install:
8+
- chmod +x ./docs/scripts/sphinx_build_link_check.sh
9+
script:
10+
- cd docs
11+
- ./scripts/sphinx_build_link_check.sh
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

docs/source/aboutcode-data/abcd.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _aboutcode_data:
2+
13
AboutCode Data : ABCD
24
=====================
35

docs/source/aboutcode-docs/contributor_project_ideas.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ as a 2017 GSoC project) and rename it as the AboutCode server.
189189
The features of this updated server would be:
190190

191191

192-
- Store any ABC data including ScanCode scans See
193-
https://github.com/nexB/aboutcode/tree/master/aboutcode-data)
192+
- Store any ABC data including ScanCode scans See :ref:`aboutcode_data`
194193

195194
- Organize the data in projects (including possibly user-private projects)
196195

docs/source/aboutcode-docs/gsoc_2017.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Use automated code translation (for JS) for the port. Add license expression su
137137
* https://github.com/nexB/license-expression
138138
* https://github.com/bastikr/boolean.py
139139
* https://github.com/nexB/aboutcode-manager
140-
* https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js#python
140+
* https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js
141141

142142
- **Mentors** :
143143

docs/source/aboutcode-toolkit/specification.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The meaning of this ABOUT file is:
4646
- The home URL for this component is http://httpd.apache.org
4747

4848
- The file "httpd-2.4.3.tar.gz" was originally downloaded from
49-
http://archive.apache.org/dist/httpd/httpd-2.4.3.tar.gz
49+
``http://archive.apache.org/dist/httpd/httpd-2.4.3.tar.gz``
5050

5151
- In the same directory, "apache-2.0.LICENSE" and "httpd.NOTICE" are files that
5252
contain respectively the license text and the notice text for this component.
@@ -209,7 +209,7 @@ Field referencing a URL
209209

210210
The value of a field may reference URLs such as a homepage or a download. In
211211
this case the field name is suffixed with "_url" and the field value must be a
212-
valid absolute URL starting with ftp://, http:// or https://. URLs are
212+
valid absolute URL starting with ``ftp://``, ``http://`` or ``https://``. URLs are
213213
informational and the content they may reference is ignored. For example, a
214214
download URL is referenced this way::
215215

docs/source/deltacode/json_to_csv.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ JSON to CSV Conversion
55

66
The default output format for a DeltaCode codebase comparison is JSON. If the ``-j`` or ``--json-file`` option is included in the ``deltacode`` command, the output will be written to a ``.json`` file at the user-designated location. For example:
77

8-
.. code-block::
8+
::
99

1010
deltacode -n [path to the 'new' codebase] -o [path to the 'old' codebase] -j [path to the JSON output file]
1111

1212
We have also created an easy-to-use script for users who want to convert their JSON output to CSV format. Located at ``etc/scripts/json2csv.py``\ , the conversion can be run with this command template:
1313

14-
.. code-block::
14+
::
1515

1616
python etc/scripts/json2csv.py [path to the JSON input file] [path to the CSV output file]

docs/source/deltacode/release_process.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Steps to cut a new release:
66

77
run bumpversion with major, minor or patch to bump the version in:
88

9-
.. code-block::
9+
::
1010

1111
src/deltacode/__init__.py
1212
setup.py
@@ -15,14 +15,14 @@ run bumpversion with major, minor or patch to bump the version in:
1515
Update the CHANGELOG.rst
1616
commit changes and push changes to develop:
1717

18-
.. code-block::
18+
::
1919

2020
git commit -m "commit message"
2121
git push --set-upstream origin develop
2222

2323
merge develop branch in master and tag the release.
2424

25-
.. code-block::
25+
::
2626

2727
git checkout master
2828
git merge develop

docs/source/doc_maintenance.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ Review your work::
7171
make html
7272
open build/html/index.html
7373

74+
AboutCode uses Travis-CI to test build status and check links, so run this script at your local system before creating a Pull Request.
75+
76+
::
77+
78+
cd docs
79+
./scripts/sphinx_build_link_check.sh
80+
7481
Share AboutCode Document Improvements
7582
-------------------------------------
7683

docs/source/help.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ AboutCode Projects
1818

1919
- `license-expression <https://github.com/nexB/license-expression/>`_: This is a library to parse, analyze, compare and normalize SPDX-like license expressions using a boolean logic expression engine. See https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60 to understand what a license expression is. See https://github.com/nexB/license-expression for the code. The underlying boolean engine is at https://github.com/bastikr/boolean.py . Both are co-maintained by @pombredanne
2020

21-
- `ABCD aka AboutCode Data <https://github.com/nexB/aboutcode/blob/master/aboutcode-data/README.rst>`_: is a simple set of conventions to define data structures that all the AboutCode tools can understand and use to exchange data. The specification lives in this repository. .ABOUT files and ScanCode tooklit data are examples of this approach. Other projects such as https://libraries.io and `OSS Review Toolkit <https://github.com/heremaps/oss-review-toolkit>`_ also use these conventions.
21+
- `ABCD aka AboutCode Data <https://github.com/AyanSinhaMahapatra/aboutcode/blob/master/docs/source/aboutcode-data/abcd.rst>`_: is a simple set of conventions to define data structures that all the AboutCode tools can understand and use to exchange data. The specification lives in this repository. .ABOUT files and ScanCode tooklit data are examples of this approach. Other projects such as https://libraries.io and `OSS Review Toolkit <https://github.com/heremaps/oss-review-toolkit>`_ also use these conventions.
2222

2323
- `DeltaCode <https://github.com/nexB/deltacode>`_ is a command line tool to compare scans and determine if and where there are material differences that affect licensing. The lead maintainer is @majurg
2424

0 commit comments

Comments
 (0)