├── pyproject.toml ├── specviz ├── retired.py └── __init__.py ├── setup.py ├── MANIFEST.in ├── readthedocs.yml ├── docs ├── index.rst ├── Makefile ├── make.bat └── conf.py ├── .gitignore ├── README.rst ├── LICENSE.rst ├── setup.cfg └── CODE_OF_CONDUCT.md /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools", "wheel"] 3 | -------------------------------------------------------------------------------- /specviz/retired.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | __all__ = ['main'] 4 | 5 | 6 | def main(argv=sys.argv): 7 | # This is a no-op. It prints message from specviz/__init__.py 8 | pass 9 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Licensed under a 3-clause BSD style license - see LICENSE.rst 3 | import os 4 | from setuptools import setup 5 | setup(use_scm_version={'write_to': os.path.join('specviz', 'version.py')}) 6 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | include LICENSE.rst 3 | 4 | include pyproject.toml 5 | include setup.cfg 6 | 7 | recursive-include docs * 8 | 9 | prune build 10 | prune docs/_build 11 | prune docs/api 12 | 13 | global-exclude *.pyc *.o 14 | -------------------------------------------------------------------------------- /specviz/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst 2 | 3 | try: 4 | from specviz.version import version as __version__ 5 | except Exception: 6 | # package is not installed 7 | __version__ = "unknown" 8 | 9 | __all__ = ['__version__'] 10 | 11 | print('specviz is no longer supported, please use jdaviz. ' 12 | 'If you must use legacy specviz, please try v0.7.1 ' 13 | 'in Python 3.6.') 14 | -------------------------------------------------------------------------------- /readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yaml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | # Build documentation in the docs/ directory with Sphinx 9 | sphinx: 10 | configuration: docs/conf.py 11 | 12 | python: 13 | version: 3.8 14 | install: 15 | - method: pip 16 | path: . 17 | extra_requirements: 18 | - docs 19 | 20 | formats: [] 21 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | SpecViz: Interactive Spectral Analysis 2 | ###################################### 3 | 4 | .. DANGER:: 5 | 6 | Please note that this version of SpecViz is **no longer being actively supported 7 | or maintained**. The functionality of SpecViz is now available and being actively 8 | developed as part of `Jdaviz `_. 9 | 10 | If you must use legacy SpecViz, please try v0.7.1 in Python 3.6. For legacy 11 | SpecViz, see https://specviz.readthedocs.io/en/0.7.0/ . 12 | 13 | If you would like to fork https://github.com/spacetelescope/specviz/ 14 | and continue developing in your own, we suggest you start from commit 15 | ``b8bcd495e5b43dc2b90f7bf2d5bad2d27c6990aa``. 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled files 2 | *.py[cod] 3 | *.a 4 | *.o 5 | *.so 6 | __pycache__ 7 | 8 | # Ignore .c files by default to avoid including generated code. If you want to 9 | # add a non-generated .c extension, use `git add -f filename.c`. 10 | *.c 11 | 12 | # Other generated files 13 | */version.py 14 | */cython_version.py 15 | htmlcov 16 | .coverage 17 | MANIFEST 18 | .ipynb_checkpoints 19 | 20 | # Sphinx 21 | docs/api 22 | docs/_build 23 | 24 | # Eclipse editor project files 25 | .project 26 | .pydevproject 27 | .settings 28 | 29 | # Pycharm editor project files 30 | .idea 31 | 32 | # Floobits project files 33 | .floo 34 | .flooignore 35 | 36 | # Packages/installer info 37 | *.egg 38 | *.egg-info 39 | dist 40 | build 41 | eggs 42 | parts 43 | bin 44 | var 45 | sdist 46 | develop-eggs 47 | .installed.cfg 48 | distribute-*.tar.gz 49 | 50 | # Other 51 | .cache 52 | .tox 53 | .*.sw[op] 54 | *~ 55 | .project 56 | .pydevproject 57 | .settings 58 | .vscode 59 | .pytest_cache 60 | 61 | # Mac OSX 62 | .DS_Store 63 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | SpecViz: An interactive astronomical 1D spectra analysis tool 2 | ============================================================= 3 | 4 | An GUI-based interactive analysis tool for one dimensional astronomical data 5 | using Python. 6 | 7 | For documentation see https://specviz.readthedocs.io/en/latest/ 8 | 9 | Current Status 10 | -------------- 11 | 12 | Please note that this version of SpecViz is **no longer being actively supported 13 | or maintained**. The functionality of SpecViz is now available and being actively 14 | developed as part of `Jdaviz `_. 15 | 16 | If you must use legacy SpecViz, please try v0.7.1 in Python 3.6. 17 | 18 | License 19 | ------- 20 | 21 | This project is Copyright (c) JDADF Developers and licensed under 22 | the terms of the BSD 3-Clause license. This package is based upon 23 | the `Astropy package template `_ 24 | which is licensed under the BSD 3-clause licence. See the licenses folder for 25 | more information. 26 | -------------------------------------------------------------------------------- /LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2021, JDADF Developers 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, this 10 | list of conditions and the following disclaimer in the documentation and/or 11 | other materials provided with the distribution. 12 | * Neither the name of the Astropy Team nor the names of its contributors may be 13 | used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [build_sphinx] 2 | source-dir = docs 3 | build-dir = docs/_build 4 | all_files = 1 5 | 6 | [build_docs] 7 | source-dir = docs 8 | build-dir = docs/_build 9 | all_files = 1 10 | 11 | [upload_docs] 12 | upload-dir = docs/_build/html 13 | show-response = 1 14 | 15 | [tool:pytest] 16 | minversion = 3.0 17 | testpaths = specviz docs 18 | norecursedirs = build docs/_build 19 | doctest_plus = enabled 20 | addopts = -p no:warnings 21 | 22 | [pycodestyle] 23 | # E101 - mix of tabs and spaces 24 | # W191 - use of tabs 25 | # W291 - trailing whitespace 26 | # W292 - no newline at end of file 27 | # W293 - trailing whitespace 28 | # W391 - blank line at end of file 29 | # E111 - 4 spaces per indentation level 30 | # E112 - 4 spaces per indentation level 31 | # E113 - 4 spaces per indentation level 32 | # E901 - SyntaxError or IndentationError 33 | # E902 - IOError 34 | select = E101,W191,W291,W292,W293,W391,E111,E112,E113,E901,E902 35 | exclude = extern,sphinx,*parsetab.py 36 | 37 | [metadata] 38 | name = specviz 39 | package_name = specviz 40 | provides = specviz 41 | description = An interactive astronomical 1D spectra analysis tool 42 | long_description = file: README.rst 43 | author = JDADF Developers 44 | author_email = help@stsci.edu 45 | license = BSD 3-Clause 46 | license_file = LICENSE.rst 47 | url = https://github.com/spacetelescope/specviz 48 | edit_on_github = False 49 | github_project = spacetelescope/specviz 50 | 51 | [options] 52 | packages = find: 53 | zip_safe = False 54 | python_requires = >=3.6 55 | include_package_data = False 56 | setup_requires = setuptools_scm 57 | 58 | [options.extras_require] 59 | docs = 60 | sphinx-rtd-theme 61 | sphinx-astropy 62 | 63 | [options.entry_points] 64 | gui_scripts = 65 | specviz = specviz.retired:main 66 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Spacetelescope Open Source Code of Conduct 2 | 3 | We expect all "spacetelescope" organization projects to adopt a code of conduct that ensures a productive, respectful environment for all open source contributors and participants. We are committed to providing a strong and enforced code of conduct and expect everyone in our community to follow these guidelines when interacting with others in all forums. Our goal is to keep ours a positive, inclusive, successful, and growing community. The community of participants in open source Astronomy projects is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences success and continued growth. 4 | 5 | 6 | As members of the community, 7 | 8 | - We pledge to treat all people with respect and provide a harassment- and bullying-free environment, regardless of sex, sexual orientation and/or gender identity, disability, physical appearance, body size, race, nationality, ethnicity, and religion. In particular, sexual language and imagery, sexist, racist, or otherwise exclusionary jokes are not appropriate. 9 | 10 | - We pledge to respect the work of others by recognizing acknowledgment/citation requests of original authors. As authors, we pledge to be explicit about how we want our own work to be cited or acknowledged. 11 | 12 | - We pledge to welcome those interested in joining the community, and realize that including people with a variety of opinions and backgrounds will only serve to enrich our community. In particular, discussions relating to pros/cons of various technologies, programming languages, and so on are welcome, but these should be done with respect, taking proactive measure to ensure that all participants are heard and feel confident that they can freely express their opinions. 13 | 14 | - We pledge to welcome questions and answer them respectfully, paying particular attention to those new to the community. We pledge to provide respectful criticisms and feedback in forums, especially in discussion threads resulting from code contributions. 15 | 16 | - We pledge to be conscientious of the perceptions of the wider community and to respond to criticism respectfully. We will strive to model behaviors that encourage productive debate and disagreement, both within our community and where we are criticized. We will treat those outside our community with the same respect as people within our community. 17 | 18 | - We pledge to help the entire community follow the code of conduct, and to not remain silent when we see violations of the code of conduct. We will take action when members of our community violate this code such as such as contacting conduct@stsci.edu (all emails sent to this address will be treated with the strictest confidence) or talking privately with the person. 19 | 20 | This code of conduct applies to all community situations online and offline, including mailing lists, forums, social media, conferences, meetings, associated social events, and one-to-one interactions. 21 | 22 | Parts of this code of conduct have been adapted from the Astropy and Numfocus codes of conduct. 23 | http://www.astropy.org/code_of_conduct.html 24 | https://www.numfocus.org/about/code-of-conduct/ 25 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = -W 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 | 15 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 16 | 17 | #This is needed with git because git doesn't create a dir if it's empty 18 | $(shell [ -d "_static" ] || mkdir -p _static) 19 | 20 | help: 21 | @echo "Please use \`make ' where is one of" 22 | @echo " html to make standalone HTML files" 23 | @echo " dirhtml to make HTML files named index.html in directories" 24 | @echo " singlehtml to make a single large HTML file" 25 | @echo " pickle to make pickle files" 26 | @echo " json to make JSON files" 27 | @echo " htmlhelp to make HTML files and a HTML help project" 28 | @echo " qthelp to make HTML files and a qthelp project" 29 | @echo " devhelp to make HTML files and a Devhelp project" 30 | @echo " epub to make an epub" 31 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 32 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 33 | @echo " text to make text files" 34 | @echo " man to make manual pages" 35 | @echo " changes to make an overview of all changed/added/deprecated items" 36 | @echo " linkcheck to check all external links for integrity" 37 | 38 | clean: 39 | -rm -rf $(BUILDDIR) 40 | -rm -rf api 41 | -rm -rf generated 42 | 43 | html: 44 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 45 | @echo 46 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 47 | 48 | dirhtml: 49 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 50 | @echo 51 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 52 | 53 | singlehtml: 54 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 55 | @echo 56 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 57 | 58 | pickle: 59 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 60 | @echo 61 | @echo "Build finished; now you can process the pickle files." 62 | 63 | json: 64 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 65 | @echo 66 | @echo "Build finished; now you can process the JSON files." 67 | 68 | htmlhelp: 69 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 70 | @echo 71 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 72 | ".hhp project file in $(BUILDDIR)/htmlhelp." 73 | 74 | qthelp: 75 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 76 | @echo 77 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 78 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 79 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Astropy.qhcp" 80 | @echo "To view the help file:" 81 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Astropy.qhc" 82 | 83 | devhelp: 84 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 85 | @echo 86 | @echo "Build finished." 87 | @echo "To view the help file:" 88 | @echo "# mkdir -p $$HOME/.local/share/devhelp/Astropy" 89 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Astropy" 90 | @echo "# devhelp" 91 | 92 | epub: 93 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 94 | @echo 95 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 96 | 97 | latex: 98 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 99 | @echo 100 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 101 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 102 | "(use \`make latexpdf' here to do that automatically)." 103 | 104 | latexpdf: 105 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 106 | @echo "Running LaTeX files through pdflatex..." 107 | make -C $(BUILDDIR)/latex all-pdf 108 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 109 | 110 | text: 111 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 112 | @echo 113 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 114 | 115 | man: 116 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 117 | @echo 118 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 119 | 120 | changes: 121 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 122 | @echo 123 | @echo "The overview file is in $(BUILDDIR)/changes." 124 | 125 | linkcheck: 126 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 127 | @echo 128 | @echo "Link check complete; look for any errors in the above output " \ 129 | "or in $(BUILDDIR)/linkcheck/output.txt." 130 | 131 | doctest: 132 | @echo "Run 'python setup.py test' in the root directory to run doctests " \ 133 | @echo "in the documentation." 134 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | if NOT "%PAPER%" == "" ( 11 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 12 | ) 13 | 14 | if "%1" == "" goto help 15 | 16 | if "%1" == "help" ( 17 | :help 18 | echo.Please use `make ^` where ^ is one of 19 | echo. html to make standalone HTML files 20 | echo. dirhtml to make HTML files named index.html in directories 21 | echo. singlehtml to make a single large HTML file 22 | echo. pickle to make pickle files 23 | echo. json to make JSON files 24 | echo. htmlhelp to make HTML files and a HTML help project 25 | echo. qthelp to make HTML files and a qthelp project 26 | echo. devhelp to make HTML files and a Devhelp project 27 | echo. epub to make an epub 28 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 29 | echo. text to make text files 30 | echo. man to make manual pages 31 | echo. changes to make an overview over all changed/added/deprecated items 32 | echo. linkcheck to check all external links for integrity 33 | echo. doctest to run all doctests embedded in the documentation if enabled 34 | goto end 35 | ) 36 | 37 | if "%1" == "clean" ( 38 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 39 | del /q /s %BUILDDIR%\* 40 | goto end 41 | ) 42 | 43 | if "%1" == "html" ( 44 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 45 | if errorlevel 1 exit /b 1 46 | echo. 47 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 48 | goto end 49 | ) 50 | 51 | if "%1" == "dirhtml" ( 52 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 53 | if errorlevel 1 exit /b 1 54 | echo. 55 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 56 | goto end 57 | ) 58 | 59 | if "%1" == "singlehtml" ( 60 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 61 | if errorlevel 1 exit /b 1 62 | echo. 63 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 64 | goto end 65 | ) 66 | 67 | if "%1" == "pickle" ( 68 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 69 | if errorlevel 1 exit /b 1 70 | echo. 71 | echo.Build finished; now you can process the pickle files. 72 | goto end 73 | ) 74 | 75 | if "%1" == "json" ( 76 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 77 | if errorlevel 1 exit /b 1 78 | echo. 79 | echo.Build finished; now you can process the JSON files. 80 | goto end 81 | ) 82 | 83 | if "%1" == "htmlhelp" ( 84 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 85 | if errorlevel 1 exit /b 1 86 | echo. 87 | echo.Build finished; now you can run HTML Help Workshop with the ^ 88 | .hhp project file in %BUILDDIR%/htmlhelp. 89 | goto end 90 | ) 91 | 92 | if "%1" == "qthelp" ( 93 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 94 | if errorlevel 1 exit /b 1 95 | echo. 96 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 97 | .qhcp project file in %BUILDDIR%/qthelp, like this: 98 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Astropy.qhcp 99 | echo.To view the help file: 100 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Astropy.ghc 101 | goto end 102 | ) 103 | 104 | if "%1" == "devhelp" ( 105 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 106 | if errorlevel 1 exit /b 1 107 | echo. 108 | echo.Build finished. 109 | goto end 110 | ) 111 | 112 | if "%1" == "epub" ( 113 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 114 | if errorlevel 1 exit /b 1 115 | echo. 116 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 117 | goto end 118 | ) 119 | 120 | if "%1" == "latex" ( 121 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 122 | if errorlevel 1 exit /b 1 123 | echo. 124 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 125 | goto end 126 | ) 127 | 128 | if "%1" == "text" ( 129 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 130 | if errorlevel 1 exit /b 1 131 | echo. 132 | echo.Build finished. The text files are in %BUILDDIR%/text. 133 | goto end 134 | ) 135 | 136 | if "%1" == "man" ( 137 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 138 | if errorlevel 1 exit /b 1 139 | echo. 140 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 141 | goto end 142 | ) 143 | 144 | if "%1" == "changes" ( 145 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 146 | if errorlevel 1 exit /b 1 147 | echo. 148 | echo.The overview file is in %BUILDDIR%/changes. 149 | goto end 150 | ) 151 | 152 | if "%1" == "linkcheck" ( 153 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 154 | if errorlevel 1 exit /b 1 155 | echo. 156 | echo.Link check complete; look for any errors in the above output ^ 157 | or in %BUILDDIR%/linkcheck/output.txt. 158 | goto end 159 | ) 160 | 161 | if "%1" == "doctest" ( 162 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 163 | if errorlevel 1 exit /b 1 164 | echo. 165 | echo.Testing of doctests in the sources finished, look at the ^ 166 | results in %BUILDDIR%/doctest/output.txt. 167 | goto end 168 | ) 169 | 170 | :end 171 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Licensed under a 3-clause BSD style license - see LICENSE.rst 3 | # 4 | # Astropy documentation build configuration file. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this file. 9 | # 10 | # All configuration values have a default. Some values are defined in 11 | # the global Astropy configuration which is loaded here before anything else. 12 | # See astropy.sphinx.conf for which values are set there. 13 | 14 | # If extensions (or modules to document with autodoc) are in another directory, 15 | # add these directories to sys.path here. If the directory is relative to the 16 | # documentation root, use os.path.abspath to make it absolute, like shown here. 17 | # sys.path.insert(0, os.path.abspath('..')) 18 | # IMPORTANT: the above commented section was generated by sphinx-quickstart, but 19 | # is *NOT* appropriate for astropy or Astropy affiliated packages. It is left 20 | # commented out with this explanation to make it clear why this should not be 21 | # done. If the sys.path entry above is added, when the astropy.sphinx.conf 22 | # import occurs, it will import the *source* version of astropy instead of the 23 | # version installed (if invoked as "make html" or directly with sphinx), or the 24 | # version in the build directory (if "python setup.py build_sphinx" is used). 25 | # Thus, any C-extensions that are needed to build the documentation will *not* 26 | # be accessible, and the documentation will not build correctly. 27 | 28 | import datetime 29 | import os 30 | import sys 31 | 32 | try: 33 | from sphinx_astropy.conf.v1 import * # noqa 34 | except ImportError: 35 | print('ERROR: the documentation requires the sphinx-astropy package to be installed') 36 | sys.exit(1) 37 | 38 | # Get configuration information from setup.cfg 39 | from configparser import ConfigParser 40 | conf = ConfigParser() 41 | 42 | conf.read([os.path.join(os.path.dirname(__file__), '..', 'setup.cfg')]) 43 | setup_cfg = dict(conf.items('metadata')) 44 | 45 | # -- General configuration ---------------------------------------------------- 46 | 47 | # By default, highlight as Python 3. 48 | highlight_language = 'python3' 49 | 50 | # If your documentation needs a minimal Sphinx version, state it here. 51 | #needs_sphinx = '1.2' 52 | 53 | # To perform a Sphinx version check that needs to be more specific than 54 | # major.minor, call `check_sphinx_version("x.y.z")` here. 55 | # check_sphinx_version("1.2.1") 56 | 57 | # List of patterns, relative to source directory, that match files and 58 | # directories to ignore when looking for source files. 59 | exclude_patterns.append('_templates') 60 | 61 | # This is added to the end of RST files - a good place to put substitutions to 62 | # be used globally. 63 | rst_epilog += """ 64 | """ 65 | 66 | # -- Project information ------------------------------------------------------ 67 | 68 | # This does not *have* to match the package name, but typically does 69 | project = setup_cfg['package_name'] 70 | author = setup_cfg['author'] 71 | copyright = '{0}, {1}'.format( 72 | datetime.datetime.now().year, setup_cfg['author']) 73 | 74 | # The version info for the project you're documenting, acts as replacement for 75 | # |version| and |release|, also used in various other places throughout the 76 | # built documents. 77 | 78 | __import__(setup_cfg['package_name']) 79 | package = sys.modules[setup_cfg['package_name']] 80 | 81 | # The short X.Y version. 82 | version = package.__version__.split('-', 1)[0] 83 | # The full version, including alpha/beta/rc tags. 84 | release = package.__version__ 85 | 86 | 87 | # -- Options for HTML output -------------------------------------------------- 88 | 89 | # A NOTE ON HTML THEMES 90 | # The global astropy configuration uses a custom theme, 'bootstrap-astropy', 91 | # which is installed along with astropy. A different theme can be used or 92 | # the options for this theme can be modified by overriding some of the 93 | # variables set in the global configuration. The variables set in the 94 | # global configuration are listed below, commented out. 95 | 96 | 97 | # Add any paths that contain custom themes here, relative to this directory. 98 | # To use a different custom theme, add the directory containing the theme. 99 | #html_theme_path = [] 100 | 101 | # The theme to use for HTML and HTML Help pages. See the documentation for 102 | # a list of builtin themes. To override the custom theme, set this to the 103 | # name of a builtin theme or the name of a custom theme in html_theme_path. 104 | html_theme = "sphinx_rtd_theme" 105 | 106 | 107 | # Please update these texts to match the name of your package. 108 | # html_theme_options = { 109 | # 'logotext1': 'spec', # white, semi-bold 110 | # 'logotext2': 'viz', # orange, light 111 | # 'logotext3': ':docs' # white, light 112 | # } 113 | 114 | 115 | # Custom sidebar templates, maps document names to template names. 116 | #html_sidebars = {} 117 | 118 | # The name of an image file (relative to this directory) to place at the top 119 | # of the sidebar. 120 | #html_logo = '_static/specviz_html_logo.png' 121 | 122 | # The name of an image file (within the static path) to use as favicon of the 123 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 124 | # pixels large. 125 | #html_favicon = '' 126 | 127 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 128 | # using the given strftime format. 129 | #html_last_updated_fmt = '' 130 | 131 | # The name for this set of Sphinx documents. If None, it defaults to 132 | # " v documentation". 133 | html_title = '{0} v{1}'.format(project, release) 134 | 135 | # Output file base name for HTML help builder. 136 | htmlhelp_basename = project + 'doc' 137 | 138 | 139 | # -- Options for LaTeX output ------------------------------------------------- 140 | 141 | # Grouping the document tree into LaTeX files. List of tuples 142 | # (source start file, target name, title, author, documentclass [howto/manual]). 143 | latex_documents = [('index', project + '.tex', project + u' Documentation', 144 | author, 'manual')] 145 | 146 | 147 | # -- Options for manual page output ------------------------------------------- 148 | 149 | # One entry per manual page. List of tuples 150 | # (source start file, name, description, authors, manual section). 151 | man_pages = [('index', project.lower(), project + u' Documentation', 152 | [author], 1)] 153 | 154 | 155 | # -- Options for the edit_on_github extension --------------------------------- 156 | 157 | if eval(setup_cfg.get('edit_on_github')): 158 | extensions += ['sphinx_astropy.ext.edit_on_github'] 159 | 160 | versionmod = __import__(setup_cfg['package_name'] + '.version') 161 | edit_on_github_project = setup_cfg['github_project'] 162 | if versionmod.version.release: 163 | edit_on_github_branch = "v" + versionmod.version.version 164 | else: 165 | edit_on_github_branch = "master" 166 | 167 | edit_on_github_source_root = "" 168 | edit_on_github_doc_root = "docs" 169 | 170 | # -- Resolving issue number to links in changelog ----------------------------- 171 | github_issues_url = 'https://github.com/{0}/issues/'.format(setup_cfg['github_project']) 172 | 173 | # -- Turn on nitpicky mode for sphinx (to warn about references not found) ---- 174 | # 175 | nitpicky = True 176 | 177 | nitpick_ignore = [('py:class', 'PyQt5.QtWidgets.QMainWindow'), 178 | ('py:class', 'PyQt5.QtWidgets.QWidget'), 179 | ('py:class', 'PyQt5.QtWidgets.QTextEdit'), 180 | ('py:class', 'PyQt5.QtWidgets.QMdiSubWindow'), 181 | ('py:class', 'PyQt5.QtWidgets.QTabBar'), 182 | ('py:class', 'PyQt5.QtWidgets.QLabel'), 183 | ('py:class', 'PyQt5.QtWidgets.QComboBox'), 184 | ('py:class', 'PyQt5.QtWidgets.QMessageBox'), 185 | ('py:class', 'PyQt5.QtWidgets.QDialog'), 186 | ('py:class', 'PyQt5.QtWidgets.QToolBar'), 187 | ('py:class', 'PyQt5.QtWidgets.QStyledItemDelegate'), 188 | ('py:class', 'PyQt5.QtWidgets.QListView'), 189 | ('py:class', 'PyQt5.QtCore.QMimeData'), 190 | ('py:class', 'PyQt5.QtCore.QAbstractListModel'), 191 | ('py:class', 'PyQt5.QtCore.QAbstractTableModel'), 192 | ('py:class', 'PyQt5.QtCore.QThread'), 193 | ('py:class', 'PyQt5.QtCore.QSortFilterProxyModel'), 194 | ('py:obj', 'PyQt5.QtGui.QIcon'), 195 | ('py:class', 'PyQt5.QtGui.QStandardItemModel'), 196 | ('py:class', 'PyQt5.QtGui.QStandardItem'), 197 | ('py:class', 'qtpy.QtGui.QMouseEvent'), 198 | ('py:class', 'qtpy.QtCore.QModelIndex'), 199 | ('py:class', 'qtpy.QtWigets.QMdiArea'), 200 | ('py:class', 'qtpy.QtWidgets.QListView'), 201 | ('py:class', 'pyqtgraph.widgets.PlotWidget.PlotWidget'), 202 | ('py:class', 'pyqtgraph.graphicsItems.LinearRegionItem.LinearRegionItem'), 203 | ('py:class', 'pyqtgraph.graphicsItems.TextItem.TextItem'), 204 | ('py:class', 'pyqtgraph.graphicsItems.PlotDataItem.PlotDataItem')] 205 | --------------------------------------------------------------------------------