Skip to content

Commit

Permalink
Merge remote-tracking branch 'ohif/master' into fix/toggle-different-…
Browse files Browse the repository at this point in the history
…study
  • Loading branch information
wayfarer3130 committed Sep 15, 2023
2 parents 95801c9 + 38af311 commit f29e816
Show file tree
Hide file tree
Showing 843 changed files with 31,375 additions and 22,694 deletions.
13 changes: 5 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ jobs:
git config --global user.name "ohif-bot"
- run:
name: Authenticate with NPM registry
command:
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: Increase the event emitter limit
command: |
Expand All @@ -289,8 +288,7 @@ jobs:
node ./publish-version.mjs
- run:
name: Again set the NPM registry (was deleted in the version script)
command:
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: publish package dist
command: |
Expand Down Expand Up @@ -337,8 +335,7 @@ jobs:
- setup_remote_docker:
docker_layer_caching: false
- run:
name:
Build and push Docker image from the master branch (beta releases)
name: Build and push Docker image from the master branch (beta releases)
command: |
echo $(ls -l)
Expand Down Expand Up @@ -417,8 +414,8 @@ workflows:
store_artifacts: false
working_directory: platform/app
build:
yarn test:data && npx cross-env QUICK_BUILD=true
APP_CONFIG=config/dicomweb-server.js yarn run build
yarn test:data && npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js
yarn run build
# start server --> verify running --> percy + chrome + cypress
command: yarn run test:e2e:dist
cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}'
Expand Down
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
skip = .git,*.pdf,*.svg,yarn.lock,*.min.js,locales
# ignore words ending with … and some camelcased variables and names
ignore-regex = \b\S+…\S*|\b(doubleClick|afterAll|PostgresSQL)\b|\bWee, L\.|.*te.*Telugu.*
# some odd variables
ignore-words-list = datea,ser,childrens
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Reduces size of context and hides
# files from Docker (can't COPY or ADD these)

# Note that typically the Docker context for various OHIF containers is the
# directory of this file (i.e. the root of the source). As such, this is
# the .dockerignore file for ALL Docker containers that are built. For example,
# the Docker containers built from the recipes in ./platform/app/.recipes will
# have this file as their .dockerignore.

# Output
dist/
build/
Expand Down Expand Up @@ -28,3 +34,4 @@ dockerfile
.vscode/
coverage/
docs/
testdata/
11 changes: 5 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"plugins": [
"@typescript-eslint",
"import",
"eslint-plugin-tsdoc",
"prettier"
],
"plugins": ["@typescript-eslint", "import", "eslint-plugin-tsdoc", "prettier"],
"extends": [
"react-app",
"eslint:recommended",
Expand All @@ -21,6 +16,10 @@
"version": "detect"
}
},
"rules": {
// Enforce consistent brace style for all control statements for readability
"curly": "error"
},
"globals": {
"cy": true,
"before": true,
Expand Down
12 changes: 5 additions & 7 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,15 @@ body:
attributes:
label: The current behavior
description:
'A clear and concise description of what happens instead of the expected
behavior.'
'A clear and concise description of what happens instead of the expected behavior.'
validations:
required: true

- type: textarea
id: expected_behavior
attributes:
label: The expected behavior
description:
'A clear and concise description of what you expected to happen.'
description: 'A clear and concise description of what you expected to happen.'
validations:
required: true

Expand Down Expand Up @@ -81,6 +79,6 @@ body:
- type: markdown
attributes:
value: >
> :warning: Reports we cannot reproduce are at risk of being marked
stale and > closed. The more information you can provide, the more
likely we are to look > into and address your issue.
> :warning: Reports we cannot reproduce are at risk of being marked stale and > closed. The
more information you can provide, the more likely we are to look > into and address your
issue.
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ body:
attributes:
label: 'What feature or change would you like to see made?'
description:
'Please include as much detail as possible including possibly mock up
screen shots, workflow or logic flow diagrams etc.'
'Please include as much detail as possible including possibly mock up screen shots, workflow
or logic flow diagrams etc.'
placeholder: '...'
validations:
required: true
- type: textarea
attributes:
label: 'Why should we prioritize this feature?'
description:
'Discuss if and how the requested feature interacts with existing
features.'
description: 'Discuss if and how the requested feature interacts with existing features.'
placeholder: '...'
validations:
required: true
5 changes: 2 additions & 3 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ exemptLabels:
staleLabel: 'Stale :baguette_bread:'
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will
be closed if no further activity occurs. Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Codespell

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

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ platform/app/src/pluginImports.js
/Viewers.iml
platform/app/.recipes/Nginx-Dcm4Che/dcm4che/dcm4che-arc/*
platform/app/.recipes/OpenResty-Orthanc/logs/*
.vercel
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "testdata"]
path = testdata
url = https://github.com/OHIF/viewer-testdata-dicomweb.git
branch = main
36 changes: 17 additions & 19 deletions .netlify/www/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
<html>
<head>
<title>OHIF Viewer: Deploy Preview</title>
</head>

<head>
<title>OHIF Viewer: Deploy Preview</title>
</head>

<body>
<h1>Index of Previews</h1>

<ul>
<li>
<a href="/pwa">OHIF Viewer</a>
</li>
<li>
<a href="/docs">Documentation</a>
</li>
<li>
<a href="/ui">UI: Component Library</a>
</li>
</ul>
</body>
<body>
<h1>Index of Previews</h1>

<ul>
<li>
<a href="/pwa">OHIF Viewer</a>
</li>
<li>
<a href="/docs">Documentation</a>
</li>
<li>
<a href="/ui">UI: Component Library</a>
</li>
</ul>
</body>
</html>
7 changes: 5 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"plugins": ["prettier-plugin-tailwindcss"],
"trailingComma": "es5",
"printWidth": 80,
"printWidth": 100,
"proseWrap": "always",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"arrowParens": "avoid"
"arrowParens": "avoid",
"singleAttributePerLine": true,
"endOfLine": "auto"
}
4 changes: 2 additions & 2 deletions .webpack/helpers/excludeNodeModulesExcept.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ function excludeNodeModulesExcept(modules) {
if (pathSep == '\\')
// must be quoted for use in a regexp:
pathSep = '\\\\';
var moduleRegExps = modules.map(function(modName) {
var moduleRegExps = modules.map(function (modName) {
return new RegExp('node_modules' + pathSep + modName);
});

return function(modulePath) {
return function (modulePath) {
if (/node_modules/.test(modulePath)) {
for (var i = 0; i < moduleRegExps.length; i++)
if (moduleRegExps[i].test(modulePath)) return false;
Expand Down
4 changes: 1 addition & 3 deletions .webpack/rules/cssToJavaScript.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
const autoprefixer = require('autoprefixer');
const path = require('path');
const tailwindcss = require('tailwindcss');
const tailwindConfigPath = path.resolve(
'../../platform/app/tailwind.config.js'
);
const tailwindConfigPath = path.resolve('../../platform/app/tailwind.config.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const devMode = process.env.NODE_ENV !== 'production';

Expand Down
36 changes: 16 additions & 20 deletions .webpack/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const fs = require('fs');
const webpack = require('webpack');

// ~~ PLUGINS
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const TerserJSPlugin = require('terser-webpack-plugin');

// ~~ PackageJSON
Expand All @@ -26,11 +25,9 @@ const QUICK_BUILD = process.env.QUICK_BUILD;
const BUILD_NUM = process.env.CIRCLE_BUILD_NUM || '0';

// read from ../version.txt
const VERSION_NUMBER =
fs.readFileSync(path.join(__dirname, '../version.txt'), 'utf8') || '';
const VERSION_NUMBER = fs.readFileSync(path.join(__dirname, '../version.txt'), 'utf8') || '';

const COMMIT_HASH =
fs.readFileSync(path.join(__dirname, '../commit.txt'), 'utf8') || '';
const COMMIT_HASH = fs.readFileSync(path.join(__dirname, '../commit.txt'), 'utf8') || '';

//
dotenv.config();
Expand Down Expand Up @@ -105,10 +102,7 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
alias: {
// Viewer project
'@': path.resolve(__dirname, '../platform/app/src'),
'@components': path.resolve(
__dirname,
'../platform/app/src/components'
),
'@components': path.resolve(__dirname, '../platform/app/src/components'),
'@hooks': path.resolve(__dirname, '../platform/app/src/hooks'),
'@routes': path.resolve(__dirname, '../platform/app/src/routes'),
'@state': path.resolve(__dirname, '../platform/app/src/state'),
Expand All @@ -131,7 +125,12 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx', '*'],
// symlinked resources are resolved to their real path, not their symlinked location
symlinks: true,
fallback: { fs: false, path: false, zlib: false },
fallback: {
fs: false,
path: false,
zlib: false,
buffer: require.resolve('buffer'),
},
},
plugins: [
new webpack.DefinePlugin({
Expand All @@ -145,15 +144,12 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
'process.env.COMMIT_HASH': JSON.stringify(COMMIT_HASH),
/* i18n */
'process.env.USE_LOCIZE': JSON.stringify(process.env.USE_LOCIZE || ''),
'process.env.LOCIZE_PROJECTID': JSON.stringify(
process.env.LOCIZE_PROJECTID || ''
),
'process.env.LOCIZE_API_KEY': JSON.stringify(
process.env.LOCIZE_API_KEY || ''
),
'process.env.REACT_APP_I18N_DEBUG': JSON.stringify(
process.env.REACT_APP_I18N_DEBUG || ''
),
'process.env.LOCIZE_PROJECTID': JSON.stringify(process.env.LOCIZE_PROJECTID || ''),
'process.env.LOCIZE_API_KEY': JSON.stringify(process.env.LOCIZE_API_KEY || ''),
'process.env.REACT_APP_I18N_DEBUG': JSON.stringify(process.env.REACT_APP_I18N_DEBUG || ''),
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
// Uncomment to generate bundle analyzer
// new BundleAnalyzerPlugin(),
Expand Down
Loading

0 comments on commit f29e816

Please sign in to comment.