Skip to content

Commit 8f80467

Browse files
committed
Resolve #16
1 parent bae6b00 commit 8f80467

File tree

13 files changed

+145
-154
lines changed

13 files changed

+145
-154
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ jenkins.cfg
2222
parts
2323
support
2424
var
25+
venv

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ eggs
1717
parts
1818
var
1919
ops.cfg
20+
venv

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,28 @@ curl --http1.1 --verbose --request POST \
5252
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`.
5353

5454

55+
## 🔧 Developing
56+
57+
**👉 Note:** Plone 5.2.2 (used here) is not compatible with any Python newer than 3.8. Stick with 3.8.
58+
59+
Do the following:
60+
```console
61+
python3.8 -m venv venv
62+
venv/bin/pip install --upgrade pip build wheel zc.buildout setuptools==42.0.2 numpy==1.19.3
63+
venv/bin/buildout -c dev.cfg
64+
```
65+
66+
You can then run: `bin/zope-debug fg`.
67+
68+
5569
## 🚀 Deploying the Cancer Data Expo
5670

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

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

6478

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

93-
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:
107+
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:
94108

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

bootstrap.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,11 @@
8585
except ImportError:
8686
from urllib2 import urlopen
8787

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

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

119-
#ez['use_setuptools'](**setup_args)
117+
ez['use_setuptools'](**setup_args)
120118
import setuptools
121119
import pkg_resources
122120

etc/versions/eggs.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
# Versions of the Python components that go into the Cancer Data Expo.
55

66
[versions]
7-
setuptools =
8-
9-
# For edrn.rdf's LabCAS feature
10-
# coverage = 3.6
11-
# Pillow = 6.2.2
12-
# coverage = 4.1
7+
# No idea why this is needed—not just the newer version (buildout issue) but paste in the first place!
8+
Pillow = 9.2.0
139

10+
# paste = 3.5.1
11+
# plone.recipe.zope2instance = 6.11.0
12+
# python-dotenv = 0.20.0
13+
# six = 1.16.0
1414

1515
[plone-policies]
1616
backports =

etc/versions/known-good-versions.cfg

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,111 @@ suds2 = 0.7.1
115115
# Required by:
116116
# unittest2==1.1.0
117117
traceback2 = 1.4.0
118+
119+
# Added by buildout at 2022-07-06 09:13:55.535085
120+
biothings-client = 0.2.6
121+
collective.recipe.backup = 4.2.0
122+
isort = 5.10.1
123+
modernize = 0.8.0
124+
mr.scripty = 1.0
125+
unittest2 = 1.1.0
126+
127+
# Required by:
128+
# unittest2==1.1.0
129+
argparse = 1.4.0
130+
131+
# Required by:
132+
# edrn.summarizer==0.0.8
133+
biopython = 1.79
134+
135+
# Required by:
136+
# edrn.rdf==1.3.8
137+
# edrn.summarizer==0.0.8
138+
collective.autopermission = 1.0b2
139+
140+
# Required by:
141+
# modernize==0.8.0
142+
fissix = 21.11.13
143+
144+
# Required by:
145+
# rdflib==4.2.2
146+
isodate = 0.6.1
147+
148+
# Required by:
149+
# edrn.summarizer==0.0.8
150+
jsonlib-python3 = 1.6.1
151+
152+
# Required by:
153+
# traceback2==1.4.0
154+
linecache2 = 1.0.0
155+
156+
# Required by:
157+
# edrn.summarizer==0.0.8
158+
mygene = 3.2.2
159+
160+
# Required by:
161+
# edrn.rdf==1.3.8
162+
pysolr = 3.9.0
163+
164+
# Required by:
165+
# edrn.rdf==1.3.8
166+
# edrn.summarizer==0.0.8
167+
suds2 = 0.7.1
168+
169+
# Required by:
170+
# unittest2==1.1.0
171+
traceback2 = 1.4.0
172+
173+
# Added by buildout at 2022-07-06 09:46:04.546661
174+
biothings-client = 0.2.3
175+
collective.recipe.backup = 4.1.1
176+
isort = 5.7.0
177+
modernize = 0.8.0
178+
mr.scripty = 1.0
179+
unittest2 = 1.1.0
180+
181+
# Required by:
182+
# unittest2==1.1.0
183+
argparse = 1.4.0
184+
185+
# Required by:
186+
# edrn.summarizer==0.0.8
187+
biopython = 1.79
188+
189+
# Required by:
190+
# edrn.rdf==1.3.8
191+
# edrn.summarizer==0.0.8
192+
collective.autopermission = 1.0b2
193+
194+
# Required by:
195+
# modernize==0.8.0
196+
fissix = 20.8.0
197+
198+
# Required by:
199+
# rdflib==4.2.2
200+
isodate = 0.6.0
201+
202+
# Required by:
203+
# edrn.summarizer==0.0.8
204+
jsonlib-python3 = 1.6.1
205+
206+
# Required by:
207+
# traceback2==1.4.0
208+
linecache2 = 1.0.0
209+
210+
# Required by:
211+
# edrn.summarizer==0.0.8
212+
mygene = 3.1.0
213+
214+
# Required by:
215+
# edrn.rdf==1.3.8
216+
pysolr = 3.9.0
217+
218+
# Required by:
219+
# edrn.rdf==1.3.8
220+
# edrn.summarizer==0.0.8
221+
suds2 = 0.7.1
222+
223+
# Required by:
224+
# unittest2==1.1.0
225+
traceback2 = 1.4.0

src/edrn.rdf/buildout.cfg

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/edrn.rdf/edrn/rdf/labcascollectionrdfgenerator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
_organPredicateURI = URIRef('urn:edrn:predicates:organ')
2424
_protocolPredicateURI = URIRef('urn:edrn:predicates:protocol')
2525
_collaborativeGroupPredicateURI = URIRef('urn:edrn:predicates:collaborativeGroup')
26+
_discplinePredicateURI = URIRef('urn:edrn:predicates:discipline')
27+
_dataCategoryPredicateURI = URIRef('urn:edrn:predicates:dataCategory')
2628
_cardinalityPredicateURI = URIRef('urn:edrn:predicates:cardinality')
2729
_ownerPrincipal = URIRef('urn:edrn:predicates:ownerPrincipal')
2830
_qaState = URIRef('urn:edrn:predicates:qaState')
@@ -115,6 +117,10 @@ def generateGraph(self):
115117
group = _inconsistentCollaborativeGroupNaming.get(group)
116118
if group is not None:
117119
graph.add((subjectURI, _collaborativeGroupPredicateURI, Literal(group)))
120+
for discipline in i.get('Discipline', []):
121+
graph.add((subjectURI, _discplinePredicateURI, Literal(discipline)))
122+
for category in i.get('DataCategory', []):
123+
graph.add((subjectURI, _dataCategoryPredicateURI, Literal(category)))
118124
for owner in i.get('OwnerPrincipal', []):
119125
# Work around https://github.com/EDRN/EDRN-metadata/issues/63
120126
if owner.startswith('OwnerPrincipal='):

src/edrn.rdf/travis.cfg

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/edrn.summarizer/buildout.cfg

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)