Skip to content

Commit

Permalink
Merge pull request #97 from ImagingDataCommons/update/slim-lts
Browse files Browse the repository at this point in the history
Update SLIM with LTS
  • Loading branch information
igoroctaviano committed Jul 23, 2024
2 parents 8afabf0 + 5e4a0d6 commit a13e553
Show file tree
Hide file tree
Showing 30 changed files with 3,072 additions and 186 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy-to-firebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: slim/deploy-to-firebase

on:
pull_request:
branches: [master]
push:
branches: [master]

jobs:
deploy-firebase:
name: "Deploy to Firebase"
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.8.1

- name: Install Yarn
run: sudo npm i -g yarn

- name: Install dependencies
run: yarn

- name: Build
run: REACT_APP_CONFIG=preview PUBLIC_URL=/ yarn build

- name: Deploy
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_SLIM }}"
projectId: idc-external-006
33 changes: 33 additions & 0 deletions .github/workflows/deploy-to-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: slim/deploy-to-github-pages

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
deploy-to-github-pages:
name: "Deploy to GitHub Pages"
runs-on: ubuntu-latest
steps:
- name: Checkout to repository
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.8.1

- name: Install Yarn
run: sudo npm i -g yarn

- name: Install dependencies
run: yarn

- name: Build and deploy to GitHub Pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn deploy -- -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: slim/release

on:
push:
branches:
- master

jobs:
release:
name: "Bump version and cut a release"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
ref: master
persist-credentials: false

- name: Setup node
uses: actions/[email protected]
with:
node-version: 20.8.1

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Zip build
run: zip -r build.zip build

- name: Bump version and cut a release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ${{ vars.RELEASE_GIT_AUTHOR_NAME }}
GIT_AUTHOR_EMAIL: ${{ vars.RELEASE_GIT_AUTHOR_EMAIL }}
GIT_COMMITTER_NAME: ${{ vars.RELEASE_GIT_COMMITTER_NAME }}
GIT_COMMITTER_EMAIL: ${{ vars.RELEASE_GIT_COMMITTER_EMAIL }}
run: npx semantic-release --branches master
32 changes: 32 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: slim/build-and-run-unit-tests

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-and-test:
name: "Build and run unit tests"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20.8.1

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Lint
run: yarn lint

- name: Test
run: yarn test
43 changes: 43 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "docs/CHANGELOG.md"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": [
"docs",
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "build.zip",
"label": "slim-${nextRelease.gitTag}.zip"
},
{
"path": "docs/CHANGELOG.md",
"label": "${nextRelease.gitTag}-CHANGELOG.md"
}
]
}
]
]
}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ RUN apt-get update && \
nginx && \
apt-get clean

RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
RUN curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
curl -sS https://deb.nodesource.com/setup_16.x | bash - && \
curl -sS https://deb.nodesource.com/setup_21.x | bash - && \
apt-get update && \
apt-get install -y --no-install-suggests --no-install-recommends \
nodejs \
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![DOI](https://zenodo.org/badge/335130719.svg)](https://zenodo.org/badge/latestdoi/335130719)
[![Build Status](https://github.com/imagingdatacommons/slim/actions/workflows/run_unit_tests.yml/badge.svg)](https://github.com/imagingdatacommons/slim/actions)
[![Build Status](https://github.com/imagingdatacommons/slim/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/imagingdatacommons/slim/actions)

# Slim: Interoperable slide microscopy viewer and annotation tool for imaging data science and computational pathology

Expand All @@ -11,7 +11,7 @@ It relies on [DICOMweb](https://www.dicomstandard.org/dicomweb/) RESTful service

### National Cancer Institute's Imaging Data Commons

*Slim* serves as the slide microscopy viewer of the [National Cancer Institute's Imaging Data Commons (IDC)](https://datacommons.cancer.gov/repository/imaging-data-commons).
*Slim* is used as the slide microscopy viewer by the [National Cancer Institute's Imaging Data Commons (IDC)](https://imaging.datacommons.cancer.gov).

<img src="docs/screenshots/IDC_CPTAC_C3L-00965-26.png" alt="IDC CPTAC C3L-00965-26" width="100%">

Expand All @@ -21,15 +21,10 @@ The IDC viewer uses the [Google Cloud Healthcare API](https://cloud.google.com/h

### Demo

Explore additional slide microscopy imaging data sets and advanced viewer features at [imagingdatacommons.github.io/slim](https://imagingdatacommons.github.io/slim/).
Below you will find links to the representative DICOM SM images opened in Slim viewer:

<img src="docs/screenshots/IDC_HTAN_HTA9_1_32.png" alt="IDC HTAN HTA9_1_32" width="100%">

The demo viewer uses an instance of the open-source [DCM4CHEE Archive](https://github.com/dcm4che/dcm4chee-arc-light) as DICOMweb server.
It includes brightfield and fluorescence microscopy images that were collected for different research projects, including [The Cancer Genome Atlas (TCGA)](https://www.cancer.gov/about-nci/organization/ccg/research/structural-genomics/tcga), the [Clinical Proteomic Tumor Analysis Consortium (CPTAC)](https://gdc.cancer.gov/about-gdc/contributed-genomic-data-cancer-research/clinical-proteomic-tumor-analysis-consortium-cptac), the [Human Tumor Atlas Network (HTAN)](https://www.cancer.gov/research/key-initiatives/moonshot-cancer-initiative/implementation/human-tumor-atlas)).
These images were originally stored in SVS-TIFF or OME-TIFF format and were subsequently converted into DICOM format for ingestion into the IDC.
In addition, the demo includes images that were collected for interoperability demonstrations at DICOM WG-26 Pathology Connectathons or Hackathons.
These images were directly stored in DICOM format and did not require conversion.
* H&E: https://viewer.imaging.datacommons.cancer.gov/slim/studies/2.25.211094631316408413440371843585977094852/series/1.3.6.1.4.1.5962.99.1.208792987.352384958.1640886332827.2.0
* multichannel fluorescence: https://viewer.imaging.datacommons.cancer.gov/slim/studies/2.25.93749216439228361118017742627453453196/series/1.3.6.1.4.1.5962.99.1.2344794501.795090168.1655907236229.4.0?state=1.2.826.0.1.3680043.10.511.3.79630386778396943986328353882008803

## Features

Expand Down
2 changes: 1 addition & 1 deletion craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module.exports = {
'@cornerstonejs/codec-charls/decodewasmjs': '@cornerstonejs/codec-charls/dist/charlswasm_decode.js',
'@cornerstonejs/codec-charls/decodewasm': '@cornerstonejs/codec-charls/dist/charlswasm_decode.wasm',
'@cornerstonejs/codec-openjpeg/decodewasmjs': '@cornerstonejs/codec-openjpeg/dist/openjpegwasm_decode.js',
'@cornerstonejs/codec-openjpeg/decodewasm': '@cornerstonejs/codec-openjpeg/dist/openjpegwasm_decode.wasm',
'@cornerstonejs/codec-openjpeg/decodewasm': '@cornerstonejs/codec-openjpeg/dist/openjpegwasm_decode.wasm'
}
return config
}
Expand Down
10 changes: 8 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.7'
version: "3.7"

volumes:
db_data: {}
Expand Down Expand Up @@ -62,9 +62,15 @@ services:
- 12575
env_file: docker-compose.env
environment:
# Used to set the initial and maximal Java heap size to avoid
# problems retrieving large WSI bulk data annotations.
#
# The default is "-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m"
# Reference: https://github.com/dcm4che-dockerfiles/dcm4chee-arc-psql
JBOSS_JAVA_SIZING: "-Xms64m -Xmx4096m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=4096m"
WILDFLY_CHOWN: /opt/wildfly/standalone /storage
WILDFLY_WAIT_FOR: ldap:389 db:5432
HTTP_PROXY_ADDRESS_FORWARDING: 'true'
HTTP_PROXY_ADDRESS_FORWARDING: "true"
ARCHIVE_HOST: localhost
depends_on:
- ldap
Expand Down
46 changes: 46 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## [0.31.3](https://github.com/ImagingDataCommons/slim/compare/v0.31.2...v0.31.3) (2024-05-09)


### Bug Fixes

* **README.md:** Update README.md to fix build status ([#210](https://github.com/ImagingDataCommons/slim/issues/210)) ([7574a93](https://github.com/ImagingDataCommons/slim/commit/7574a93b0c9a303202f135566328c69eb605cd69))

## [0.31.2](https://github.com/ImagingDataCommons/slim/compare/v0.31.1...v0.31.2) (2024-05-08)


### Bug Fixes

* **ROI:** Avoid removing highlighting of ROI after closing ROI info dialog and use double click to open it ([#197](https://github.com/ImagingDataCommons/slim/issues/197)) ([a76a79f](https://github.com/ImagingDataCommons/slim/commit/a76a79f46c09f876933e9a6d57b667d673f13e96))

## [0.31.1](https://github.com/ImagingDataCommons/slim/compare/v0.31.0...v0.31.1) (2024-05-08)


### Bug Fixes

* **.github:** Refactor workflows ([#205](https://github.com/ImagingDataCommons/slim/issues/205)) ([552f99f](https://github.com/ImagingDataCommons/slim/commit/552f99f3052c039801f0a6b86564445a3497cc26))

# [0.31.0](https://github.com/ImagingDataCommons/slim/compare/v0.30.0...v0.31.0) (2024-05-07)


### Bug Fixes

* **package.json:** Fix Inefficient Regular Expression Complexity in nth-check (vulnerability) ([#151](https://github.com/ImagingDataCommons/slim/issues/151)) ([4f42258](https://github.com/ImagingDataCommons/slim/commit/4f4225889cedb853c79db84bac8aee94f0b41715))
* security issues ([#179](https://github.com/ImagingDataCommons/slim/issues/179)) ([eb8ddc0](https://github.com/ImagingDataCommons/slim/commit/eb8ddc093427547e7e178973fc871c47fa18ed61))


### Features

* add secondary dicom server ([#188](https://github.com/ImagingDataCommons/slim/issues/188)) ([356009f](https://github.com/ImagingDataCommons/slim/commit/356009f6a86cd96bfa6c6b478adb46683fbdcd3d))

# [0.31.0](https://github.com/ImagingDataCommons/slim/compare/v0.30.0...v0.31.0) (2024-05-07)


### Bug Fixes

* **package.json:** Fix Inefficient Regular Expression Complexity in nth-check (vulnerability) ([#151](https://github.com/ImagingDataCommons/slim/issues/151)) ([4f42258](https://github.com/ImagingDataCommons/slim/commit/4f4225889cedb853c79db84bac8aee94f0b41715))
* security issues ([#179](https://github.com/ImagingDataCommons/slim/issues/179)) ([eb8ddc0](https://github.com/ImagingDataCommons/slim/commit/eb8ddc093427547e7e178973fc871c47fa18ed61))


### Features

* add secondary dicom server ([#188](https://github.com/ImagingDataCommons/slim/issues/188)) ([356009f](https://github.com/ImagingDataCommons/slim/commit/356009f6a86cd96bfa6c6b478adb46683fbdcd3d))
17 changes: 13 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"name": "slim",
"version": "0.14.1",
"version": "0.31.3",
"homepage": "https://github.com/imagingdatacommons/slim",
"private": true,
"author": "ImagingDataCommons",
"proxy": "http://localhost:8008",
"scripts": {
"start": "rm -rf ./node_modules/.cache/default-development && craco start",
"build": "craco build",
"build:firebase": "REACT_APP_CONFIG=gcp PUBLIC_URL=/ craco build",
"lint": "ts-standard --env jest 'src/**/*.{tsx,ts}'",
"fmt": "ts-standard --env jest 'src/**/*.{tsx,ts}' --fix",
"test": "ts-standard --env jest 'src/**/*.{tsx,ts}' && craco test --setupFiles ./src/setupTests.tsx --watchAll=false",
Expand Down Expand Up @@ -47,10 +50,10 @@
"classnames": "^2.2.6",
"copy-webpack-plugin": "^10.2.4",
"craco-less": "^2.0.0",
"dcmjs": "^0.19.1",
"dcmjs": "^0.29.8",
"detect-browser": "^5.2.1",
"dicom-microscopy-viewer": "^0.45.1",
"dicomweb-client": "^0.8.4",
"dicomweb-client": "^0.10.3",
"gh-pages": "^5.0.0",
"oidc-client": "^1.11.5",
"react": "^18.2.0",
Expand All @@ -61,7 +64,13 @@
"react-test-renderer": "^18.2.0",
"retry": "^0.13.1",
"ts-standard": "^11.0.0",
"typescript": "^4.7.4"
"typescript": "^4.7.4",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^12.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.0.3",
"@semantic-release/npm": "^12.0.0",
"@semantic-release/release-notes-generator": "^13.0.0"
},
"dependencies": {
"react-error-boundary": "^3.1.4"
Expand Down
2 changes: 1 addition & 1 deletion public/config/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ window.config = {
fill: {
color: [255, 255, 255, 0.2]
}
},
}
},
{
finding: {
Expand Down
7 changes: 6 additions & 1 deletion public/config/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ window.config = {
write: false
}
],
disableWorklist: false,
disableAnnotationTools: false,
enableServerSelection: true,
mode: "light",
preload: true,
annotations: [
{
finding: { value: '85756007', schemeDesignator: 'SCT', meaning: 'Tissue' },
Expand All @@ -19,6 +24,6 @@ window.config = {
color: [255, 255, 255, 0.2]
}
}
}
},
]
}
Loading

0 comments on commit a13e553

Please sign in to comment.