Skip to content

Commit

Permalink
Merge pull request #147 from pdowler/master
Browse files Browse the repository at this point in the history
caom2-tap-server: update dependencies and test code
  • Loading branch information
pdowler authored Mar 18, 2024
2 parents b6625e0 + 2e6d312 commit 0800b07
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 139 deletions.
2 changes: 1 addition & 1 deletion argus/VERSION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## deployable containers have a semantic and build tag
# semantic version tag: major.minor
# build version tag: timestamp
VER=1.0.6
VER=1.0.7
TAGS="${VER} ${VER}-$(date -u +"%Y%m%dT%H%M%S")"
unset VER
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LANG=ADQL
QUERY=select top 1 position_bounds_size, 2*position_bounds_size, position_bounds_size/2 from caom2.Plane where position_bounds is not null
8 changes: 4 additions & 4 deletions caom2-tap-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sourceCompatibility = 1.8

group = 'org.opencadc'

version = '1.2.10'
version = '1.2.11'

description = 'OpenCADC CAOM2 TAP server library'
def git_url = 'https://github.com/opencadc/caom2service'
Expand All @@ -30,10 +30,10 @@ dependencies {
compile 'org.opencadc:cadc-vosi:[1.0.1,2.0)'
compile 'org.opencadc:cadc-dali:[1.1,)'
compile 'org.opencadc:cadc-dali-pg:[0.2,)'
compile 'org.opencadc:cadc-tap-server:[1.1.23,)'
compile 'org.opencadc:cadc-tap-server-pg:[1.0.3,)'
compile 'org.opencadc:cadc-tap-server:[1.1.24,)'
compile 'org.opencadc:cadc-tap-server-pg:[1.1.0,)'
compile 'org.opencadc:cadc-tap-schema:[1.1.6,)'
compile 'org.opencadc:cadc-adql:[1.1.9,)'
compile 'org.opencadc:cadc-adql:[1.1.14,)'
compile 'org.opencadc:caom2-artifact-resolvers:[1.2.3,)'

compile 'org.opencadc:cadc-gms:[1.0.0,)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
import ca.nrc.cadc.tap.parser.navigator.FromItemNavigator;
import ca.nrc.cadc.tap.parser.navigator.ReferenceNavigator;
import ca.nrc.cadc.tap.parser.navigator.SelectNavigator;
import ca.nrc.cadc.tap.parser.operator.postgresql.TextSearchMatch;
import ca.nrc.cadc.tap.parser.operator.postgresql.PgTextSearchMatch;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Date;
Expand Down Expand Up @@ -277,7 +277,7 @@ static Expression groupAccessControlExpression(Table assetTable, String metaRead
sb.append("|");
}
sb.deleteCharAt(sb.length() -1);
rtn = new TextSearchMatch(column, sb.toString());
rtn = new PgTextSearchMatch(column, sb.toString());
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
******************* CANADIAN ASTRONOMY DATA CENTRE *******************
************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES **************
*
* (c) 2023. (c) 2023.
* (c) 2024. (c) 2024.
* Government of Canada Gouvernement du Canada
* National Research Council Conseil national de recherches
* Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6
Expand Down Expand Up @@ -69,12 +69,12 @@

package ca.nrc.cadc.tap.impl;

import ca.nrc.cadc.tap.AdqlQuery;
import ca.nrc.cadc.tap.caom2.CaomReadAccessConverter;
import ca.nrc.cadc.tap.caom2.CaomRegionConverter;
import ca.nrc.cadc.tap.caom2.CaomSelectListConverter;
import ca.nrc.cadc.tap.caom2.IsDownloadableConverter;
import ca.nrc.cadc.tap.parser.BaseExpressionDeParser;
import ca.nrc.cadc.tap.parser.PgAdqlQuery;
import ca.nrc.cadc.tap.parser.PgsphereDeParser;
import ca.nrc.cadc.tap.parser.converter.ColumnNameConverter;
import ca.nrc.cadc.tap.parser.converter.TableNameConverter;
Expand All @@ -94,7 +94,7 @@
*
* @author pdowler
*/
public class CaomAdqlQuery extends AdqlQuery
public class CaomAdqlQuery extends PgAdqlQuery
{
private static Logger log = Logger.getLogger(CaomAdqlQuery.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,11 @@
import java.util.List;

import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import ca.nrc.cadc.tap.AdqlQuery;
import ca.nrc.cadc.tap.TapQuery;
import ca.nrc.cadc.tap.parser.extractor.SelectListExtractor;
import ca.nrc.cadc.tap.parser.navigator.FromItemNavigator;
import ca.nrc.cadc.tap.parser.navigator.ReferenceNavigator;
import ca.nrc.cadc.tap.parser.navigator.SelectNavigator;
import ca.nrc.cadc.tap.impl.CaomAdqlQuery;
import ca.nrc.cadc.tap.schema.TapSchema;
import ca.nrc.cadc.util.Log4jInit;
import ca.nrc.cadc.uws.Parameter;
Expand All @@ -109,40 +101,11 @@ public class AreaFunctionTest

private static TapSchema caomTapSchema = TestUtil.loadTapSchema();

/**
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
static {
Log4jInit.setLevel("ca.nrc.cadc.tap.caom", org.apache.log4j.Level.INFO);
}

/**
* @throws java.lang.Exception
*/
@AfterClass
public static void tearDownAfterClass() throws Exception
{
}

/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception
{
}

/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception
{
}

private class TestQuery extends AdqlQuery
private class TestQuery extends CaomAdqlQuery
{
protected void init()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@

import ca.nrc.cadc.tap.AdqlQuery;
import ca.nrc.cadc.tap.TapQuery;
import ca.nrc.cadc.tap.impl.CaomAdqlQuery;
import ca.nrc.cadc.tap.parser.converter.TableNameConverter;
import ca.nrc.cadc.tap.parser.converter.TableNameReferenceConverter;
import ca.nrc.cadc.tap.parser.navigator.ExpressionNavigator;
Expand Down Expand Up @@ -112,7 +113,7 @@ public class CaomRegionConverterTest {
Log4jInit.setLevel("ca.nrc.cadc.tap.caom2", Level.INFO);
}

private class TestQuery extends AdqlQuery {
private class TestQuery extends CaomAdqlQuery {

protected void init() {
//super.init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
import java.util.List;

import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import ca.nrc.cadc.tap.AdqlQuery;
import ca.nrc.cadc.tap.TapQuery;
import ca.nrc.cadc.tap.impl.CaomAdqlQuery;
import ca.nrc.cadc.tap.schema.TapSchema;
import ca.nrc.cadc.util.Log4jInit;
import ca.nrc.cadc.uws.Parameter;
Expand All @@ -28,8 +24,7 @@ public class CaomSelectListConverterTest
{
private static final Logger log = Logger.getLogger(CaomSelectListConverterTest.class);

static
{
static {
Log4jInit.setLevel("ca.nrc.cadc.tap.caom2", Level.INFO);
}

Expand All @@ -38,6 +33,16 @@ public class CaomSelectListConverterTest
public CaomSelectListConverterTest()
{
}

static class TestQuery extends CaomAdqlQuery
{
@Override
protected void init()
{
//super.init();
super.navigatorList.add(new CaomSelectListConverter(caomTapSchema));
}
}

@Test
public final void testNotFound()
Expand Down Expand Up @@ -141,14 +146,4 @@ public final void testAccessURLWithAlias()
TestUtil.job.getParameterList().clear();
}
}

static class TestQuery extends AdqlQuery
{
@Override
protected void init()
{
//super.init();
super.navigatorList.add(new CaomSelectListConverter(caomTapSchema));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@

import ca.nrc.cadc.tap.AdqlQuery;
import ca.nrc.cadc.tap.TapQuery;
import ca.nrc.cadc.tap.impl.CaomAdqlQuery;
import ca.nrc.cadc.tap.parser.extractor.SelectListExtractor;
import ca.nrc.cadc.tap.parser.navigator.FromItemNavigator;
import ca.nrc.cadc.tap.parser.navigator.ReferenceNavigator;
Expand All @@ -109,40 +110,11 @@ public class CentroidFunctionTest

private static TapSchema caomTapSchema = TestUtil.loadTapSchema();

/**
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
static {
Log4jInit.setLevel("ca.nrc.cadc.tap.caom", org.apache.log4j.Level.INFO);
}

/**
* @throws java.lang.Exception
*/
@AfterClass
public static void tearDownAfterClass() throws Exception
{
}

/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception
{
}

/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception
{
}

private class TestQuery extends AdqlQuery
private class TestQuery extends CaomAdqlQuery
{
protected void init()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,11 @@
import java.util.List;

import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import ca.nrc.cadc.tap.AdqlQuery;
import ca.nrc.cadc.tap.TapQuery;
import ca.nrc.cadc.tap.parser.extractor.SelectListExtractor;
import ca.nrc.cadc.tap.parser.navigator.FromItemNavigator;
import ca.nrc.cadc.tap.parser.navigator.ReferenceNavigator;
import ca.nrc.cadc.tap.parser.navigator.SelectNavigator;
import ca.nrc.cadc.tap.impl.CaomAdqlQuery;
import ca.nrc.cadc.tap.schema.TapSchema;
import ca.nrc.cadc.util.Log4jInit;
import ca.nrc.cadc.uws.Parameter;
Expand All @@ -109,40 +101,11 @@ public class CoordsysTest

private static TapSchema caomTapSchema = TestUtil.loadTapSchema();

/**
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
static {
Log4jInit.setLevel("ca.nrc.cadc.tap.caom", org.apache.log4j.Level.INFO);
}

/**
* @throws java.lang.Exception
*/
@AfterClass
public static void tearDownAfterClass() throws Exception
{
}

/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception
{
}

/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception
{
}

private class TestQuery extends AdqlQuery
private class TestQuery extends CaomAdqlQuery
{
protected void init()
{
Expand Down

0 comments on commit 0800b07

Please sign in to comment.