<commit_before>from atpy import *

# Read in AJ VO Table

print "Reading VO Table"
vt = VOTable(name='red sources')
vt.read('examples/aj285677t2_VOTable.xml')

# Convert to FITS Table

print "Converting to FITS Table"
ft = FITSTable(vt)
ft.write('temp1.fits',overwrite=True)

# Convert to IPAC Table

print "Converting to IPAC Table"
it = IPACTable(vt)
it.write('temp1.tbl')

# Read in UKIDSS FITS table

print "Reading in FITS Table"
ft = FITSTable()
ft.read('examples/catalog_1.fits.gz')

# Convert to VO Table

print "Converting to VO Table"
vt = VOTable(ft)
vt.write('temp2.xml')

# Convert to IPAC Table

print "Converting to IPAC Table"
it = IPACTable(ft)
it.write('temp2.tbl')

# Reading in FITS file with vector columns

print "Reading in FITS Table set"
ft = FITSTable()
ft.read('examples/3000030_1_sed.fits.gz',hdu=3)

print "Converting to VO Table"
vt = VOTable(ft)
vt.write('temp6.xml')

# Read in set of FITS Tables

print "Reading in FITS Table set"
fts = FITSTableSet()
fts.read('examples/3000030_1_sed.fits.gz')

# Write out set of VO Tables<commit_msg>- updated tests for SQL stuff<commit_after>from atpy import *

# Read in AJ VO Table

print "Reading VO Table"
vt = VOTable(name='red sources')
vt.read('examples/aj285677t2_VOTable.xml')

# Convert to FITS Table

print "Converting to FITS Table"
ft = FITSTable(vt)
ft.write('temp1.fits',overwrite=True)

# Convert to IPAC Table

print "Converting to IPAC Table"
it = IPACTable(vt)
it.write('temp1.tbl')

# Convert to SQLite databases

print "Converting to SQL databases"
st = SQLTable2(vt)
st.write('postgres',database='python',user='tom',overwrite=True)
st.write('sqlite','temp1.db',overwrite=True)
st.write('mysql',db='python',user='tom',passwd="<PASSWORD>",overwrite=True)

# Read in UKIDSS FITS table

print "Reading in FITS Table"
ft = FITSTable()
ft.read('examples/catalog_1.fits.gz')
ft.table_name = "UKIDSS"

# Convert to VO Table

print "Converting to VO Table"
vt = VOTable(ft)
vt.write('temp2.xml')

# Convert to IPAC Table

print "Converting to IPAC Table"
it = IPACTable(ft)
it.write('temp2.tbl')

# Convert to SQL databases

print "Converting to SQL databases"
st = SQLTable2(ft)
st.write('postgres',database='python',user='tom',overwrite=True)
st.write('sqlite','temp2.db',overwrite=True)
st.write('mysql',db='python',user='tom',passwd="<PASSWORD>",overwrite=True)

# Reading in FITS file with vector columns

print "Reading in FITS Table set"
ft = FITSTable()
ft.read('examples/3000030_1_sed.fits.gz',hdu=3)

print "Converting to VO Table"
vt = VOTable(ft)
vt.write('temp6.xml')

# Read in set of FITS Tables

print "Reading in FITS Table set"
fts = FITSTableSet()
fts.read('examples/3000030_1_sed.fits.gz')

# Write out set of VO Tables
{'fraction_non_alphanumeric': 0.13335782512858194, 'fraction_numerical': 0.02351212343864805, 'mean_word_length': 5.467933491686461, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6150173', 'n_tokens_mistral': 1083, 'n_tokens_neox': 995, 'n_words': 278}