Skip to content

Commit a0cee6e

Browse files
committed
Move to Girder 3.
Move HistomicsTK server components to this repo. The default ui has moved from /histomicstk to /histomics. Individual deployments can mount this at other locations. Because we now use the girder-3 branch of slicer_cli_web, the cli access settings are no longer necessary. The docker cli endpoints are only present in slicer_cli_web. Where appropriate, references have been changed from HistomicsTK to Digital Slide Archive. This removes the options to ingest from tcga-data.nci.nih.gov, as that has not been served in a compatible manner in a long time. Still needed: - Add a test that includes using a docker CLI. This will require appropriate infrastructure for starting girder_worker and running docker containers. - Add a test to ensure that local paths are used within the CLI test. - Add deployment to pypi on successful builds - Migrate appropriate docs from HistomicsTK
0 parents  commit a0cee6e

File tree

127 files changed

+12909
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+12909
-0
lines changed

.circleci/config.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/project
5+
docker:
6+
- image: zachmullen/tox-and-node
7+
- image: memcached
8+
- image: circleci/mongo:4.0-ram
9+
- image: rabbitmq
10+
steps:
11+
- checkout
12+
- run:
13+
name: Preinstall phantomjs to work around an npm permission issue
14+
command: npm install -g phantomjs-prebuilt --unsafe-perm
15+
- run:
16+
name: Run tests via tox
17+
# Piping through cat does less buffering of the output but can
18+
# consume the exit code
19+
command: tox | cat; test ${PIPESTATUS[0]} -eq 0
20+
- run:
21+
name: Install Codecov client
22+
command: pip install codecov
23+
- run:
24+
name: Upload coverage
25+
# Retry as codecov can be flaky
26+
command: for i in $(seq 1 10); do [ %i -gt 1 ] && echo "retrying $i" && sleep 5; codecov --required --disable search pycov gcov --root project --file build/test/coverage/py_coverage.xml build/test/coverage/cobertura-coverage.xml && s=0 && break || s=$?; done; (exit $s)
27+
release:
28+
docker:
29+
- image: circleci/python:3.7
30+
steps:
31+
- checkout
32+
- deploy:
33+
name: Run tests via tox
34+
# Piping through cat does less buffering of the output but can
35+
# consume the exit code
36+
command: tox -e release | cat; test ${PIPESTATUS[0]} -eq 0
37+
38+
workflows:
39+
version: 2
40+
ci:
41+
jobs:
42+
- build:
43+
filters:
44+
tags:
45+
only: /^v.*/
46+
- release:
47+
requires:
48+
- build
49+
filters:
50+
tags:
51+
only: /^v.*/
52+
branches:
53+
only: master

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
charset = utf-8
9+
10+
[*.py]
11+
indent_size = 4
12+
max_line_length = 100
13+
14+
[*.js]
15+
indent_size = 4
16+
17+
[*.json]
18+
indent_size = 4
19+
20+
[*.pug]
21+
indent_size = 2
22+
23+
[*.styl]
24+
indent_size = 2
25+
26+
[*.yml]
27+
indent_size = 2

.gitignore

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
parts/
19+
sdist/
20+
var/
21+
wheels/
22+
*.egg-info/
23+
.installed.cfg
24+
*.egg
25+
26+
# Installer logs
27+
pip-log.txt
28+
pip-delete-this-directory.txt
29+
30+
# Unit test / coverage reports
31+
htmlcov/
32+
.tox/
33+
.coverage
34+
.coverage.*
35+
.cache
36+
coverage.xml
37+
*.cover
38+
.hypothesis/
39+
.pytest_cache/
40+
41+
# pyenv
42+
.python-version
43+
44+
# dotenv
45+
.env
46+
47+
# virtualenv
48+
.venv
49+
venv/
50+
ENV/
51+
52+
node_modules/
53+
tests/externaldata

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
sudo: false
2+
dist: xenial
3+
language: python
4+
python:
5+
- "2.7"
6+
- "3.5"
7+
- "3.6"
8+
- "3.7"
9+
services:
10+
- mongodb
11+
install:
12+
- pip install --upgrade pip
13+
- pip install --upgrade virtualenv
14+
- pip install tox-travis
15+
script:
16+
# Piping through cat does less buffering of the output but can consume the
17+
# exit code
18+
# Deselect the test_conversion tests, as the virtualenv travis uses fails
19+
# to import pyvips with an error
20+
# "OSError: dlopen: cannot load any more object with static TLS"
21+
- tox | cat; test ${PIPESTATUS[0]} -eq 0
22+
after_success:
23+
- pip install codecov
24+
- codecov --disable search pycov gcov --file .tox/coverage/py_coverage.xml build/test/coverage/cobertura-coverage.xml

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Apache Software License 2.0
2+
3+
Copyright (c) 2019, Kitware, Inc.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.

MANIFEST.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
include LICENSE
2+
include README.rst
3+
include setup.py
4+
5+
graft histomicsui
6+
graft docs
7+
prune test
8+
global-exclude *.py[co] *.cmake __pycache__ node_modules

README.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
===========
2+
HistomicsUI
3+
===========
4+
5+
Organize, visualize, and analyze histology images.
6+
7+
`HistomicsUI`_ organizes and managed whole slide image (WSI) files using Girder_. It has a dedicated interface to select WSI, add annotations manually, and to run analysis and algorithms on all or parts of images.
8+
9+
Girder provides authentication, access control, and diverse storage options, including using local file systems and Amazon S2. WSI images are read and displayed via the large_image_ module. Algorithms are containerized using Docker_ and are run using the slicer_cli_web_ Girder plugin. These can be run on multiple worker machines via `Girder Worker`_ and celery_.
10+
11+
A set of common algorithms are provided by HistomicsTK_.
12+
13+
Installation
14+
------------
15+
16+
Linux
17+
=====
18+
19+
In linux with Python 2.7, Python 3.5, 3.6, or 3.7:
20+
21+
Prerequisites:
22+
23+
- MongoDB must be installed and running.
24+
- An appropriate version of Python must be installed.
25+
26+
.. code-block:: bash
27+
28+
pip install histomicsui --find-links https://girder.github.io/large_image_wheels
29+
girder build
30+
girder serve
31+
32+
To use Girder Worker:
33+
34+
.. code-block:: bash
35+
36+
pip install girder_slicer_cli_web[worker]
37+
GW_DIRECT_PATHS=true girder_worker -l info -Ofair --prefetch-multiplier=1
38+
39+
The first time you start HistomicsUI, you'll also need to configure Girder with at least one user and one assetstore (see the Girder_ documentation). Additionally, it is recommended that you install the HistomicsTK_ algorithms. This can be done going to the Admin Console, Plugins, Slicer CLI Web settings. Set a default task upload folder, then import the `dsarchive/histomicstk:latest` docker image.
40+
41+
Reference Deployment
42+
====================
43+
44+
The standard deployment of HistomicsUI is the `Digital Slide Archive`_. The associated repository has tools for readily installing via Docker, VirtualBox, or shell scripts on Ubuntu.
45+
46+
Funding
47+
-------
48+
This work is funded in part by the NIH grant U24-CA194362-01_.
49+
50+
.. _HistomicsUI: https://github.com/DigitalSlideArchive/HistomicsUI
51+
.. _Docker: https://www.docker.com/
52+
.. _Kitware: https://www.kitware.com/
53+
.. _U24-CA194362-01: http://grantome.com/grant/NIH/U24-CA194362-01
54+
55+
.. _Girder: http://girder.readthedocs.io/en/latest/
56+
.. _Girder Worker: https://girder-worker.readthedocs.io/en/latest/
57+
.. _large_image: https://github.com/girder/large_image
58+
.. _slicer_cli_web: https://github.com/girder/slicer_cli_web
59+
.. _slicer execution model: https://www.slicer.org/slicerWiki/index.php/Slicer3:Execution_Model_Documentation
60+
.. _Discourse forum: https://discourse.girder.org/c/histomicstk
61+
.. _Gitter Chatroom: https://gitter.im/DigitalSlideArchive/HistomicsTK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
62+
.. _celery: http://www.celeryproject.org/
63+
.. _HistomicsTK: https://github.com/DigitalSlideArchive/HistomicsTK
64+
.. _Digital Slide Archive: https://github.com/DigitalSlideArchive/digital_slide_archive
65+

codecov.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
comment: false
2+
coverage:
3+
status:
4+
# We have some variation in tests due to variations in the test runs. We
5+
# want to ignore these changes, but not let code coverage slip too much.
6+
project:
7+
default:
8+
threshold: 1
9+
# This applies to the changed code. We allow it to be much less covered
10+
# than the main code, since we use the project threshold for that.
11+
patch:
12+
default:
13+
threshold: 25
14+
only_pulls: true
15+

0 commit comments

Comments
 (0)