Skip to content

Commit 896ec0c

Browse files
Merge pull request #409 from NCEAS/develop
Release 3.0.0
2 parents 17b9d3c + de714c6 commit 896ec0c

File tree

29 files changed

+969
-498
lines changed

29 files changed

+969
-498
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@ jobs:
3535
- name: Install linux deps
3636
run: sudo apt-get install -y libcurl4-openssl-dev
3737

38+
- name: Set up Python
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: 3.8
42+
43+
- name: Install python dependencies
44+
run: pip install jep==3.9 # Install the jep library
45+
46+
- name: Set JEP_LIBRARY_PATH environment variable
47+
run: |
48+
echo "JEP_LIBRARY_PATH=$(python -c 'import site; print(site.getsitepackages()[0])')/jep" >> $GITHUB_ENV
49+
50+
- name: test
51+
run: |
52+
echo $JEP_LIBRARY_PATH
53+
ls $JEP_LIBRARY_PATH
54+
3855
- name: Install deps
3956
run: Rscript -e 'install.packages(c("httr", "jsonlite", "remotes"))'
4057

@@ -58,7 +75,7 @@ jobs:
5875

5976
docker-publish:
6077
name: Docker Build and Publish
61-
if: github.ref_name == 'develop' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref_name, 'bugfix')
78+
if: github.ref_name == 'develop' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref_name, 'feature')
6279
needs: maven-build
6380
runs-on: ubuntu-latest
6481
permissions:

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@
2020
".",
2121
"${fileDirname}"
2222
]
23+
},
24+
{
25+
"name": "Run MDQEngine",
26+
"type": "java",
27+
"request": "launch",
28+
"mainClass": "edu.ucsb.nceas.mdqengine.MDQEngine",
29+
"args": [
30+
"/opt/local/metadig/suites/python-suite.xml",
31+
"${workspaceFolder}/src/test/resources/test-docs/doi:10.18739_A2W08WG3R.xml",
32+
"${workspaceFolder}/src/test/resources/test-docs/doi:10.18739_A2W08WG3R.sm",
33+
],
34+
"cwd": "${workspaceFolder}"
2335
}
2436
]
2537
}

Docker/metadig-worker/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LABEL maintainer="Jeanette Clark jclark@nceas.ucsb.edu"
1111
# Set the working directory
1212
WORKDIR /var/lib/metadig
1313

14-
ARG ENGINE_TAG=2.0.0
14+
ARG ENGINE_TAG=3.0.0-SNAPSHOT
1515
ENV ENGINE_TAG=${ENGINE_TAG}
1616

1717
# The most recently built jar file is copied from the maven build directory to this dir by maven, so that
@@ -24,7 +24,11 @@ COPY target/metadig-engine-$ENGINE_TAG.jar metadig-engine-$ENGINE_TAG.jar
2424
COPY Docker/metadig-worker/solr solr/
2525

2626
RUN apt-get update
27-
RUN apt-get install -y g++ r-base r-base-dev r-base-core r-doc-html libc6-dev libssl-dev libxml2 libxml2-dev libcurl4-openssl-dev
27+
RUN apt-get install -y g++ git r-base r-base-dev r-base-core r-doc-html libc6-dev libssl-dev libxml2 libxml2-dev libcurl4-openssl-dev python3 python3-pip python3-dev openjdk-17-jdk
28+
29+
# Set Java environment variables
30+
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
31+
ENV PATH="$PATH:$JAVA_HOME/bin"
2832

2933
# Install required R packages
3034
RUN echo 'options(repos = c(CRAN = "http://cran.rstudio.com"))' >> /usr/lib/R/etc/Rprofile.site
@@ -34,6 +38,9 @@ RUN Rscript -e "remotes::install_github('NCEAS/metadig-r', ref = 'v.0.2.0')"
3438
# DataONE indexer prints copious error msgs if these files don't exist
3539
RUN mkdir -p /etc/dataone/index && touch /etc/dataone/index/d1client.properties && touch /etc/dataone/node.properties && touch /etc/dataone/index/cn-index-processor.properties
3640

41+
COPY Docker/metadig-worker/requirements.txt /opt/local/metadig/
42+
RUN pip install -r /opt/local/metadig/requirements.txt
43+
3744
# Run the Worker process
3845
# Note: docker --buile-arg only allows one argument (one token only, multiple tokens inside quotes doesn't work, so have
3946
# to specify java options directly on command line.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
numpy
2+
metadig @ git+https://github.com/NCEAS/metadig-py.git

bin/sendAssessmentTest.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
#!/Users/clark/.virtualenvs/metadig/bin/python
2-
3-
# this is a shebang to your python path. needs to be 2.7
4-
#/usr/bin/python
1+
#!/usr/bin/python
52

63
# This Python program can be used for local testing of RabbitMQ messaging between
74
# metadig services, assessment processing and Solr indexing.
85

96
import sys
107
import re
11-
print "Sending assessment request to metadig-controler (test mode):"
12-
print "Number of arguments: ", len(sys.argv)
8+
print("Sending assessment request to metadig-controller (test mode):")
9+
print("Number of arguments: ", len(sys.argv))
1310
import socket
1411

1512
host="localhost"
@@ -24,7 +21,7 @@
2421
clientsocket.connect((host, portNum))
2522

2623
testCount = 1
27-
suiteId = "test.suite"
24+
suiteId = "python.suite"
2825
nodeId = "urn:node:ARCTIC"
2926

3027
idVal = "doi:10.18739/A2W08WG3R"
@@ -34,17 +31,17 @@
3431
smFile = "%s/%s.sm" % (testDir, fileIdVal)
3532

3633
# First send the type of request, either 'graph' or 'quality'
37-
clientsocket.send("%s\n" % 'quality')
34+
clientsocket.send('quality\n'.encode('utf-8'))
3835

3936
# Next send the number of tests that will be run
40-
clientsocket.send("%s\n" % testCount)
37+
clientsocket.send(f"{testCount}\n".encode('utf-8'))
4138

4239
msg = '%s,%s,%s,%s,%s\n' % (idVal, mdFile, smFile, suiteId, nodeId)
4340

4441
print(msg)
45-
clientsocket.send(msg)
42+
clientsocket.send(msg.encode('utf-8'))
4643

4744
# Server will stop reading from the current port connection
48-
clientsocket.send("Done\n")
45+
clientsocket.send("Done\n".encode('utf-8'))
4946
# Server will stop reading from any port connection, but will continue to run
5047
clientsocket.close()

bin/startController.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
version=2.5.0
3+
version=3.0.0-SNAPSHOT
44

55
# Use first argument if sending jobs via port, for testing, for example:
66
java -cp /opt/local/metadig/config:./target/metadig-engine-${version}.jar edu.ucsb.nceas.mdqengine.Controller 33000

bin/startWorker.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#!/bin/bash
22

33
# Start a local copy of metadig-worker for RabbitMQ based development testing.
4-
version=2.5.0
4+
version=3.0.0-SNAPSHOT
55

6-
# Include the MetaDIG python library
7-
export JYTHONPATH=/opt/local/metadig/metadig-py
8-
9-
java -cp /opt/local/metadig/config:./target/metadig-engine-${version}.jar:./target/classes/solr -Dpython.path=JYTHONPATH edu.ucsb.nceas.mdqengine.Worker
6+
java -cp /opt/local/metadig/config:./target/metadig-engine-${version}.jar:./target/classes/solr edu.ucsb.nceas.mdqengine.Worker
107

helm/metadig-controller/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.2
18+
version: 1.0.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "2.5.0"
24+
appVersion: "3.0.0"

helm/metadig-controller/config.dev/metadig.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ quartz.monitor = true
3333
quartz.monitor.schedule = 0 0 0 * * ?
3434
quartz.monitor.processing.time = 12
3535
quartz.monitor.run.limit = 10
36+
# jep library
37+
jep.path = /usr/local/lib/python3.10/dist-packages/jep
3638

helm/metadig-controller/config/metadig.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ quartz.monitor = true
5959
quartz.monitor.schedule = 0 0 0 * * ?
6060
quartz.monitor.processing.time = 12
6161
quartz.monitor.run.limit = 10
62+
# jep library
63+
jep.path = /usr/local/lib/python3.10/dist-packages/jep

helm/metadig-controller/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replicaCount: 1
77
image:
88
repository: ghcr.io/nceas/metadig-controller
99
pullPolicy: Always
10-
tag: "v.2.5.0"
10+
tag: "v.3.0.0"
1111

1212

1313
imagePullSecrets: []

helm/metadig-scheduler/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.3
18+
version: 1.0.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "2.5.0"
24+
appVersion: "3.0.0"

helm/metadig-scheduler/config.dev/taskList.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ task-type,task-name,task-group,cron-schedule,params
1919
# - requestType: for score tasks, determine type of portal processing ("portal" or "node")
2020
#
2121
# Dataset quality scoring tasks
22-
quality,quality-test-arctic,metadig,5 0/1 * * * ?,"^eml.*|^http.*eml.*;arctic.data.center.suite.1;urn:node:mnTestARCTIC;2022-05-01T00:00:00.00Z;1;1000"
23-
quality,quality-test-dataone-fair,metadig,10 0/1 * * * ?,"^eml.*|^http.*eml.*|.*www.isotc211.org.*;FAIR-suite-0.3.1;urn:node:cnStage;2022-05-01T00:00:00.00Z;1;1000"
22+
quality,quality-test-arctic,metadig,5 0/1 * * * ?,"^eml.*|^http.*eml.*;arctic.data.center.suite-1.2.0;urn:node:mnTestARCTIC;2022-05-01T00:00:00.00Z;1;1000"
23+
quality,quality-test-dataone-fair,metadig,10 0/1 * * * ?,"^eml.*|^http.*eml.*|.*www.isotc211.org.*;FAIR-suite-0.4.0;urn:node:cnStage;2022-05-01T00:00:00.00Z;1;1000"
2424
#
2525
# Portal scoring tasks
2626
score,portal-test-arctic-FAIR,metadig,10 0/1 * * * ?,"*portals*;FAIR-suite-0.3.1;urn:node:mnTestARCTIC;2022-05-01T00:00:00.00Z;1;100;portal"

helm/metadig-scheduler/config/taskList.csv

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ task-type,task-name,task-group,cron-schedule,params
2020
#
2121
# Dataset quality scoring tasks
2222
quality,quality-knb,metadig,0 0/1 * * * ?,"^eml.*|^http.*eml.*;knb.suite.1;urn:node:KNB;2020-08-24T00:00:00.00Z;1;1000"
23-
quality,quality-arctic,metadig,5 0/1 * * * ?,"^eml.*|^http.*eml.*;arctic.data.center.suite.1;urn:node:ARCTIC;2022-04-01T00:00:00.00Z;1;1000"
24-
quality,quality-arctic,metadig,5 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.3.1;urn:node:ARCTIC;2022-04-01T00:00:00.00Z;1;1000"
25-
quality,quality-dataone-fair,metadig,10 0/1 * * * ?,"^eml.*|^http.*eml.*|.*www.isotc211.org.*;FAIR-suite-0.3.1;urn:node:CN;2010-01-01T00:00:00.00Z;1;1000"
26-
quality,quality-ess-dive,metadig,15 0/1 * * * ?,"^eml.*|^http.*eml.*;ess-dive.data.center.suite-1.1.0;urn:node:ESS_DIVE;2016-01-01T00:00:00.00Z;1;1000;"
27-
quality,quality-cerp_sfwmd,metadig,20 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.3.1;urn:node:CERP_SFWMD;2010-10-07T00:00:00.00Z;1;1000;"
28-
quality,quality-CA_OPC,metadig,25 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.3.1;urn:node:CA_OPC;2010-10-07T00:00:00.00Z;1;1000;"
29-
quality,quality-sctld,metadig,30 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.3.1;urn:node:SCTLD;2010-10-07T00:00:00.00Z;1;1000;"
30-
quality,quality-drp,metadig,35 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.3.1;urn:node:DRP;2010-10-07T00:00:00.00Z;1;1000;"
23+
quality,quality-arctic,metadig,5 0/1 * * * ?,"^eml.*|^http.*eml.*;arctic.data.center.suite-1.2.0;urn:node:ARCTIC;2022-04-01T00:00:00.00Z;1;1000"
24+
quality,quality-arctic,metadig,5 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.4.0;urn:node:ARCTIC;2022-04-01T00:00:00.00Z;1;1000"
25+
quality,quality-dataone-fair,metadig,10 0/1 * * * ?,"^eml.*|^http.*eml.*|.*www.isotc211.org.*;FAIR-suite-0.4.0;urn:node:CN;2010-01-01T00:00:00.00Z;1;1000"
26+
quality,quality-ess-dive,metadig,15 0/1 * * * ?,"^eml.*|^http.*eml.*;ess-dive.data.center.suite-1.2.0;urn:node:ESS_DIVE;2016-01-01T00:00:00.00Z;1;1000;"
27+
quality,quality-cerp_sfwmd,metadig,20 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.4.0;urn:node:CERP_SFWMD;2010-10-07T00:00:00.00Z;1;1000;"
28+
quality,quality-CA_OPC,metadig,25 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.4.0;urn:node:CA_OPC;2010-10-07T00:00:00.00Z;1;1000;"
29+
quality,quality-sctld,metadig,30 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.4.0;urn:node:SCTLD;2010-10-07T00:00:00.00Z;1;1000;"
30+
quality,quality-drp,metadig,35 0/1 * * * ?,"^eml.*|^http.*eml.*;FAIR-suite-0.4.0;urn:node:DRP;2010-10-07T00:00:00.00Z;1;1000;"
3131
#
3232
# Portal scoring tasks
3333
score,portal-KNB-FAIR,metadig,1 0/1 * * * ?,"*portals*;FAIR-suite-0.3.1;urn:node:KNB;2020-08-10T00:00:00.00Z;1;100;portal"

helm/metadig-scheduler/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replicaCount: 1
77
image:
88
repository: ghcr.io/nceas/metadig-scheduler
99
pullPolicy: Always
10-
tag: "v.2.5.0"
10+
tag: "v.3.0.0"
1111

1212
imagePullSecrets: []
1313
nameOverride: ""

helm/metadig-scorer/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.2
18+
version: 1.0.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "2.5.0"
24+
appVersion: "3.0.0"

helm/metadig-scorer/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replicaCount: 1
77
image:
88
repository: ghcr.io/nceas/metadig-scorer
99
pullPolicy: Always
10-
tag: "v.2.5.0"
10+
tag: "v.3.0.0"
1111

1212

1313
imagePullSecrets: []

helm/metadig-worker/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.2
18+
version: 1.0.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "2.5.0"
24+
appVersion: "3.0.0"

helm/metadig-worker/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replicaCount: 1
77
image:
88
repository: ghcr.io/nceas/metadig-worker
99
pullPolicy: Always
10-
tag: "v.2.5.0"
10+
tag: "v.3.0.0"
1111

1212
imagePullSecrets: []
1313
nameOverride: ""

0 commit comments

Comments
 (0)