Skip to content

Commit

Permalink
Merge pull request #18 from HealthyPear/feature-Travis_CI
Browse files Browse the repository at this point in the history
Added Travis CI configuration file
  • Loading branch information
kosack authored Nov 12, 2019
2 parents 55d8ec9 + 7f0e16c commit 92dc673
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 47 deletions.
49 changes: 49 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
language: generic

env:
global:
- PYTHONIOENCODING=UTF8
- MPLBACKEND=Agg

matrix:
include:
- os: linux
language: generic
env:
- PYTHON_VERSION=3.6
- CONDA=true

- os: linux
language: generic
env:
- PYTHON_VERSION=3.7
- CONDA=true

before_install:

- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- . $HOME/miniconda/etc/profile.d/conda.sh
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda # get latest conda version
- conda info -a # Useful for debugging any issues with conda

install:
- conda env create -f protopipe_environment.yml
- conda activate protopipe
- pip install travis-sphinx codecov pytest-cov
- python setup.py install

script:
# - pytest --cov=protopipe
- travis-sphinx -v --outdir=docs/_build build -n --source=docs/

after_script:
- if [[ "$CONDA" == "true" ]];then
conda deactivate
fi

after_success:
- travis-sphinx -v --outdir=docs/_build deploy
- codecov
101 changes: 54 additions & 47 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
from protopipe import __version__

sys.path.insert(0, os.path.abspath(".."))


# -- General configuration ------------------------------------------------
Expand All @@ -31,45 +33,47 @@
# 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',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'sphinx_automodapi.automodapi',
'sphinx_automodapi.smart_resolver']
"sphinx.ext.autodoc",
"numpydoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx_automodapi.automodapi",
"sphinx_automodapi.smart_resolver",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
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'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = u'protopipe'
copyright = u'2018, Julien Lefaucheur'
author = u'Julien Lefaucheur'
project = "protopipe"
copyright = "2019, Michele Peresano, Julien Lefaucheur"
author = "Michele Peresano, Julien Lefaucheur"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'0.1'
version = f"{__version__}"
# The full version, including alpha/beta/rc tags.
release = u'0.1'
release = f"{__version__}"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -81,21 +85,21 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

autoclass_content = "both" # include both class docstring and __init__
autodoc_default_flags = [
# Make sure that any autodoc declarations show the right members
"members",
"inherited-members",
"private-members",
"show-inheritance",
# Make sure that any autodoc declarations show the right members
"members",
"inherited-members",
"private-members",
"show-inheritance",
]
autosummary_generate = True # Make _autosummary files and include them
napoleon_numpy_docstring = False # Force consistency, leave only Google
Expand All @@ -107,7 +111,7 @@
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
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
Expand All @@ -118,13 +122,13 @@
# 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']
# html_static_path = ["_static"]


# -- Options for HTMLHelp output ------------------------------------------

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


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -133,15 +137,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -151,19 +152,21 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'protopipe.tex', u'protopipe Documentation',
u'Julien Lefaucheur', 'manual'),
(
master_doc,
"protopipe.tex",
"protopipe Documentation",
"Michele Peresano, Julien Lefaucheur",
"manual",
)
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'protopipe', u'protopipe Documentation',
[author], 1)
]
man_pages = [(master_doc, "protopipe", "protopipe Documentation", [author], 1)]


# -- Options for Texinfo output -------------------------------------------
Expand All @@ -172,13 +175,17 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'protopipe', u'protopipe Documentation',
author, 'protopipe', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"protopipe",
"protopipe Documentation",
author,
"protopipe",
"One line description of project.",
"Miscellaneous",
)
]




# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {"https://docs.python.org/": None}
1 change: 1 addition & 0 deletions protopipe_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ dependencies:
- numexpr=2.7.0
- numpy=1.17.2
- numpy-base=1.17.2
- numpydoc=0.9.1
- olefile=0.46
- openssl=1.1.1c
- packaging=19.2
Expand Down

0 comments on commit 92dc673

Please sign in to comment.