Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Dicom Web Assetstore Plugin to Girder 5 #1800

Draft
wants to merge 5 commits into
base: girder-5
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .circleci/release_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ pip wheel . --no-deps -w ~/wheels
cd "$ROOTPATH/sources/dicom"
cp "$ROOTPATH/README.rst" .
cp "$ROOTPATH/LICENSE" .
# TODO build DICOMweb plugin client code when converted
# Build the client plugin code
pushd "$ROOTPATH/girder/sources/dicom/large_image_source_dicom/web_client/"
npm ci
npm run build
popd
python setup.py sdist
pip wheel . --no-deps -w ~/wheels
cd "$ROOTPATH/sources/dummy"
Expand Down
2 changes: 2 additions & 0 deletions sources/dicom/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
prune large_image_source_dicom/web_client
recursive-include large_image_source_dicom/web_client/dist/ *
12 changes: 10 additions & 2 deletions sources/dicom/large_image_source_dicom/girder_plugin.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
from girder.plugin import GirderPlugin
from pathlib import Path

from girder.plugin import GirderPlugin, registerPluginStaticContent

from . import assetstore


class DICOMwebPlugin(GirderPlugin):
DISPLAY_NAME = 'DICOMweb Plugin'
CLIENT_SOURCE_PATH = 'web_client'

def load(self, info):
registerPluginStaticContent(
plugin='dicomweb',
css=[],
js=['/girder-plugin-dicomweb.umd.js'],
staticDir=Path(__file__).parent / 'web_client' / 'dist',
tree=info['serverRoot'],
)
assetstore.load(info)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { AssetstoreType } from '@girder/core/constants';
const { AssetstoreType } = girder.constants;

AssetstoreType.DICOMWEB = 'dicomweb';
7 changes: 7 additions & 0 deletions sources/dicom/large_image_source_dicom/web_client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as views from './views';
import * as constants from './constants.js';

export {
views,
constants
};
7 changes: 7 additions & 0 deletions sources/dicom/large_image_source_dicom/web_client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ import './views/DICOMwebImportView';
import './views/AssetstoresView';
import './views/EditAssetstoreWidget';
import './views/NewAssetstoreWidget';

// expose symbols under girder.plugins
import * as dicomWeb from './index';

const { registerPluginNamespace } = girder.pluginUtils;

registerPluginNamespace('dicomweb', dicomWeb);
Loading
Loading