-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in pull requests that added unit testing and working docs.
- Loading branch information
Showing
10 changed files
with
95 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
language: python | ||
|
||
python: | ||
- '2.7' | ||
- '3.3' | ||
- '3.4' | ||
- '3.5' | ||
|
||
install: | ||
- pip install astropy | ||
- pip install matplotlib | ||
|
||
script: | ||
- py.test | ||
|
||
matrix: | ||
allow_failures: | ||
- python: 3.3 | ||
- python: 3.4 | ||
- python: 3.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from pkg_resources import get_distribution | ||
__version__ = get_distribution('astrodbkit').version | ||
__version__ = '0.3.0.post6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import pytest | ||
import tempfile | ||
import os | ||
from astropy.utils.data import download_file | ||
from .. import astrodb | ||
|
||
|
||
def setup_module(module): | ||
db_path = download_file("http://github.com/BDNYC/BDNYCdb/raw/master/BDNYCv1.0.db") | ||
module.bdnyc_db = astrodb.Database(db_path) | ||
filename = os.path.join(tempfile.mkdtemp(), 'empty_db.db') | ||
module.empty_db = astrodb.create_database(filename) | ||
|
||
def test_loaddb(): | ||
print(bdnyc_db) | ||
print(empty_db) | ||
|
||
def test_search(): | ||
bdnyc_db.search('1234','sources') | ||
|
||
def test_inventory(): | ||
bdnyc_db.inventory(825) | ||
|
||
def test_sqlquery(): | ||
bdnyc_db.query("SELECT s.id, s.ra, s.dec, s.shortname, p.source_id, p.band, p.magnitude " | ||
"FROM sources as s JOIN photometry as p ON s.id=p.source_id " | ||
"WHERE s.dec<=-10 AND p.band=='W1'") | ||
|
||
def test_schema(): | ||
bdnyc_db.schema('sources') | ||
|
||
@pytest.mark.xfail | ||
def test_add_data(): | ||
assert False | ||
|
||
@pytest.mark.xfail | ||
def test_clean_up(): | ||
assert False | ||
|
||
@pytest.mark.xfail | ||
def test_merge(): | ||
assert False | ||
|
||
@pytest.mark.xfail | ||
def test_output_spectrum(): | ||
assert False | ||
|
||
@pytest.mark.xfail | ||
def test_plot_spectrum(): | ||
assert False | ||
|
||
@pytest.mark.xfail | ||
def test_table(): | ||
assert False |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
astrodb module | ||
============== | ||
|
||
.. automodule:: astrodb | ||
.. automodule:: astrodbkit.astrodb | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
votools module | ||
================ | ||
|
||
.. automodule:: votools | ||
.. automodule:: astrodbkit.votools | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters