diff --git a/.gitignore b/.gitignore index f7b1acc..91a4a1b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,9 @@ /py3/dist /py3/SciServer.egg-info /py3/.idea -/Examples/.ipynb_checkpoints/ \ No newline at end of file +/Examples/.ipynb_checkpoints/ + +# Visual Studio Related +.vs +__pycache__ +*.user \ No newline at end of file diff --git a/SciScript-Python.sln b/SciScript-Python.sln new file mode 100644 index 0000000..cfd8967 --- /dev/null +++ b/SciScript-Python.sln @@ -0,0 +1,24 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "py2", "py2\py2.pyproj", "{1909A0AF-AFBF-4C19-B1A0-FD3C22469C09}" +EndProject +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "py3", "py3\py3.pyproj", "{BA762BB2-12BC-45BF-876B-2D77D1568FFA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1909A0AF-AFBF-4C19-B1A0-FD3C22469C09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1909A0AF-AFBF-4C19-B1A0-FD3C22469C09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA762BB2-12BC-45BF-876B-2D77D1568FFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA762BB2-12BC-45BF-876B-2D77D1568FFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/py2/py2.pyproj b/py2/py2.pyproj new file mode 100644 index 0000000..cad92e5 --- /dev/null +++ b/py2/py2.pyproj @@ -0,0 +1,40 @@ + + + + Debug + 2.0 + {1909a0af-afbf-4c19-b1a0-fd3c22469c09} + + setup.py + + . + . + {888888a0-9f3d-457c-b088-3a5042f75d52} + Standard Python launcher + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/UnitTests.py b/py3/Tests/UnitTests.py similarity index 97% rename from Tests/UnitTests.py rename to py3/Tests/UnitTests.py index 76aa138..0c42a89 100644 --- a/Tests/UnitTests.py +++ b/py3/Tests/UnitTests.py @@ -1,6 +1,7 @@ #!/usr/bin/python from SciServer import Authentication, LoginPortal, Config, CasJobs, SkyServer, SkyQuery, SciDrive -import unittest2 as unittest +#import unittest2 as unittest +import unittest import os; import pandas; import sys; @@ -10,9 +11,9 @@ import skimage # Define login Name and password before running the tests: -Authentication_loginName = '***'; -Authentication_loginPassword = '***' - +Authentication_loginName = '****'; +Authentication_loginPassword = '****' +SkyQuery_UserTablePrefix = 'webuser' #skyserver SkyServer_TestQuery = "select top 1 specobjid, ra, dec from specobj order by specobjid" @@ -376,9 +377,9 @@ def test_SkyQuery_uploadTable_getTable_getTableInfo_listTableColumns_dropTable(s table = SkyQuery.getTable(tableName=SkyQuery_TestTableName, datasetName="MyDB", top=10) self.assertEqual(SkyQuery_TestTableCSVdownloaded, table.to_csv(index=False)); - info = SkyQuery.getTableInfo(tableName="webuser." + SkyQuery_TestTableName, datasetName="MyDB") + info = SkyQuery.getTableInfo(tableName=SkyQuery_UserTablePrefix + '.' + SkyQuery_TestTableName, datasetName="MyDB") - columns = SkyQuery.listTableColumns(tableName="webuser." + SkyQuery_TestTableName, datasetName="MyDB") + columns = SkyQuery.listTableColumns(tableName=SkyQuery_UserTablePrefix + '.' + SkyQuery_TestTableName, datasetName="MyDB") result = SkyQuery.dropTable(tableName=SkyQuery_TestTableName, datasetName="MyDB"); self.assertEqual(result, True) diff --git a/py3/py3.pyproj b/py3/py3.pyproj new file mode 100644 index 0000000..243461e --- /dev/null +++ b/py3/py3.pyproj @@ -0,0 +1,41 @@ + + + + Debug + 2.0 + {ba762bb2-12bc-45bf-876b-2d77d1568ffa} + + setup.py + + . + . + {888888a0-9f3d-457c-b088-3a5042f75d52} + Standard Python launcher + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets + + + + + + + + + + + + + + + + + + + + \ No newline at end of file