Skip to content

Commit

Permalink
Resolve #16
Browse files Browse the repository at this point in the history
  • Loading branch information
nutjob4life committed Jul 6, 2022
1 parent bae6b00 commit 8f80467
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 154 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ jenkins.cfg
parts
support
var
venv
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ eggs
parts
var
ops.cfg
venv
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,28 @@ curl --http1.1 --verbose --request POST \
The answer will then be in the result element of the response element of the envelope element of the XML document in `/tmp/result.xml`.


## 🔧 Developing

**👉 Note:** Plone 5.2.2 (used here) is not compatible with any Python newer than 3.8. Stick with 3.8.

Do the following:
```console
python3.8 -m venv venv
venv/bin/pip install --upgrade pip build wheel zc.buildout setuptools==42.0.2 numpy==1.19.3
venv/bin/buildout -c dev.cfg
```

You can then run: `bin/zope-debug fg`.


## 🚀 Deploying the Cancer Data Expo

Here are the environment variables you'll need to set (substituting values between development and production):

- `EDRN_CANCERDATAEXPO_DATA` — set to a path to contain blobstorage, filestorage, and logs.
- `EDRN_CANCERDATAEXPO_PORT` — set to a free port number
- `EDRN_CANCERDATAEXPO_VERSION` — set to a version number of `latest`
- `EDRN_IMAGE_OWNER` — set to `nutjob4life` or leave it blank to use your local Docker containers
- `EDRN_CANCERDATAEXPO_VERSION` — set to a version number or `latest`
- `EDRN_IMAGE_OWNER` — set to `nutjob4life` or leave it blank to use your local Docker images


### 🧱 Building the Image
Expand Down Expand Up @@ -90,7 +104,7 @@ To run the CancerDataExpo for the **first time**, create empty directories to ho
--project-name cancerdataexpo \
up --detach

The `docker-compose.yaml` assumes that `EDRN_CANCERDATAEXPO_DATA` is `usr/local/labcas/cancerdataexpo/docker-data` which is appropriate for `edrn-docker.jpl.nasa.gov` where this normally runs, and that `EDRN_CANCERDATAEXPO_PORT` is 2131, and that `EDRN_CANCERDATAEXPO_VERSION` is `latest`, so you can simply say:
The `docker-compose.yaml` assumes that `EDRN_CANCERDATAEXPO_DATA` is `/usr/local/labcas/cancerdataexpo/docker-data` which is appropriate for `edrn-docker.jpl.nasa.gov` where this normally runs, and that `EDRN_CANCERDATAEXPO_PORT` is 2131, and that `EDRN_CANCERDATAEXPO_VERSION` is `latest`, so you can simply say:

docker-compose --project-name cancerdataexpo up --detach

Expand Down
14 changes: 6 additions & 8 deletions bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,11 @@
except ImportError:
from urllib2 import urlopen

# Ez_setup is deprecated and automatically uses specific setuptools version
# Will temporarily comment out this setup and manually install setuptools
#ez = {}
#if os.path.exists('ez_setup.py'):
# exec(open('ez_setup.py').read(), ez)
#else:
# exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)
ez = {}
if os.path.exists('ez_setup.py'):
exec(open('ez_setup.py').read(), ez)
else:
exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)

if not options.allow_site_packages:
# ez_setup imports site, which adds site packages
Expand All @@ -116,7 +114,7 @@
if options.setuptools_to_dir is not None:
setup_args['to_dir'] = options.setuptools_to_dir

#ez['use_setuptools'](**setup_args)
ez['use_setuptools'](**setup_args)
import setuptools
import pkg_resources

Expand Down
12 changes: 6 additions & 6 deletions etc/versions/eggs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# Versions of the Python components that go into the Cancer Data Expo.

[versions]
setuptools =

# For edrn.rdf's LabCAS feature
# coverage = 3.6
# Pillow = 6.2.2
# coverage = 4.1
# No idea why this is needed—not just the newer version (buildout issue) but paste in the first place!
Pillow = 9.2.0

# paste = 3.5.1
# plone.recipe.zope2instance = 6.11.0
# python-dotenv = 0.20.0
# six = 1.16.0

[plone-policies]
backports =
Expand Down
108 changes: 108 additions & 0 deletions etc/versions/known-good-versions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,111 @@ suds2 = 0.7.1
# Required by:
# unittest2==1.1.0
traceback2 = 1.4.0

# Added by buildout at 2022-07-06 09:13:55.535085
biothings-client = 0.2.6
collective.recipe.backup = 4.2.0
isort = 5.10.1
modernize = 0.8.0
mr.scripty = 1.0
unittest2 = 1.1.0

# Required by:
# unittest2==1.1.0
argparse = 1.4.0

# Required by:
# edrn.summarizer==0.0.8
biopython = 1.79

# Required by:
# edrn.rdf==1.3.8
# edrn.summarizer==0.0.8
collective.autopermission = 1.0b2

# Required by:
# modernize==0.8.0
fissix = 21.11.13

# Required by:
# rdflib==4.2.2
isodate = 0.6.1

# Required by:
# edrn.summarizer==0.0.8
jsonlib-python3 = 1.6.1

# Required by:
# traceback2==1.4.0
linecache2 = 1.0.0

# Required by:
# edrn.summarizer==0.0.8
mygene = 3.2.2

# Required by:
# edrn.rdf==1.3.8
pysolr = 3.9.0

# Required by:
# edrn.rdf==1.3.8
# edrn.summarizer==0.0.8
suds2 = 0.7.1

# Required by:
# unittest2==1.1.0
traceback2 = 1.4.0

# Added by buildout at 2022-07-06 09:46:04.546661
biothings-client = 0.2.3
collective.recipe.backup = 4.1.1
isort = 5.7.0
modernize = 0.8.0
mr.scripty = 1.0
unittest2 = 1.1.0

# Required by:
# unittest2==1.1.0
argparse = 1.4.0

# Required by:
# edrn.summarizer==0.0.8
biopython = 1.79

# Required by:
# edrn.rdf==1.3.8
# edrn.summarizer==0.0.8
collective.autopermission = 1.0b2

# Required by:
# modernize==0.8.0
fissix = 20.8.0

# Required by:
# rdflib==4.2.2
isodate = 0.6.0

# Required by:
# edrn.summarizer==0.0.8
jsonlib-python3 = 1.6.1

# Required by:
# traceback2==1.4.0
linecache2 = 1.0.0

# Required by:
# edrn.summarizer==0.0.8
mygene = 3.1.0

# Required by:
# edrn.rdf==1.3.8
pysolr = 3.9.0

# Required by:
# edrn.rdf==1.3.8
# edrn.summarizer==0.0.8
suds2 = 0.7.1

# Required by:
# unittest2==1.1.0
traceback2 = 1.4.0
9 changes: 0 additions & 9 deletions src/edrn.rdf/buildout.cfg

This file was deleted.

6 changes: 6 additions & 0 deletions src/edrn.rdf/edrn/rdf/labcascollectionrdfgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
_organPredicateURI = URIRef('urn:edrn:predicates:organ')
_protocolPredicateURI = URIRef('urn:edrn:predicates:protocol')
_collaborativeGroupPredicateURI = URIRef('urn:edrn:predicates:collaborativeGroup')
_discplinePredicateURI = URIRef('urn:edrn:predicates:discipline')
_dataCategoryPredicateURI = URIRef('urn:edrn:predicates:dataCategory')
_cardinalityPredicateURI = URIRef('urn:edrn:predicates:cardinality')
_ownerPrincipal = URIRef('urn:edrn:predicates:ownerPrincipal')
_qaState = URIRef('urn:edrn:predicates:qaState')
Expand Down Expand Up @@ -115,6 +117,10 @@ def generateGraph(self):
group = _inconsistentCollaborativeGroupNaming.get(group)
if group is not None:
graph.add((subjectURI, _collaborativeGroupPredicateURI, Literal(group)))
for discipline in i.get('Discipline', []):
graph.add((subjectURI, _discplinePredicateURI, Literal(discipline)))
for category in i.get('DataCategory', []):
graph.add((subjectURI, _dataCategoryPredicateURI, Literal(category)))
for owner in i.get('OwnerPrincipal', []):
# Work around https://github.com/EDRN/EDRN-metadata/issues/63
if owner.startswith('OwnerPrincipal='):
Expand Down
31 changes: 0 additions & 31 deletions src/edrn.rdf/travis.cfg

This file was deleted.

26 changes: 0 additions & 26 deletions src/edrn.summarizer/buildout.cfg

This file was deleted.

31 changes: 0 additions & 31 deletions src/edrn.summarizer/travis.cfg

This file was deleted.

10 changes: 0 additions & 10 deletions src/edrndmcc.appserver/buildout.cfg

This file was deleted.

30 changes: 0 additions & 30 deletions src/edrndmcc.appserver/travis.cfg

This file was deleted.

0 comments on commit 8f80467

Please sign in to comment.