Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9fde377
Updated some of the documentation for cosmosim.
agroener Aug 22, 2014
de1ed58
Added votable storage to download() in cosmosim/core.py. Also, began …
agroener Aug 24, 2014
5c8d703
Undid a git rm -r
agroener Sep 9, 2014
00215b7
Began the addition of the Millennium DB tool.
agroener Sep 9, 2014
69410da
Added a test_cosmosim.py to cosmosim/tests.
agroener Sep 9, 2014
9181315
Fixed up the login logic. Should work nicely with both scripts and in…
agroener Sep 11, 2014
2deb9bb
Separated out Millennium DB tool stuff into a different branch, entit…
agroener Sep 11, 2014
7b077cc
Added login() option store_password. Also changed default behavior of…
agroener Sep 11, 2014
c0971ef
fix print_help and add an exception for HARPS
keflavich Sep 9, 2014
fd8a913
need to check for ipynb more intelligently
keflavich Sep 10, 2014
3e8b738
add ALMA query tool [WIP]
keflavich Sep 9, 2014
f09d04c
remove __session reference (it was wrong)
keflavich Sep 9, 2014
13a3c31
docstrings
keflavich Sep 9, 2014
b766a5c
add tests
keflavich Sep 9, 2014
1b7f43b
remove row limit
keflavich Sep 9, 2014
266ef92
add remote tests (minimal)
keflavich Sep 9, 2014
2f708ff
docs! and update API to match the way I used it in the docs
keflavich Sep 10, 2014
2734e10
py3 fix
keflavich Sep 10, 2014
c6afcf0
use system_tools.in_ipynb() instead of __IPYTHON__
keflavich Sep 10, 2014
bd18381
setup.py -> v0.2.2
keflavich Sep 10, 2014
9389978
setup.py back to v0.3.dev
keflavich Sep 10, 2014
0ea18a1
LAMDA remote tests updated to respect new API
keflavich Sep 10, 2014
bd134cd
resolves Skyview Issue #414
keflavich Sep 10, 2014
07a406e
use the Query _request scheme
keflavich Sep 11, 2014
874a583
Added a bit to test_cosmosim_remote.
agroener Sep 11, 2014
df28e34
add support for 'auth' keyword
keflavich Sep 11, 2014
d816ad2
Attempted to add ok and raise_for_status to AstroResponse.
agroener Sep 11, 2014
fa29a45
Made some fixes to things now that _request() is being used.
agroener Sep 12, 2014
e6b40be
Fixing explore_db()
agroener Sep 12, 2014
2c2039f
Added auth in the same manner.
agroener Sep 13, 2014
3bd3367
Switched out the old explore_db function for a new one, using astropy…
agroener Sep 18, 2014
6eb9923
Fixed up explore_db in a couple of places. No longer prints only part…
agroener Sep 18, 2014
aadfd1c
Function completed_job_info now creates a global dictionary: response…
agroener Sep 18, 2014
9aa6912
Removed ipdb.
agroener Sep 18, 2014
09167a8
Updated a lot. In the process of switching check_all_jobs over to ast…
agroener Sep 20, 2014
c56fbcd
Finished adding sorting as well as astropy.table style output for che…
agroener Sep 20, 2014
e223bb5
Finished switching out printing for astropy.table output.
agroener Sep 20, 2014
dd6218d
Overhauled the download function to take one of four data formats.
agroener Sep 22, 2014
0d7693b
Removed _BaseQuery__session from cosomosim/core.py.
agroener Sep 22, 2014
0fcaa4b
Fixed a few typos which were causing errors in Travis.
agroener Sep 22, 2014
f609b9f
One more typo..
agroener Sep 22, 2014
8d710d2
Fixed a remaining typo in logout.
agroener Sep 22, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
- Added new tool: ALMA archive query tool
http://astroquery.readthedocs.org/en/latest/alma/alma.html
(#411)

- setup script and installation fixes

0.2 (2014-08-17)
Expand Down
7 changes: 0 additions & 7 deletions astroquery/alma/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ def _get_dataarchive_url(self):
self.dataarchive_url = self.archive_url
return self.dataarchive_url


def stage_data(self, uids, cache=False):
"""
Stage ALMA data
Expand Down Expand Up @@ -205,7 +204,6 @@ def stage_data(self, uids, cache=False):
self._staging_log['request_id'] = request_id
log.debug("Request ID: {0}".format(request_id))


# Submit a request for the specific request ID identified above
submission_url = os.path.join(self.dataarchive_url, 'rh', 'submission',
request_id)
Expand Down Expand Up @@ -248,7 +246,6 @@ def stage_data(self, uids, cache=False):
errormessage = root.find('div', id='errorContent').string.strip()
raise RemoteServiceError(errormessage)


data_table = root.findAll('table', class_='list', id='report')[0]
columns = {'uid':[], 'URL':[], 'size':[]}
for tr in data_table.findAll('tr'):
Expand All @@ -275,7 +272,6 @@ def _HEADER_data_size(self, files):
"""
Given a list of file URLs, return the data size. This is useful for
assessing how much data you might be downloading!

(This is discouraged by the ALMA archive, as it puts unnecessary load
on their system)
"""
Expand Down Expand Up @@ -337,11 +333,9 @@ def retrieve_data_from_uid(self, uids, cache=True):

#log.info("Determining download size for {0} files...".format(len(files)))
#each_size,totalsize = self.data_size(files)

log.info("Downloading files of size {0}...".format(totalsize.to(u.GB)))
# TODO: Add cache=cache keyword here. Currently would have no effect.
downloaded_files = self.download_files(file_urls)

return downloaded_files

def _parse_result(self, response, verbose=False):
Expand Down Expand Up @@ -642,7 +636,6 @@ def _validate_payload(self, payload):
"by the ALMA query service:"
" {0}".format(invalid_params))


Alma = AlmaClass()

def clean_uid(uid):
Expand Down
1 change: 0 additions & 1 deletion astroquery/alma/tests/test_alma.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def test_SgrAstar(monkeypatch):
monkeypatch.setattr(Alma, '_get_dataarchive_url', _get_dataarchive_url)
alma = Alma()
monkeypatch.setattr(alma, '_get_dataarchive_url', _get_dataarchive_url)

# monkeypatch instructions from https://pytest.org/latest/monkeypatch.html
monkeypatch.setattr(alma, '_request', alma_request)
# set up local cache path to prevent remote query
Expand Down
2 changes: 0 additions & 2 deletions astroquery/alma/tests/test_alma_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ def test_stage_data(self, temp_dir):

result_s = alma.query_object('Sgr A*')
assert b'2011.0.00217.S' in result_s['Project_code']

uid = result_s['Asdm_uid'][0]

alma.stage_data([uid])

def test_doc_example(self, temp_dir):
alma = Alma()
alma.cache_location = temp_dir

m83_data = alma.query_object('M83')
assert m83_data.colnames == ['Project_code', 'Source_name', 'RA',
'Dec', 'Band', 'Frequency_resolution',
Expand Down
834 changes: 637 additions & 197 deletions astroquery/cosmosim/core.py

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion astroquery/cosmosim/tests/test_cosmosim_remote.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import tempfile
import shutil
from astropy.tests.helper import pytest, remote_data
from ...cosmosim import CosmoSim
try:
import keyring
HAS_KEYRING = True
except ImportError:
HAS_KEYRING = False
try:
from ...cosmosim import CosmoSim
COSMOSIM_IMPORTED = True
except ImportError:
COSMOSIM_IMPORTED = False
from ...exceptions import LoginError

SKIP_TESTS = not(HAS_KEYRING and COSMOSIM_IMPORTED)

#@pytest.mark.skipif('SKIP_TESTS')
#@remote_data
#class TestEso:
# def __init__():

21 changes: 0 additions & 21 deletions astroquery/millennium/__init__.py

This file was deleted.

Empty file.