-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from usnistgov/integration2
oar-metadata version 2: python 3 support for re-engineered MIDAS
- Loading branch information
Showing
142 changed files
with
8,518 additions
and
1,981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,32 @@ | ||
FROM oar-metadata/jqfromsrc:latest | ||
|
||
RUN apt-get update && apt-get install -y python python-pip python-dev unzip \ | ||
uwsgi uwsgi-plugin-python python-yaml | ||
RUN pip install 'pip==20.3.4' 'setuptools==44.0.0' | ||
RUN pip install json-spec jsonmerge==1.3.0 jsonschema==2.6.0 requests pynoid \ | ||
pytest==4.6.5 filelock crossrefapi | ||
RUN apt-get update && apt-get install -y unzip uwsgi uwsgi-src \ | ||
uuid-dev libcap-dev libpcre3-dev python3-distutils | ||
RUN PYTHON=python3.8 uwsgi --build-plugin "/usr/src/uwsgi/plugins/python python38" && \ | ||
mv python38_plugin.so /usr/lib/uwsgi/plugins/python38_plugin.so && \ | ||
chmod 644 /usr/lib/uwsgi/plugins/python38_plugin.so | ||
|
||
RUN update-alternatives --install /usr/lib/uwsgi/plugins/python3_plugin.so \ | ||
python_plugin.so /usr/lib/uwsgi/plugins/python38_plugin.so 1 | ||
|
||
RUN python -m pip install setuptools --upgrade | ||
RUN python -m pip install json-spec jsonschema==2.4.0 requests \ | ||
pytest==4.6.5 filelock crossrefapi pyyaml | ||
RUN python -m pip install --no-dependencies jsonmerge==1.3.0 | ||
|
||
WORKDIR /root | ||
|
||
RUN curl -L -o ejsonschema.zip \ | ||
https://github.com/usnistgov/ejsonschema/archive/master.zip && \ | ||
unzip ejsonschema.zip && \ | ||
cd ejsonschema-master && \ | ||
python setup.py install | ||
python setup.py install --install-purelib=/usr/local/lib/python3.8/dist-packages | ||
|
||
RUN curl -L -o pynoid.zip \ | ||
https://github.com/RayPlante/pynoid/archive/master.zip && \ | ||
unzip pynoid.zip && \ | ||
cd pynoid-master && \ | ||
python setup.py install --install-purelib=/usr/local/lib/python3.8/dist-packages | ||
|
||
CMD ["bash"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
FROM mongo:4.2 | ||
# This provides the base support for Python 3.8 and MongoDB 4.4 | ||
|
||
FROM mongo:4.4 | ||
# VOLUME /data | ||
MAINTAINER Ray Plante <[email protected]> | ||
COPY mongod.conf /etc/mongod.conf | ||
COPY mongod_ctl.sh /usr/local/bin | ||
|
||
RUN sed -e '/jessie-updates/ s/^deb/#deb/' /etc/apt/sources.list \ | ||
> /tmp/sources.list && mv /tmp/sources.list /etc/apt/sources.list | ||
RUN apt-get update && apt-get install -y python python-pip python-dev | ||
RUN pip install pymongo | ||
RUN apt-get update && apt-get install -y ca-certificates locales python3.8 python3-pip python3.8-dev | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1; \ | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1; \ | ||
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 | ||
RUN locale-gen en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
RUN python -m pip install pymongo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://www.nist.gov/od/dm/nerdm-schema/v0.6/Component#", | ||
"$ref": "https://www.nist.gov/od/dm/nerdm-schema/v0.6#/definitions/Component" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://www.nist.gov/od/dm/nerdm-schema/v0.1/DataFile#", | ||
"$ref": "https://www.nist.gov/od/dm/nerdm-schema/v0.1#/definitions/Component" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
This directory contains annotated schemas used to merge NERDm | ||
documents. Specifically, it contains schemas for the **pdp0** | ||
conventions for merging metadata annotations with the base metadata as | ||
done in the PDP implementation of SIP publishing. In the PDP | ||
implementation, annotations are used to hold metadata values fixed by | ||
the convention, preventing SIP-providing clients from updating them. | ||
|
||
Because of limitations of jsonmerge (including its lack of awareness | ||
of ejsonschema conventions), the core NERDm schema is represented by | ||
`nerdm-amalgamated-schema.json` which folds different resource and | ||
and component types together. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://www.nist.gov/od/dm/nerdm-schema/v0.6/Resource#", | ||
"$ref": "https://www.nist.gov/od/dm/nerdm-schema/v0.6#/definitions/Resource" | ||
} |
Oops, something went wrong.