Skip to content

Commit

Permalink
Merge pull request #2 from simontorres/setting_rtd
Browse files Browse the repository at this point in the history
Setting Read The docs
  • Loading branch information
Simon Torres authored Jul 15, 2019
2 parents 8ce2b9f + c75372b commit 9b3ce13
Show file tree
Hide file tree
Showing 38 changed files with 94 additions and 103 deletions.
6 changes: 3 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = ReferenceLampsLibrary
SOURCEDIR = source
BUILDDIR = build
SPHINXPROJ = GoodmanLamps
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
Binary file added docs/_static/soar_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions docs/source/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
# sys.path.append(os.path.abspath('sphinxext'))

__version__ = __import__('goodman_lamps').__version__
# __version__ = '0.1.0'


extensions = ['matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive']
extensions = ['matplotlib.sphinxext.plot_directive']
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -93,6 +92,8 @@

html_theme = 'sphinx_rtd_theme'

html_logo = '_static/soar_logo.png'

# 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
# documentation.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='1200M0')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='1200M1')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='1200M2')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='1200M3')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='1200M4')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='1200M5')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='1200M6')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='1200M7')
4 changes: 1 addition & 3 deletions docs/source/plots/plot_400m1.py → docs/plots/plot_400m1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import absolute_import

import glob

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='400M1')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='400M2')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='600Blue')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='600Mid')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='600Red')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='600UV')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='930M1')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='930M2')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='930M3')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='930M4')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='930M5')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import

from goodman_lamps.tools.create_plot import create_plot
from goodman_lamps.goodman_lamps import create_plot

if __name__ == '__main__':
create_plot(mode='930M6')
2 changes: 1 addition & 1 deletion docs/source/plots_1200.rst → docs/plots_1200.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
1200 M0
*******

.. .. plot:: plots/plot_1200m0.py
.. plot:: plots/plot_1200m0.py

1200 M1
*******
Expand Down
3 changes: 0 additions & 3 deletions docs/source/plots_400.rst → docs/plots_400.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
400 M1
******

Testing plots


.. plot:: plots/plot_400m1.py

400 M2
Expand Down
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: goodman_lamps_2
channels:
- astroconda
dependencies:
- qt
- astropy
- matplotlib
- numpy
- pandas==0.23.0
- pip
- scipy
- pip:
- pyqt5
- ccdproc
- coveralls
- m2r
- sphinx
- sphinx_rtd_theme
- sphinxcontrib.napoleon
- goodman_pipeline==1.2.1.dev6
2 changes: 1 addition & 1 deletion goodman_lamps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from .version import __version__

from . import tools
from .goodman_lamps import create_plot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import glob
from ccdproc import CCDData

from pipeline.wcs import WCS
from goodman_pipeline.wcs import WCS

goodman_wcs = WCS()

Expand Down Expand Up @@ -87,8 +87,14 @@ def create_plot(mode):
data_path = os.path.dirname(__import__('goodman_lamps').__file__)
search_pattern = os.path.join(data_path,
'data/lamps/*{:s}*.fits'.format(mode))
print(data_path)
print(search_pattern)

for file_name in glob.glob(search_pattern):
file_list = glob.glob(search_pattern)
for _file in file_list:
print(_file)

for file_name in file_list:
fig, ax = plt.subplots(figsize=(16, 7))

ccd = CCDData.read(file_name, unit='adu')
Expand Down Expand Up @@ -126,6 +132,8 @@ def create_plot(mode):
plt.tight_layout()
plt.show()

print('END. {}'.format(mode))


# print(dir(__import__('goodman_lamps').__file__))
# # for mod in sys.modules:
Expand Down
3 changes: 0 additions & 3 deletions goodman_lamps/tools/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion goodman_lamps/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This is an automatic generated file please do not edit
__version__ = '0.0.1.dev1'
__version__ = '0.1.1.dev1'
20 changes: 16 additions & 4 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
version: 2

sphinx:
configuration: docs/conf.py

formats: all

python:
version: 3.5
setup_py_install: true
extra_requirements:
- docs
version: 3.6
install:
- method: pip
path: .
- method: setuptools
path: .

conda:
environment: environment.yml
12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
recommonmark
numpy
pandas
ccdproc
coveralls
astroplan
matplotlib
scipy
astropy
sphinx
sphinxcontrib.napoleon
sphinx_rtd_theme
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ edit_on_github = False
github_project = soar-telescope/goodman-lamps-lib
# install_requires = astropy six gwcs scipy
# version should be PEP440 compatible (http://www.python.org/dev/peps/pep-0440)
version = 0.0.1.dev1
version = 0.1.1.dev1
Loading

0 comments on commit 9b3ce13

Please sign in to comment.