Skip to content

Commit

Permalink
Make all stsci imports optional so RTD would build
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Apr 20, 2016
1 parent 2925d58 commit faf3160
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 13 deletions.
5 changes: 4 additions & 1 deletion lib/acstools/acs2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
import subprocess

# STSCI
from stsci.tools import parseinput
try:
from stsci.tools import parseinput
except ImportError: # So RTD would build
pass
try:
from stsci.tools import teal
except:
Expand Down
12 changes: 7 additions & 5 deletions lib/acstools/acs_destripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@
from astropy.io import fits

# STSCI
from stsci.tools import parseinput
from stsci.tools import teal
from stsci.tools import bitmask
from stsci.imagestats import ImageStats

try:
from stsci.tools import parseinput
from stsci.tools import teal
from stsci.tools import bitmask
from stsci.imagestats import ImageStats
except ImportError: # So RTD would build
pass

__taskname__ = 'acs_destripe'
__version__ = '0.8.0'
Expand Down
9 changes: 6 additions & 3 deletions lib/acstools/acs_destripe_plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@
import numpy as np

# STSCI
from stsci.tools import parseinput
from stsci.tools import teal
from stsci.tools import bitmask
try:
from stsci.tools import parseinput
from stsci.tools import teal
from stsci.tools import bitmask
except ImportError: # So RTD would build
pass

# LOCAL
from . import acs_destripe
Expand Down
5 changes: 4 additions & 1 deletion lib/acstools/acsccd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
import subprocess

# STSCI
from stsci.tools import parseinput
try:
from stsci.tools import parseinput
except ImportError: # So RTD would build
pass
try:
from stsci.tools import teal
except:
Expand Down
5 changes: 4 additions & 1 deletion lib/acstools/acscte.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
import subprocess

# STSCI
from stsci.tools import parseinput
try:
from stsci.tools import parseinput
except ImportError: # So RTD would build
pass
try:
from stsci.tools import teal
except:
Expand Down
5 changes: 4 additions & 1 deletion lib/acstools/acsrej.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
import subprocess

# STSCI
from stsci.tools import parseinput
try:
from stsci.tools import parseinput
except ImportError: # So RTD would build
pass
try:
from stsci.tools import teal
except:
Expand Down
5 changes: 4 additions & 1 deletion lib/acstools/acssum.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
import subprocess

# STSCI
from stsci.tools import parseinput
try:
from stsci.tools import parseinput
except ImportError: # So RTD would build
pass
try:
from stsci.tools import teal
except:
Expand Down

0 comments on commit faf3160

Please sign in to comment.