diff --git a/.travis.yml b/.travis.yml index 472ced24..1f94026f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,40 +1,44 @@ language: python -dist: xenial +dist: bionic sudo: required -matrix: - include: - - python: 3.5 - - python: 3.6 - - python: 3.7 - - python: 3.8 - # GitHub branch branches: only: - master +# build jobs +jobs: + include: + - python: 3.5 + - python: 3.6 + - python: 3.7 + - python: 3.8 + after_success: + - coveralls + - stage: deploy + install: + - pip install numpy scipy progressbar2 + - pip install sphinx sphinx-rtd-theme sphinxcontrib-bibtex numpydoc==0.9.2 travis-sphinx + script: + - sphinx-apidoc -feo docs/source modopt + - travis-sphinx -v -o docs/build build -n -s docs/source + after_success: + - travis-sphinx -o docs/build deploy + # update pre-installed packages before_install: - pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U -# install package and dependencies +# install dependencies install: - - pip install coverage nose pytest pytest-cov + - pip install coverage nose pytest pytest-cov coveralls - pip install scikit-learn - pip install astropy scikit-image - - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install numpy future scipy astropy progressbar2 sphinx sphinx-rtd-theme sphinxcontrib-bibtex numpydoc travis-sphinx coveralls; fi # run unit tests script: - python setup.py test - - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then sphinx-apidoc -feo docs/source modopt/; fi - - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then travis-sphinx -v -o docs/build build -n -s docs/source; fi - -# run coverage tests -after_success: - - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then coveralls; fi - - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then travis-sphinx -o docs/build deploy; fi # notification settings notification: diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..916c2c9b --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include requirements.txt +include README.rst +include LICENSE.txt diff --git a/README.rst b/README.rst index 496a1419..e8f95c13 100644 --- a/README.rst +++ b/README.rst @@ -30,9 +30,9 @@ ModOpt :Author: Samuel Farrens `(samuel.farrens@cea.fr) `_ -:Version: 1.4.3 +:Version: 1.4.4 -:Release Date: 30/04/2020 +:Release Date: 16/06/2020 :Documentation: |link-to-docs| diff --git a/docs/source/conf.py b/docs/source/conf.py index 03d8a5e7..cca36eb4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,7 +23,7 @@ # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -64,7 +64,7 @@ source_suffix = '.rst' # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' @@ -92,9 +92,9 @@ # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -102,14 +102,14 @@ # The reST default role (used for this markup: `text`) to use for all # documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. @@ -119,10 +119,10 @@ pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# keep_warnings = False # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True @@ -148,23 +148,23 @@ } # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +# html_title = None # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +# html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +# html_favicon = None # 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, @@ -175,64 +175,65 @@ # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -#html_extra_path = [] +# html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' +# html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} -html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'], } +# html_sidebars = {} +html_sidebars = {'**': ['globaltoc.html', 'relations.html', + 'sourcelink.html', 'searchbox.html'], } # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -#html_use_opensearch = '' +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Language to be used for generating the HTML full-text search index. # Sphinx supports the following languages: # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -#html_search_language = 'en' +# html_search_language = 'en' # A dictionary with options for the search language support, empty by default. # Now only 'ja' uses this config value -#html_search_options = {'type': 'default'} +# html_search_options = {'type': 'default'} # The name of a javascript file (relative to the configuration directory) that # implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' +# html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. htmlhelp_basename = 'sftoolsdoc' @@ -240,17 +241,17 @@ # -- Options for LaTeX output --------------------------------------------- latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', -# Additional stuff for the LaTeX preamble. -#'preamble': '', + # Additional stuff for the LaTeX preamble. + # 'preamble': '', -# Latex figure (float) alignment -#'figure_align': 'htbp', + # Latex figure (float) alignment + # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples @@ -263,23 +264,23 @@ # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output --------------------------------------- @@ -292,7 +293,7 @@ ] # If true, show URL addresses after external links. -#man_show_urls = False +# man_show_urls = False # -- Options for Texinfo output ------------------------------------------- @@ -307,16 +308,16 @@ ] # Documents to append as an appendix to all manuals. -#texinfo_appendices = [] +# texinfo_appendices = [] # If false, no module index is generated. -#texinfo_domain_indices = True +# texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' +# texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False +# texinfo_no_detailmenu = False # -- Options for Epub output ---------------------------------------------- @@ -328,65 +329,65 @@ epub_copyright = copyright # The basename for the epub file. It defaults to the project name. -#epub_basename = project +# epub_basename = project # The HTML theme for the epub output. Since the default themes are not # optimized for small screen space, using the same theme for HTML and epub # output is usually not wise. This defaults to 'epub', a theme designed to save # visual space. -#epub_theme = 'epub' +# epub_theme = 'epub' # The language of the text. It defaults to the language option # or 'en' if the language is not set. -#epub_language = '' +# epub_language = '' # The scheme of the identifier. Typical schemes are ISBN or URL. -#epub_scheme = '' +# epub_scheme = '' # The unique identifier of the text. This can be a ISBN number # or the project homepage. -#epub_identifier = '' +# epub_identifier = '' # A unique identification for the text. -#epub_uid = '' +# epub_uid = '' # A tuple containing the cover image and cover page html template filenames. -#epub_cover = () +# epub_cover = () # A sequence of (type, uri, title) tuples for the guide element of content.opf. -#epub_guide = () +# epub_guide = () # HTML files that should be inserted before the pages created by sphinx. # The format is a list of tuples containing the path and title. -#epub_pre_files = [] +# epub_pre_files = [] # HTML files that should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. -#epub_post_files = [] +# epub_post_files = [] # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] # The depth of the table of contents in toc.ncx. -#epub_tocdepth = 3 +# epub_tocdepth = 3 # Allow duplicate toc entries. -#epub_tocdup = True +# epub_tocdup = True # Choose between 'default' and 'includehidden'. -#epub_tocscope = 'default' +# epub_tocscope = 'default' # Fix unsupported image types using the Pillow. -#epub_fix_images = False +# epub_fix_images = False # Scale large images. -#epub_max_image_width = 0 +# epub_max_image_width = 0 # How to display URL addresses: 'footnote', 'no', or 'inline'. -#epub_show_urls = 'inline' +# epub_show_urls = 'inline' # If false, no index is generated. -#epub_use_index = True +# epub_use_index = True # Example configuration for intersphinx: refer to the Python standard library. diff --git a/docs/source/index.rst b/docs/source/index.rst index 6ed406f6..7ed86897 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -8,9 +8,9 @@ ModOpt Documentation :Author: Samuel Farrens `(samuel.farrens@cea.fr) `_ -:Version: 1.4.3 +:Version: 1.4.4 -:Release Date: 30/04/2020 +:Release Date: 16/06/2020 :Documentation: |link-to-docs| diff --git a/docs/source/modopt.base.rst b/docs/source/modopt.base.rst index 71c5c518..fc01e712 100644 --- a/docs/source/modopt.base.rst +++ b/docs/source/modopt.base.rst @@ -5,6 +5,7 @@ Submodules ---------- .. toctree:: + :maxdepth: 4 modopt.base.np_adjust modopt.base.observable diff --git a/docs/source/modopt.interface.rst b/docs/source/modopt.interface.rst index dfe7b9d8..40217949 100644 --- a/docs/source/modopt.interface.rst +++ b/docs/source/modopt.interface.rst @@ -5,6 +5,7 @@ Submodules ---------- .. toctree:: + :maxdepth: 4 modopt.interface.errors modopt.interface.log diff --git a/docs/source/modopt.math.rst b/docs/source/modopt.math.rst index 2966a451..23e3a9fd 100644 --- a/docs/source/modopt.math.rst +++ b/docs/source/modopt.math.rst @@ -5,6 +5,7 @@ Submodules ---------- .. toctree:: + :maxdepth: 4 modopt.math.convolve modopt.math.matrix diff --git a/docs/source/modopt.opt.rst b/docs/source/modopt.opt.rst index c6db25f0..4a56c9da 100644 --- a/docs/source/modopt.opt.rst +++ b/docs/source/modopt.opt.rst @@ -5,6 +5,7 @@ Submodules ---------- .. toctree:: + :maxdepth: 4 modopt.opt.algorithms modopt.opt.cost diff --git a/docs/source/modopt.plot.rst b/docs/source/modopt.plot.rst index e88960c6..df2019eb 100644 --- a/docs/source/modopt.plot.rst +++ b/docs/source/modopt.plot.rst @@ -5,6 +5,7 @@ Submodules ---------- .. toctree:: + :maxdepth: 4 modopt.plot.cost_plot diff --git a/docs/source/modopt.rst b/docs/source/modopt.rst index 41182f0c..5aaff862 100644 --- a/docs/source/modopt.rst +++ b/docs/source/modopt.rst @@ -5,6 +5,7 @@ Subpackages ----------- .. toctree:: + :maxdepth: 4 modopt.base modopt.interface @@ -17,6 +18,7 @@ Submodules ---------- .. toctree:: + :maxdepth: 4 modopt.info diff --git a/docs/source/modopt.signal.rst b/docs/source/modopt.signal.rst index e8ae7073..ea48be16 100644 --- a/docs/source/modopt.signal.rst +++ b/docs/source/modopt.signal.rst @@ -5,6 +5,7 @@ Submodules ---------- .. toctree:: + :maxdepth: 4 modopt.signal.filter modopt.signal.noise diff --git a/docs/source/modules.rst b/docs/source/modules.rst index cb4ff59e..d9d7cac1 100644 --- a/docs/source/modules.rst +++ b/docs/source/modules.rst @@ -1,8 +1,7 @@ -ModOpt +modopt ====== .. toctree:: :maxdepth: 4 modopt - setup diff --git a/docs/source/plugin_example.rst b/docs/source/plugin_example.rst index 54dbd818..47bdff92 100644 --- a/docs/source/plugin_example.rst +++ b/docs/source/plugin_example.rst @@ -151,7 +151,7 @@ specify that we want a maximum of 500 iterations. .. parsed-literal:: - 100% (500 of 500) |######################| Elapsed Time: 0:00:00 Time: 0:00:00 + 100% (500 of 500) \|######################\| Elapsed Time: 0:00:00 Time: 0:00:00 .. parsed-literal:: diff --git a/docs/source/setup.rst b/docs/source/setup.rst deleted file mode 100644 index 552eb49d..00000000 --- a/docs/source/setup.rst +++ /dev/null @@ -1,7 +0,0 @@ -setup module -============ - -.. automodule:: setup - :members: - :undoc-members: - :show-inheritance: diff --git a/modopt/info.py b/modopt/info.py index aa9bdcaf..04b5668b 100644 --- a/modopt/info.py +++ b/modopt/info.py @@ -6,12 +6,12 @@ :Author: Samuel Farrens -:Version: 1.4.3 +:Version: 1.4.4 """ # Package Version -version_info = (1, 4, 3) +version_info = (1, 4, 4) __version__ = '.'.join(str(c) for c in version_info) __about__ = ('ModOpt \n\n ' diff --git a/modopt/signal/wavelet.py b/modopt/signal/wavelet.py index 19450cdb..8327a275 100644 --- a/modopt/signal/wavelet.py +++ b/modopt/signal/wavelet.py @@ -146,7 +146,7 @@ def call_mr_transform(data, opt='', path='./', stdout, stderr = execute(command_line) # Check for errors - if any(word in stdout for word in ('bad', 'Error')): + if any(word in stdout for word in ('bad', 'Error', 'Sorry')): remove(file_fits) raise RuntimeError('{} raised following exception: "{}"'