Skip to content

Commit

Permalink
Merge pull request spyder-ide#1 from CAM-Gerlach/add-sphinx-build
Browse files Browse the repository at this point in the history
Add Sphinx and Travis building and fix minor issues
  • Loading branch information
CAM-Gerlach committed Mar 29, 2018
2 parents caa4d1b + 7d90b4b commit c5889c3
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text eol=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.rst text
*.py text
*.txt text
*.md text

# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.jpg binary
*.jpeg binary
*.png binary
*.ico binary
*.svg binary
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ nppBackup/
# Pytest dirs/files
.pytest_cache/

# Sphinx doc build dir
_build/

# Special dirs and files
build/
dist/
Expand Down
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://travis-ci.org/spyder-ide/spyder-docs

language: python
dist: trusty
sudo: false

python:
- 3.6

install:
- pip install sphinx

script:
- cd doc
- make html
- cd ..
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Spyder - The Scientific PYthon Development EnviRonment
# Spyder - The Scientific Python Development Environment

Copyright © Spyder Project Contributors.

Expand Down
20 changes: 20 additions & 0 deletions doc/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.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = Spyder
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)
3 changes: 3 additions & 0 deletions doc/editor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Function/class/method browser:
.. image:: images/editor1.png
:align: center

|
Code analysis with `pyflakes`:
Expand All @@ -21,6 +22,7 @@ Code analysis with `pyflakes`:
.. image:: images/editor2.png
:align: center

|
Horizontal/vertical splitting feature:
Expand All @@ -29,6 +31,7 @@ Horizontal/vertical splitting feature:
.. image:: images/editor3.png
:align: center

|
How to define a code cell
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Spyder - Documentation
======================

Spyder is the Scientific PYthon Development EnviRonment:
Spyder is the Scientific Python Development Environment:

* A powerful interactive development environment for the Python language with
advanced editing, interactive testing, debugging and introspection features
Expand Down
2 changes: 2 additions & 0 deletions doc/ipythonconsole.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ IPython's many features.
.. image:: images/ipythonconsole.png
:align: center

|
From the Consoles menu, Spyder can launch **IPython Console**
Expand All @@ -32,6 +33,7 @@ kernel connection file details:
.. image:: images/ipythonkernelconnect.png
:align: center

|
**IPython Consoles** that are attached to kernels that were created by
Expand Down
36 changes: 36 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=Spyder

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

0 comments on commit c5889c3

Please sign in to comment.