moved v3 docs

This commit is contained in:
Alireza committed 2021-06-15 19:14:37 -04:00
1 parent 1d281f7033
commit 188d2c75b4
191 files changed
+1507 -6020

No files matched your search

@@ -1,7 +1,3 @@
---
sidebar_position: 3
title: Continous Integration
---
# Continous Integration (CI)
This repository uses `CircleCI` and `Netlify` for continous integration.
@@ -29,15 +25,12 @@ The PR_CHECKS workflow (Pull Request Checks) runs our automated unit and
end-to-end tests for every code check-in. These tests must all pass before code
can be merged to our `master` branch.
<!-- <div style="text-align: center;">
<div style="text-align: center;">
<a href="/assets/img/WORKFLOW_PR_CHECKS.png">
<img src="/assets/img/WORKFLOW_PR_CHECKS.png" alt="workflow diagram" style="margin: 0 auto; max-width: 500px;" />
</a>
<div><i>Workflow diagram for PR_CHECKS</i></div>
</div> -->
![PR_CHECKS](../assets/img/WORKFLOW_PR_CHECKS.png)
</div>
### Workflow: PR_OPTIONAL_DOCKER_PUBLISH
@@ -45,16 +38,12 @@ The PR_OPTIONAL_DOCKER_PUBLISH workflow allows for "manual approval" to publish
the pull request as a tagged docker image. This is helpful when changes need to
be tested with the Google Adapter before merging to `master`.
<!-- <div style="text-align: center;">
<div style="text-align: center;">
<a href="/assets/img/WORKFLOW_PR_OPTIONAL_DOCKER_PUBLISH.png">
<img src="/assets/img/WORKFLOW_PR_OPTIONAL_DOCKER_PUBLISH.png" alt="workflow diagram" style="margin: 0 auto; max-width: 500px;" />
</a>
<div><i>Workflow diagram for PR_WORKFLOW_PR_OPTIONAL_DOCKER_PUBLISH</i></div>
</div> -->
![publish](../assets/img/WORKFLOW_PR_OPTIONAL_DOCKER_PUBLISH.png)
</div>
> NOTE: This workflow will fail unless it's for a branch on our `upstream`
> repository. If you need this functionality, but the branch is from a fork,
@@ -67,14 +56,12 @@ It uses the Netlify CLI to deploy assets created as part of the repository's PWA
Build process (`yarn run build`). The workflow allows for "Manual Approval" to
promote the build to `STAGING` and `PRODUCTION` environments.
<!-- <div style="text-align: center;">
<div style="text-align: center;">
<a href="/assets/img/WORKFLOW_DEPLOY.png">
<img src="/assets/img/WORKFLOW_DEPLOY.png" alt="workflow diagram" style="margin: 0 auto; max-width: 500px;" />
</a>
<div><i>Workflow diagram for WORKFLOW_DEPLOY</i></div>
</div> -->
![deploy](../assets/img/WORKFLOW_DEPLOY.png)
</div>
| Environment | Description | URL |
| ----------- | ---------------------------------------------------------------------------------- | --------------------------------------------- |
@@ -95,15 +82,12 @@ GitHub hosts the `gh-pages` branch with GitHub Pages.
- Extension Packages: https://github.com/ohif/viewers/#extensions
- Documentation: https://docs.ohif.org/
<!-- <div style="text-align: center;">
<div style="text-align: center;">
<a href="/assets/img/WORKFLOW_RELEASE.png">
<img src="/assets/img/WORKFLOW_RELEASE.png" alt="workflow diagram" style="margin: 0 auto; max-width: 500px;" />
</a>
<div><i>Workflow diagram for WORKFLOW_RELEASE</i></div>
</div> -->
![release](../assets/img/WORKFLOW_RELEASE.png)
</div>
### HOTFIX
+26 -18
View File
@@ -1,7 +1,3 @@
---
sidebar_position: 2
title: Contributing
---
# Contributing
## How can I help?
@@ -11,8 +7,8 @@ like to discuss the changes you intend to make to clarify where or how they
should be implemented, please don't hesitate to create a new issue. At a
minimum, you may want to read the following documentation:
- [Getting Started](./getting-started.md)
- [Architecture](../architecture/index.md)
- [Getting Started](/development/getting-started.md)
- [Architecture](/architecture/index.md)
Pull requests that are:
@@ -38,7 +34,8 @@ dependencies:
On your local file system:
```bash title="/my-projects/"
```bash
# code/my-projects/
.
├── cornerstonejs/cornerstone-tools
└── ohif/viewers
@@ -46,11 +43,13 @@ On your local file system:
- Open a terminal/shell
- Navigate to `cornerstonejs/cornerstone-tools`
- `npm install`
- `yarn install`
- [`yarn link`](https://yarnpkg.com/en/docs/cli/link)
- `npm run dev`
- `yarn run dev`
- Open a new terminal/shell
- Navigate to `ohif/viewers`.
- Navigate to `ohif/viewers` (the root of ohif project)
- `yarn install`
- [`yarn link cornerstone-tools`](https://yarnpkg.com/en/docs/cli/link)
- `yarn run dev`
@@ -58,10 +57,12 @@ On your local file system:
As you make changed to `cornerstone-tools`, and it's output is rebuilt, you
should see the following behavior:
![example of linked cornerstone-tools package](../assets/img/cornerstone-tools-link.gif)
<div style="text-align: center;">
<a href="/assets/img/cornerstone-tools-link.gif">
<img src="/assets/img/cornerstone-tools-link.gif" alt="Example of linked cornerstone-tools package" style="margin: 0 auto; max-width: 500px;" />
</a>
<div><i>example of linked cornerstone-tools package</i></div>
</div>
If you wish to stop using your local package, run the following commands in the
`ohif/viewers` repository root:
@@ -69,11 +70,13 @@ If you wish to stop using your local package, run the following commands in the
- `yarn unlink cornerstone-tools`
- `yarn install --force`
<!--
### `react-vtkjs-viewport`
On your local file system:
```bash title="/my-projects/"
```bash
# code/my-projects/
.
├── ohif/react-vtkjs-viewport
└── ohif/viewers
@@ -88,7 +91,7 @@ On your local file system:
- Navigate to `ohif/viewers`.
- `yarn install`
- [`yarn link react-vtkjs-viewport`](https://yarnpkg.com/en/docs/cli/link)
- `yarn run dev`
- `yarn run dev` -->
#### Other linkage notes
@@ -97,6 +100,10 @@ there are a lot of factors that can influence the behavior of our development
server and bundler. If you encounter issues not addressed here, please don't
hesitate to reach out on GitHub.
Sometimes you might encounter a situation where the linking doesn't work as expected.
This might happen when there are multiple linked packages with the same name.
You can [remove][unlink] the linked packages inside yarn and try again.
## Any guidance on submitting changes?
While we do appreciate code contributions, triaging and integrating contributed
@@ -112,7 +119,7 @@ working on your pull requests:
We will provide feedback on your pull requests as soon as possible. Following
the tips above will help ensure your changes are reviewed.
## Testing contribution pull requests
<!-- ## Testing contribution pull requests
OHIF uses [netlify](https://www.netlify.com/) so that pull requests are
autogenerated and available for testing.
@@ -133,7 +140,7 @@ the gitbook generated by the pull request:
```bash
https://deploy-preview-237--ohif.netlify.com/contributing.html
```
``` -->
<!--
Links
@@ -143,4 +150,5 @@ https://deploy-preview-237--ohif.netlify.com/contributing.html
[example-url]: https://deploy-preview-237--ohif.netlify.com/viewer/?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/sampleDICOM.json
[pr-237]: https://github.com/OHIF/Viewers/pull/237
[monorepo]: https://github.com/OHIF/Viewers/issues/768
[unlink]: https://stackoverflow.com/questions/58459698/is-there-a-command-to-unlink-all-yarn-packages-yarn-unlink-all
<!-- prettier-ignore-end -->
@@ -1,7 +1,3 @@
---
sidebar_position: 1
title: Getting Started
---
# Getting Started
## Setup
@@ -51,6 +47,9 @@ Navigate to the root of the project's directory in your terminal and run the
following commands:
```bash
# Switch to the v3 branch
git switch feat/v2-main
# Restore dependencies
yarn install
@@ -71,14 +70,7 @@ You should see the following output:
### 🎉 Celebrate 🎉
<div style={{padding:"56.25% 0 0 0", position:"relative"}}>
<iframe src="https://player.vimeo.com/video/547952862?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479" frameBorder="0" allow="autoplay; fullscreen; picture-in-picture" allowFullScreen style= {{ position:"absolute",top:0,left:0,width:"100%",height:"100%"}} title="measurement-report"></iframe>
</div>
<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/545988245?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;" title="getting-started"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
### Building for Production
+68 -6
View File
@@ -1,11 +1,72 @@
---
sidebar_position: 4
title: Testing
---
# Tests
# Running Tests for OHIF
We introduce here various test types that is available
for OIHF, and how to run each test in order to make sure your contribution
hasn't broken any existing functionalities. Idea and philosophy of each testing category is discussed in the second
part of this page.
## Unit test
To run the unit test:
```
yarn run test:unit:ci
```
Note: You should have already installed all the packages with `yarn install`.
Running unit test will generate a report at the end showing the successful and
unsuccessful tests with detailed explanations.
## End-to-end test
For running the OHIF e2e test you need to run the following steps:
- Create a mini-pacs for OHIF to access the images for testing. We download
and run our lightweight implementation which provides a collection of DICOM studies ([source code][mini-pacs]).
```
docker run -p 5985:5985 -p 5984:5984 -e USE_POUCHDB=true -e DB_SERVER=http://0.0.0.0 ohif/viewer-testdata:0.1-test
```
Successful execution should be
![](../assets/img/docker-pacs.png)
- Open a new terminal, navigate to the OHIF project, and run OHIF with the dicom-server config
```
APP_CONFIG=config/dicomweb-server.js yarn start
```
You should be able to see test studies in the study list
![OHIF-e2e-test-studies](../assets/img/OHIF-e2e-test-studies.png)
- Open a new terminal inside the OIHF project, and run the e2e cypress test
```
yarn run test:e2e
```
You should be able to see the cypress window open
![e2e-cypress](../assets/img/e2e-cypress.png)
Run the tests by clicking on the `Run #number integration tests` .
A new window will open and you will see e2e tests being executed one after
each other.
![e2e-cypress-final](../assets/img/e2e-cypress-final.png)
# Testing Philosiphy
> Testing is an opinionated topic. Here is a rough overview of our testing
> philosiphy. See something you want to discuss or think should be changed? Open
> philosophy. See something you want to discuss or think should be changed? Open
> a PR and let's discuss.
You're an engineer. You know how to write code, and writing tests isn't all that
@@ -132,6 +193,7 @@ feature `X` or scenario `Y`? Open an issue and let's discuss.
<!-- prettier-ignore-start -->
[eslint-rules]: https://eslint.org/docs/rules/
[mini-pacs]: https://github.com/OHIF/viewer-testdata
[typescript-docs]: https://www.typescriptlang.org/docs/home.html
[flow-org]: https://flow.org/
<!-- Talks -->