chore(build): try to publish to npm (#3675)

This commit is contained in:
Alireza authored and GitHub committed 2023-09-25 23:13:43 -04:00
1 parent 10ca35d5f4
commit c86b129f58
19 files changed
+236 -143

No files matched your search

@@ -23,7 +23,7 @@
# Stage 1: Build the application
FROM node:16.15.0-slim as builder
FROM node:18.16.1-slim as builder
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
@@ -23,7 +23,7 @@
# Stage 1: Build the application
FROM node:16.15.0-slim as builder
FROM node:18.16.1-slim as builder
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
@@ -11,7 +11,7 @@ describe('OHIF Context Menu', function () {
it('checks context menu customization', function () {
// Add length measurement
cy.addLengthMeasurement();
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').click();
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').as('yesBtn').click();
cy.get('[data-cy="measurement-item"]').click();
const [x1, y1] = [150, 100];
@@ -109,14 +109,14 @@ describe('OHIF Cornerstone Toolbar', () => {
it('checks if Length annotation can be added to viewport and shows up in the measurements panel', () => {
//Click on button and verify if icon is active on toolbar
cy.addLengthMeasurement();
cy.get('[data-cy="viewport-notification"]').should('exist');
cy.get('[data-cy="viewport-notification"]').should('be.visible');
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').click();
cy.get('[data-cy="viewport-notification"]').as('notif').should('exist');
cy.get('[data-cy="viewport-notification"]').as('notif').should('be.visible');
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').as('yesBtn').click();
//Verify the measurement exists in the table
cy.get('@measurementsPanel').should('be.visible');
cy.get('[data-cy="measurement-item"]').its('length').should('be.at.least', 1);
cy.get('[data-cy="measurement-item"]').as('measure').its('length').should('be.at.least', 1);
});
/*it('checks if angle annotation can be added on viewport without causing any errors', () => {
@@ -26,7 +26,7 @@ describe('OHIF Measurement Panel', function () {
cy.get('[data-cy="viewport-notification"]').as('viewportNotification').should('exist');
cy.get('[data-cy="viewport-notification"]').as('viewportNotification').should('be.visible');
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').as('promptBeginTrackingYesBtn').click();
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').as('yesBtn').click();
cy.get('[data-cy="measurement-item"]').as('measurementItem').click();
@@ -43,8 +43,7 @@ describe('OHIF Measurement Panel', function () {
it('checks if image would jump when clicked on a measurement item', function () {
// Add length measurement
cy.addLengthMeasurement();
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').as('promptBeginTrackingYesBtn');
cy.get('@promptBeginTrackingYesBtn').click();
cy.get('[data-cy="prompt-begin-tracking-yes-btn"]').as('yesBtn').click();
cy.scrollToIndex(13);
+5 -6
View File
@@ -145,7 +145,7 @@ Cypress.Commands.add('drag', { prevSubject: 'element' }, (...args) =>
*/
Cypress.Commands.add('addLine', (viewport, firstClick, secondClick) => {
const performClick = (alias, x, y) => {
cy.get(alias).click(x, y, { force: true, multiple: true }).wait(250);
cy.get(alias).as(`axu-${alias}`).click(x, y, { force: true, multiple: true }).wait(250);
};
cy.get(viewport).as('viewportAlias');
@@ -187,11 +187,10 @@ Cypress.Commands.add('addAngle', (viewport, firstClick, secondClick, thirdClick)
});
Cypress.Commands.add('expectMinimumThumbnails', (seriesToWait = 1) => {
cy.get('[data-cy="study-browser-thumbnail"]', { timeout: 50000 }).as('thumbnails');
cy.get('@thumbnails').should($itemList => {
expect($itemList.length).to.be.gte(seriesToWait);
});
cy.get('[data-cy="study-browser-thumbnail"]', { timeout: 50000 }).should(
'have.length.gte',
seriesToWait
);
});
//Command to wait DICOM image to load into the viewport
+1 -1
View File
@@ -19,7 +19,7 @@
[build.environment]
# If 'production', `yarn install` does not install devDependencies
NODE_ENV = "development"
NODE_VERSION = "16.14.0"
NODE_VERSION = "18.16.1"
YARN_VERSION = "1.22.5"
RUBY_VERSION = "2.6.2"
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"
@@ -8,6 +8,14 @@ sidebar_label: DisplaySet Service
## Overview
`DisplaySetService` handles converting the `instanceMetadata` into `DisplaySet` that `OHIF` uses for the visualization. `DisplaySetService` gets initialized at service startup time, but is then cleared in the `Mode.jsx`. During the initialization `SOPClassHandlerIds` of the `modes` gets registered with the `DisplaySetService`.
:::tip
DisplaySet is a general set of entities and contains links to bunch of displayable objects (images, etc.) Some series might get split up into different displaySets e.g., MG might have mixed views in a single series, but users might want to have separate LCC, RCC, etc. for hanging protocol usage. A viewport renders a display set into a displayable object.
imageSet is a particular implementation of image displays.
:::
> Based on the instanceMetadata's `SOPClassHandlerId`, the correct module from the registered extensions is found by `OHIF` and its `getDisplaySetsFromSeries` runs to create a DisplaySet for the Series. Note
that this is an ordered operation, and consumes the instances as it proceeds, with the first registered
handlers being able to consume instances first.
@@ -17,9 +17,9 @@ We maintain the following non-ui Services:
- [DicomMetadata Store](./../data/DicomMetadataStore.md)
- [DisplaySet Service](./../data/DisplaySetService.md)
- [Hanging Protocol Service](../data/HangingProtocolService.md)
- [Toolbar Service](../data/ToolBarService.md)
- [Toolbar Service](./ToolbarService.md)
- [Measurement Service](../data/MeasurementService.md)
- [Customization Service](../data/customization-service.md)
- [Customization Service](./../ui/customization-service.md)
- [State Sync Service](../data/StateSyncService.md)
- [Panel Service](../data/PanelService.md)
+13
View File
@@ -74,6 +74,19 @@ module.exports = {
// },
themes: ['@docusaurus/theme-live-codeblock'],
plugins: [
() => ({
name: 'resolve-react',
configureWebpack() {
return {
resolve: {
alias: {
// assuming root node_modules is up from "./packages/<your-docusaurus>
react: path.resolve('../../node_modules/react'),
},
},
};
},
}),
path.resolve(__dirname, './pluginOHIFWebpackConfig.js'),
'plugin-image-zoom', // 3rd party plugin for image click to pop
[
+1 -1
View File
@@ -16,7 +16,7 @@
[build.environment]
# If 'production', `yarn install` does not install devDependencies
NODE_ENV = "development"
NODE_VERSION = "16.14.0"
NODE_VERSION = "18.16.1"
YARN_VERSION = "1.22.5"
RUBY_VERSION = "2.6.2"
YARN_FLAGS = "--no-ignore-optional --pure-lockfile"