Skip to content

Commit

Permalink
Merge branch 'release/1.13.4' into bugfix/open-curve-curator-via-corp…
Browse files Browse the repository at this point in the history
…Name

* release/1.13.4: (166 commits)
  added long timeout to purge cmpds route
  fixes #673 setting for allowing no structures compounds to be registered as unique parents
  send author roles instead of username to the updated POST service
  fixing some error response messages
  fixing rendering of log dose
  export image with .png in file name, fix issues with logResponse
  add api route for saving label sequences
  adding options to not use colors by default in plots
  updating color options
  #fixes 667 adding route for getting curve metadata quickly in bulk by curve id
  667 adding route for getting curve metadata quickly in bulk by curve id
  fixes #663 removing extra console log line
  fixes #663 url encode file name when calling resp.sendfile from data files route
  fixes #661 Provide bootstrap main function
  fixes #658 add bottom margin to multi interaction remove button to match aligned div
  fixes #654 url encode protocol label in protocol by label
  adding additional custom metadata values
  651 better handling of errors when persistance fails to purge
  644 Fix for lower case project names being sorted to the end
  fixes #603: prevent ls thing from listening to createNewLabel more than once
  ...

# Conflicts:
#	conf/config.properties.example
  • Loading branch information
brianbolt committed Apr 20, 2020
2 parents 8b327d6 + 1309e2c commit e1bc3ec
Show file tree
Hide file tree
Showing 117 changed files with 4,421 additions and 4,734 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Dockerfile*
docker-compose*.yml
build
licenses
venv
#this is for the soft link in .dockerfile (git ignore .git by default)
.git
chemaxon
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@ RUN \
# node
RUN set -ex \
&& for key in \
9554F04D7259F04124DE6B476D5A82AC7E37093B \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
56730D5401028683275BD23C23EFEFE93C4CFFFE \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
; do \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "$key" || \
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 "$key" || \
gpg --keyserver pgp.mit.edu "$key"; \
done

ENV NPM_CONFIG_LOGLEVEL warn
Expand All @@ -43,7 +49,7 @@ ENV ACAS_BASE /home/runner/acas
ENV ACAS_CUSTOM /home/runner/acas_custom
ENV ACAS_SHARED /home/runner/acas_shared
ENV APACHE Redhat
RUN npm install -g gulpjs/gulp.git#4.0 forever nodemon mocha coffee-script
RUN npm install -g gulp@4.0.0 forever nodemon mocha coffeescript
COPY package.json $ACAS_BASE/package.json
RUN chown -R runner:runner $ACAS_BASE
USER runner
Expand Down Expand Up @@ -73,10 +79,9 @@ USER root
RUN curl -SLO dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm && rpm -ivh epel-release-6-8.noarch.rpm && rm epel-release-6-8.noarch.rpm
RUN yum install -y centos-release-SCL
RUN yum install -y python-pip python-psycopg2 python27
RUN source /opt/rh/python27/enable && pip install argparse requests psycopg2
RUN source /opt/rh/python27/enable && pip install argparse requests psycopg2-binary
USER runner

EXPOSE 3000
EXPOSE 3001

CMD ["/bin/sh","bin/acas.sh", "run"]
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ cd acas-cmpdreg-roo-server
* Login and/or Sign-Up
* Click Download > JChem Suite > JChem
* Scroll down to Archives and select 16.4.25.0, click Get Archive
* Download jchem-merged-lib-16.4.25.0.zip
* Download [jchem-merged-lib-16.4.25.0.zip](https://chemaxon.com/download?dl=%2Fdata%2Fdownload%2Fjchem%2F16.4.25.0%2Fjchem-merged-lib-16.4.25.0.zip)
* Unzip it and rename jchem.jar to jchem-16.4.25.0.jar

##### Add chemaxon jar file to a lib folder in the checkout
Expand Down Expand Up @@ -157,17 +157,31 @@ docker-compose up -d
```

#### Login

Visit `http://localhost:3000` in your browser to login. You will need to create a user in order to access the web app:

```bash
curl localhost:3001/api/systemTest/getOrCreateACASBob
curl localhost:3001/api/systemTest/getOrCreateGlobalProject
curl localhost:3001/api/systemTest/getOrCreateGlobalProjectRole
curl localhost:3001/api/systemTest/giveBobRoles
curl localhost:3001/api/systemTest/getOrCreateCmpdRegBob
curl localhost:3001/api/systemTest/syncRoles
```
http://localhost:3000
```
Optionally you could run the shell script `docker_bob_setup.sh` in this repository instead of manually `curl`ing each endpoint.

This will create a user "bob" with password "secret".

#### Viewing logs

```
docker-compose logs --tail=20 -f <service>
```

e.g. for all containers

```
docker-compose logs --tail=20 -f
docker-compose logs -f
```

e.g. for only tomcat
Expand All @@ -176,6 +190,12 @@ e.g. for only tomcat
docker-compose logs --tail=20 -f tomcat
```

Stop the web stack

```bash
docker-compose down
```

#### Troubleshooting

* There is a known timing issue where tomcat may try to connect to the database before the database is accepting connections. If this happens, try restarting tomcat.
Expand Down
3 changes: 3 additions & 0 deletions app_api_template.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ startApp = ->

httpServer = http.createServer(app).listen(app.get('port'), ->
console.log("ACAS API server listening on port " + app.get('port'))
bootstrap = require "./src/javascripts/ServerAPI/Bootstrap.js"
if bootstrap.main?
bootstrap.main()
)

###TO_BE_REPLACED_BY_PREPAREMODULEINCLUDES###
Expand Down
12 changes: 0 additions & 12 deletions app_template.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,6 @@ startApp = ->
else
passport.use new LocalStrategy csUtilities.loginStrategy

# passport.isAdmin = (req, resp, next) ->
# if req.isAuthenticated() and csUtilities.isUserAdmin(req.user)
# next()
# else
# next new handler.NotAuthorizedError "Sorry, you don't have the right!"
# passport.isAuthenticated = (req, resp, next) ->
# console.log "running passort.isAuthenticated"
# unless req.isAuthenticated()
# next new handler.NotAuthorizedError "Sorry, you don't have the right!"
# else
# next()

loginRoutes = require './routes/loginRoutes'
MemoryStore = express.session.MemoryStore;
sessionStore = new MemoryStore();
Expand Down
58 changes: 53 additions & 5 deletions conf/config.properties.example
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ server.ssl.cert.passphrase=selfCertForACASServer

client.service.rapache.port=1080
server.rapache.listen=*
server.rapache.forceAllToStdErrOnly=true

#todo not in codebase 6/2015
client.service.rapache.use.ssl=${client.use.ssl}
client.service.rapache.host=rservices
Expand Down Expand Up @@ -283,6 +285,8 @@ client.service.result.viewer.liveDesign.database.username=
client.service.result.viewer.liveDesign.database.password=
client.service.result.viewer.liveDesign.database.hostname=
client.service.result.viewer.liveDesign.database.port=
server.liveDesign.installClientOnStart=false
client.service.result.viewer.liveDesign.makeReportReadonly=true
client.service.result.viewer.simpleSAR.baseUrl=
client.service.result.viewer.seurat.protocolPrefix=http://${client.service.persistence.host}:9080/seurat/runseurat?cmd=newjob&AssayName=
client.service.result.viewer.seurat.experimentPrefix=&AssayProtocol=
Expand Down Expand Up @@ -320,7 +324,7 @@ server.service.external.file.service.url=

# options for preferred batchid type are: NewLineSepBulkPost, SeuratCmpdReg, GeneCodeCheckByR, AcasCmpdReg, LabSynchCmpdReg, SingleBatchNameQueryString, AllPass
client.service.external.preferred.batchid.type=NewLineSepBulkPost
server.service.external.preferred.batchid.url=http://tomcat:8080/cmpdreg/api/v1/getPreferredName
server.service.external.preferred.batchid.url=http://tomcat:8080/acas/api/v1/getPreferredName
server.service.external.preferred.batchid.separator=-
server.service.external.project.url=
server.service.external.report.registration.url=
Expand Down Expand Up @@ -369,9 +373,9 @@ client.browser.enableSearchAll=true

## Cmpd Reg Bulk Loader Options
client.service.cmpdReg.persistence.host=tomcat
client.service.cmpdReg.persistence.path=cmpdreg/api/v1
client.service.cmpdReg.persistence.path=acas/api/v1
client.service.cmpdReg.persistence.fullpath=http://${client.service.cmpdReg.persistence.host}:${client.service.persistence.port}/${client.service.cmpdReg.persistence.path}/
client.service.cmpdReg.persistence.basepath=http://${client.service.cmpdReg.persistence.host}:${client.service.persistence.port}/cmpdreg
client.service.cmpdReg.persistence.basepath=http://${client.service.cmpdReg.persistence.host}:${client.service.persistence.port}/acas

# If project select is shown separately in the Configuration part of the GUI
client.cmpdReg.showProjectSelect=true
Expand Down Expand Up @@ -401,7 +405,11 @@ client.curvefit.modelfitparameter.classes=[{"code":"4 parameter D-R", "parameter
{"code":"4 parameter D-R IC50", "parametersController":"DoseResponseAnalysisParametersController", "parametersClass": "DoseResponseIC50AnalysisParameters", "plotCurveClass": "DoseResponsePlotCurveLL4IC50", "RSource":"src/r/CurveAnalysis/ll4IC50.R", "parametersOptions":{"defaultBaseline":0}},\
{"code":"4 parameter D-R IC50/DMax", "parametersController":"DoseResponseAnalysisParametersController", "parametersClass": "DoseResponseIC50AnalysisParameters", "plotCurveClass": "DoseResponsePlotCurveLL4IC50", "RSource":"src/r/CurveAnalysis/ll4IC50DMax.R", "parametersOptions":{"defaultBaseline":0}},\
{"code":"Michaelis-Menten", "parametersController":"DoseResponseKmAnalysisParametersController", "parametersClass": "DoseResponseKmAnalysisParameters", "plotCurveClass": "DoseResponsePlotCurveKm", "RSource":"src/r/CurveAnalysis/mm2.R", "parametersOptions":{"defaultBaseline":0}},\
{"code":"Substrate Inhibition", "parametersController":"DoseResponseSubstrateInhibitionAnalysisParametersController", "parametersClass": "DoseResponseSubstrateInhibitionAnalysisParameters", "plotCurveClass": "DoseResponsePlotCurveSubstrateInhibition", "RSource":"src/r/CurveAnalysis/substrateInhibition.R", "parametersOptions":{"defaultBaseline":0}}]
{"code":"Substrate Inhibition", "parametersController":"DoseResponseSubstrateInhibitionAnalysisParametersController", "parametersClass": "DoseResponseSubstrateInhibitionAnalysisParameters", "plotCurveClass": "DoseResponsePlotCurveSubstrateInhibition", "RSource":"src/r/CurveAnalysis/substrateInhibition.R", "parametersOptions":{"defaultBaseline":0}},\
{"code":"Scatter", "RSource":"src/r/CurveAnalysis/scatter.R", "renderOptions": {"connectPoints": false}},\
{"code":"Scatter Log-x", "RSource":"src/r/CurveAnalysis/scatter.R", "renderOptions": {"connectPoints": false}},\
{"code":"Scatter Log-y", "RSource":"src/r/CurveAnalysis/scatter.R", "renderOptions": {"connectPoints": false}},\
{"code":"Scatter Log-x,y", "RSource":"src/r/CurveAnalysis/scatter.R", "renderOptions": {"connectPoints": false}}]


# Lock when approved filter
Expand Down Expand Up @@ -529,10 +537,38 @@ client.basePath=/
server.curveCurator.onRejectMakeReportedValuesNonPublic=false
server.curveRender.drawPointsForRejectedCurve=true

### Plot colors
# Colors of curves to be cycled through when coloring curves. Black is usually the first color as the first color is used for single, non overlayed curves.
# If supplied, the config server.curveRender.mostRecentCurveColor will override the first color in this list for the most recent
# Valid colors can be found here:
# http://www.stat.columbia.edu/~tzheng/files/Rcolor.pdf
# Some examples of other color schemes:
# server.curveRender.plotColors=black,red,blue,orange,purple,cyan,darkolivegreen4,firebrick4,aquamarine4,chocolate3,dodgerblue4,coral2,darkorchid3,cadetblue4,darkgoldenrod3,lightcyan4,seagreen4,mediumvioletred
# server.curveRender.plotColors=black,#a6cee3,#1f78b4,#b2df8a,#33a02c,#fb9a99,#e31a1c,#fdbf6f,#ff7f00,#cab2d6,#6a3d9a,#ffff99,#b15928
# server.curveRender.plotColors=black
server.curveRender.plotColors=black,#0C5BB0FF,#EE0011FF,#15983DFF,#EC579AFF,#FA6B09FF,#149BEDFF,#A1C720FF,#FEC10BFF,#16A08CFF,#9A703EFF

### Most recent curve color
## Color curves by default according to the plot colors. The list of plot colors is recycled if there are more curves in the plot than colors
server.curveRender.usePlotColorsByDefault=true

### Most recent curve color
## If supplied the most recent uploaded curve will get the supplied color
server.curveRender.mostRecentCurveColor=green

### Curve line width
# Default: 1
# If supplied, a with 0.5, the line widths of curves will be 1/2 the thickness of the default of 1. Converseley, a value of 2 will produce curves with twice the thickeness.
server.curveRender.curveLwd=1.5

### Plot points on overlay
# If true, curves that are overlayed will show points for all the curves in the plot. If false, no points will be shown on overlayed curves.
# This does not affect single/non overlayed curves
server.curveRender.plotPointsOnOverlay=false

# Restrict experiment search by project
server.service.projects.restrictExperiments=false

flyway.location=db/migration/postgres,com.labsynch.labseer.db.migration.postgres
flyway.schema=acas
flyway.database.username=${server.database.username}
flyway.database.password=${server.database.password}
Expand All @@ -558,6 +594,10 @@ client.projectEditor.isRestricted.default=false

client.roles.crossProjectLoaderRole=ROLE_ACAS-CROSS-PROJECT-LOADER

# List of project codes to filter out and hide from ACAS
# e.g. server.projects.filterList = ["SomeProject"]
server.projects.filterList = []

# For whether protocols and experiments should have sequential user defined corpName labels
client.entity.saveInitialsCorpName=false

Expand All @@ -580,5 +620,13 @@ client.compoundInventory.daughterVials.strictMatchPhysicalState=false
# Whether to save location as a codeValue or as a full location interaction
client.compoundInventory.saveLocationAsCodeValue=true

# Allows the override of the words "Experiment" and "Protocol" throughout the ACAS UI
# These configs should NOT be set to the same value as this would break some functionality
# of data loaders.
# The values are often pluralized by putting an "s" at the end, so whatever values are used
# should be able to be pluralized with an "s" appended to them.
client.protocol.label=Protocol
client.experiment.label=Experiment

#config for whether SOLR should be updated when things are saved/updated
client.solr.updateSolrForThings=false
2 changes: 1 addition & 1 deletion conf/docker/acas/environment/acas.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ACAS_DB_NAME=acas
ACAS_SCHEMA=acas
ACAS_USERNAME=acas
ACAS_PASSWORD=acas
ACAS_FLYWAY_LOCATION=com.labsynch.labseer.db.migration.postgres,db/migration/postgres
ACAS_FLYWAY_LOCATION=com.labsynch.labseer.db.migration.postgres,db/migration/postgres,db/migration/indigo/postgres
1 change: 0 additions & 1 deletion conf/docker/roo/environment/roo.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ DATABASE_DRIVER=org.postgresql.Driver
DATABASE_URL=jdbc:postgresql://db:5432/${ACAS_DB_NAME}
VALIDATION_QUERY=select version()
CATALINA_OPTS="-Xms512M -Xmx1536M -XX:MaxPermSize=512m"
ACAS_FLYWAY_LOCATION=com.labsynch.labseer.db.migration.postgres,db/migration/postgres

17 changes: 4 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
- logs:/home/runner/logs
command: ["bin/acas.sh", "run", "rservices"]
db:
image: mcneilco/acas-postgres:1.0-bingo
image: mcneilco/acas-postgres:1.1-bingo
restart: always
volumes:
- dbstore:/var/lib/postgresql/data
Expand All @@ -56,11 +56,10 @@ services:
- ./conf/docker/db/environment/db.env
- ./conf/docker/acas/environment/acas.env
- ./conf/docker/cmpdreg/environment/cmpdreg.env
- ./conf/docker/seurat/environment/seurat.env
ports:
- "5432:5432"
tomcat:
image: mcneilco/tomcat-maven:1.0-openjdk8
image: mcneilco/tomcat-maven:1.2-openjdk8
restart: always
depends_on:
- db
Expand All @@ -69,12 +68,12 @@ services:
- "8000:8000"
environment:
- ACAS_HOME=/home/runner/build
- CATALINA_OPTS=-Xms512M -Xmx1024M -XX:MaxPermSize=512m
- CATALINA_OPTS=-Xms512M -Xmx1024M -XX:MaxPermSize=512m -Dlisten.address=$${TOMCAT_LISTEN_ADDRESS}
- JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
- TOMCAT_LISTEN_ADDRESS=0.0.0.0
volumes_from:
- roo
- acas
- cmpdreg
env_file:
- ./conf/docker/acas/environment/acas.env
- ./conf/docker/roo/environment/roo.env
Expand All @@ -85,14 +84,6 @@ services:
volumes:
- /usr/local/tomcat/webapps/acas
command: /bin/true
cmpdreg:
image: mcneilco/acas-cmpdreg-roo-server-oss:${ACAS_TAG}
volumes:
- /usr/local/tomcat/webapps/cmpdreg
# Add chemaxon license files here
# - ./chemaxon/licenses/marvin4js-license.cxl:/usr/local/tomcat/webapps/ROOT/marvin4js-license.cxl
# - ./chemaxon/licenses/license.cxl:/root/.chemaxon/license.cxl
command: /bin/true
volumes:
dbstore:
filestore:
Expand Down
7 changes: 7 additions & 0 deletions docker_bob_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
curl localhost:3001/api/systemTest/getOrCreateACASBob
curl localhost:3001/api/systemTest/getOrCreateGlobalProject
curl localhost:3001/api/systemTest/getOrCreateGlobalProjectRole
curl localhost:3001/api/systemTest/giveBobRoles
curl localhost:3001/api/systemTest/getOrCreateCmpdRegBob
curl localhost:3001/api/systemTest/syncRoles
#curl localhost:3001/api/systemTest/getOrCreateCmpds
7 changes: 5 additions & 2 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ taskConfigs =
command: 'npm'
args: [ 'install' ]
options: _.extend _.clone(globalExecuteOptions), cwd: build
src: [
build + '/package.json'
]
,
taskName: "prepare_config_files"
command: 'node'
Expand Down Expand Up @@ -296,7 +299,7 @@ taskConfigs =
renameFunction: getRPath
,
taskName: "python"
src: getGlob('modules/**/src/server/python/**')
src: getGlob('modules/**/src/server/python/**', '!modules/**/src/server/python/**/venv/**')
dest: build + '/src/python'
options: _.extend _.clone(globalCopyOptions), {}
renameFunction: getPythonPath
Expand Down Expand Up @@ -397,7 +400,7 @@ createExecuteTask = (options) =>
return
command.on 'exit', (code) ->
cb code
unless watch == false
unless watch == false || !options.src?
watchTaskName = "watch:#{taskName}"
watchOptions = watch?.options ? {}
gulp.task watchTaskName, ->
Expand Down
Loading

0 comments on commit e1bc3ec

Please sign in to comment.