Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #344

Merged
merged 14 commits into from
May 18, 2019
Merged
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ coverage.xml

# Sphinx documentation
docs/_build/
None0000000.png

# PyBuilder
target/
Expand Down
16 changes: 16 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePUB
formats: all

# Set the version of Python and requirements
python:
version: 3.7
install:
- requirements: requirements-dev.txt
- method: setuptools
path: .
13 changes: 3 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +

clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
Expand All @@ -57,8 +55,7 @@ lint: ## check style with flake8
flake8 pyswarms tests

test: ## run tests quickly with the default Python

python setup.py test
python setup.py test

test-all: ## run tests on every Python version with tox
tox
Expand All @@ -70,19 +67,15 @@ coverage: ## check code coverage quickly with the default Python
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/pyswarms.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ pyswarms
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html

servedocs: docs ## compile the docs watching for changes
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
watchmedo shell-command -p '*.rst' -p '*.ipynb' -c '$(MAKE) -C docs html' -R -D .

release: clean ## package and upload a release
python setup.py sdist upload
python setup.py bdist_wheel upload
twine upload dist/*

dist: clean ## builds source and wheel package
python setup.py sdist
Expand Down
16 changes: 15 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
"nbsphinx",
"sphinx.ext.intersphinx",
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
]

exclude_patterns = ["_build", "**.ipynb_checkpoints"]
Expand Down Expand Up @@ -90,7 +93,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down Expand Up @@ -129,6 +132,9 @@
# documentation.
# html_theme_options = {}

# Set the timeout for executing notebooks to three minutes
nbsphinx_timeout = 180

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []

Expand Down Expand Up @@ -299,3 +305,11 @@ def setup(app):

# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"https://docs.python.org/": None,
"http://matplotlib.org": None,
"http://docs.scipy.org/doc/numpy/": None,
"https://docs.scipy.org/doc/scipy/reference": None,
}
284 changes: 0 additions & 284 deletions docs/examples/basic_optimization.rst

This file was deleted.

Loading