You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.rst
+25-31Lines changed: 25 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
.. highlight:: shell
2
2
3
-
============
3
+
=============
4
4
Contributing
5
-
============
5
+
=============
6
6
7
-
Contributions are welcome, and they are greatly appreciated! Every little bit
8
-
helps, and credit will always be given.
7
+
Contributions are welcome and greatly appreciated! Every little bit helps, and credit will always be given.
9
8
10
9
You can contribute in many ways:
11
10
@@ -26,21 +25,17 @@ If you are reporting a bug, please include:
26
25
Fix Bugs
27
26
~~~~~~~~
28
27
29
-
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
30
-
wanted" is open to whoever wants to implement it.
28
+
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
31
29
32
30
Implement Features
33
31
~~~~~~~~~~~~~~~~~~
34
32
35
-
Look through the GitHub issues for features. Anything tagged with "enhancement"
36
-
and "help wanted" is open to whoever wants to implement it.
33
+
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
37
34
38
35
Write Documentation
39
36
~~~~~~~~~~~~~~~~~~~
40
37
41
-
TIA Toolbox could always use more documentation, whether as part of the
42
-
official TIA Toolbox docs, in docstrings, or even on the web in blog posts,
43
-
articles, and such.
38
+
TIA Toolbox could always use more documentation, whether as part of the official TIA Toolbox docs, in docstrings, or even on the web in blog posts, articles, and such.
44
39
45
40
Submit Feedback
46
41
~~~~~~~~~~~~~~~
@@ -50,9 +45,8 @@ The best way to send feedback is to file an issue at https://github.com/TissueIm
50
45
If you are proposing a feature:
51
46
52
47
* Explain in detail how it would work.
53
-
* Keep the scope as narrow as possible, to make it easier to implement.
54
-
* Remember that this is a volunteer-driven project, and that contributions
55
-
are welcome :)
48
+
* Keep the scope as narrow as possible to make it easier to implement.
49
+
* Remember that this is a volunteer-driven project, and contributions are welcome :)
56
50
57
51
Get Started!
58
52
------------
@@ -64,7 +58,7 @@ Ready to contribute? Here's how to set up ``tiatoolbox`` for local development.
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
61
+
3. Install your local copy into a virtual environment. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
68
62
69
63
$ mkvirtualenv tiatoolbox
70
64
$ cd tiatoolbox/
@@ -76,13 +70,18 @@ Ready to contribute? Here's how to set up ``tiatoolbox`` for local development.
76
70
77
71
Now you can make your changes locally.
78
72
79
-
5. When you're done making changes, check that your changes pass flake8 and the
80
-
tests::
73
+
5. When you're done making changes, check that your changes pass pre-commit and the tests::
81
74
82
-
$ flake8 tiatoolbox tests
75
+
$ pre-commit run --all-files
83
76
$ python setup.py test or pytest
84
77
85
-
To get flake8, just pip install them into your virtualenv.
78
+
To get `pre-commit <https://pre-commit.com/#install>`_, just pip install it into your virtual environment using::
79
+
80
+
$ pip install pre-commit
81
+
82
+
To set up the git hook for pre-commit, run the following command after installing pre-commit::
83
+
84
+
$ pre-commit install
86
85
87
86
6. Commit your changes and push your branch to GitHub::
88
87
@@ -98,20 +97,15 @@ Pull Request Guidelines
98
97
Before you submit a pull request, check that it meets these guidelines:
99
98
100
99
1. The pull request should include tests.
101
-
2. If the pull request adds functionality, the docs should be updated. Put
102
-
your new functionality into a function with a docstring, and add the
103
-
feature to the list in README.rst.
104
-
3. The pull request should work for Python 3.8, 3.9 and 3.10, and for PyPy. Check
and make sure that the tests pass for all supported Python versions.
100
+
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the pull request description.
101
+
3. The pull request should work for Python 3.9, 3.10, 3.11, and 3.12, and for PyPy. Check https://github.com/TissueImageAnalytics/tiatoolbox/actions/workflows/python-package.yml and make sure that the tests pass for all supported Python versions.
107
102
108
103
Tips
109
104
----
110
105
111
106
To run a subset of tests::
112
107
113
-
$ pytest tests.test_tiatoolbox
114
-
108
+
$ pytest tests.test_tiatoolbox
115
109
116
110
Deploying
117
111
---------
@@ -120,8 +114,8 @@ A reminder for the maintainers on how to deploy.
120
114
Make sure all your changes are committed (including an entry in HISTORY.rst).
121
115
Then run::
122
116
123
-
$ poetry version patch # use: "poetry version --help" for other options
124
-
$ git push
125
-
$ git push --tags
117
+
$ poetry version patch # use: "poetry version --help" for other options
118
+
$ git push
119
+
$ git push --tags
126
120
127
-
Travis will then deploy to PyPI if tests pass.
121
+
GitHub Actions will then deploy to PyPI if tests pass.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ or
126
126
127
127
### License
128
128
129
-
The source code TIA Toolbox (tiatoolbox) as hosted on GitHub is released under the [BSD-3-Clause license](https://github.com/TissueImageAnalytics/tiatoolbox/blob/develop/LICENSE). The full text of the licence is included in [LICENSE](https://raw.githubusercontent.com/TissueImageAnalytics/tiatoolbox/develop/LICENSE).
129
+
The source code TIAToolbox (tiatoolbox) as hosted on GitHub is released under the [BSD-3-Clause license](https://github.com/TissueImageAnalytics/tiatoolbox/blob/develop/LICENSE). The full text of the licence is included in [LICENSE](https://raw.githubusercontent.com/TissueImageAnalytics/tiatoolbox/develop/LICENSE).
130
130
131
131
Models weights are dependent on the datasets that they were trained on. Please refer to the [documentation](https://tia-toolbox.readthedocs.io/en/latest/pretrained.html) for more details.
Copy file name to clipboardExpand all lines: docs/installation.rst
+43-52Lines changed: 43 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,28 +7,26 @@ Installation
7
7
8
8
Prerequisites
9
9
=============
10
-
The prerequisites for tiatoolbox installation are OpenSlide binaries and OpenJpeg version 2.3.0 or above.
11
-
Please follow the instructions below to install prerequisite software according to the platform you are using.
10
+
11
+
The prerequisites for TIAToolbox installation are OpenSlide binaries and OpenJPEG version 2.3.0 or above. Please follow the instructions below to install the prerequisite software according to your platform.
12
12
13
13
Linux (Ubuntu)
14
14
--------------
15
-
On Linux the prerequisite software can be installed using the command
15
+
16
+
On Linux, the prerequisite software can be installed using the following command:
The same command is used when working on the Colab or Kaggle platforms.
22
-
When working on Google Colab, we remove the packages ``datascience`` and ``albumentations`` because they conflict
23
-
and produce an error message.
22
+
The same command is used when working on the Colab or Kaggle platforms. When working on Google Colab, we remove the packages ``datascience`` and ``albumentations`` because they conflict and produce an error message.
24
23
25
24
Windows (10+)
26
-
-------------------
27
-
1. Download OpenSlide binaries from `this page <https://openslide.org/download/>`_. Extract the folder and add ``bin`` and ``lib`` subdirectories to
28
-
Windows `system path <https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14)>`_. If you are using a conda environment you can also copy ``bin`` and ``lib`` subdirectories to ``[Anaconda Installation Path]/envs/[tiatoolbox-environment]/Library/``.
25
+
-------------
29
26
30
-
2. Install OpenJPEG. The easiest way is to install OpenJpeg is through conda
31
-
using
27
+
1. Download OpenSlide binaries from `this page <https://openslide.org/download/>`_. Extract the folder and add the ``bin`` and ``lib`` subdirectories to the Windows `system path <https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14)>`_. If you are using a conda environment, you can also copy the ``bin`` and ``lib`` subdirectories to ``[Anaconda Installation Path]/envs/[tiatoolbox-environment]/Library/``.
28
+
29
+
2. Install OpenJPEG. The easiest way to install OpenJPEG is through conda:
32
30
33
31
.. code-block:: console
34
32
@@ -37,7 +35,7 @@ using
37
35
macOS
38
36
-----
39
37
40
-
On macOS there are two popular package managers, `homebrew`_ and `macports`_.
38
+
On macOS, there are two popular package managers, `homebrew`_ and `macports`_.
41
39
42
40
.. _homebrew: https://brew.sh/
43
41
.. _macports: https://www.macports.org/
@@ -56,26 +54,26 @@ MacPorts
56
54
57
55
$ port install openjpeg openslide
58
56
59
-
60
57
Installing Stable Release
61
58
=========================
62
59
63
-
Please note that TIAToolbox is tested for python version 3.9, 3.10, 3.11 and 3.12.
60
+
Please note that TIAToolbox is tested for Python versions 3.9, 3.10, 3.11, and 3.12.
64
61
65
62
Recommended
66
63
-----------
64
+
67
65
To install TIAToolbox, run this command in your terminal after you have installed the prerequisite software:
68
66
69
67
.. code-block:: console
70
68
71
69
$ pip install tiatoolbox
72
70
73
-
This is the preferred method to install TIA Toolbox, as it will always install the most recent stable release.
71
+
This is the preferred method to install TIAToolbox, as it will always install the most recent stable release.
74
72
75
73
Upgrade
76
74
-------
77
75
78
-
To upgrade an existing version of tiatoolbox to the latest stable release, run this command in your terminal:
76
+
To upgrade an existing version of TIAToolbox to the latest stable release, run this command in your terminal:
79
77
80
78
.. code-block:: console
81
79
@@ -84,21 +82,19 @@ To upgrade an existing version of tiatoolbox to the latest stable release, run t
84
82
Without Dependencies
85
83
--------------------
86
84
87
-
If you already have setup a Python environment with all the pre-requisite software and dependencies installed and you would like to keep the existing versions of these dependencies, run this command in your terminal:
85
+
If you already have a Python environment set up with all the prerequisite software and dependencies installed and you would like to keep the existing versions of these dependencies, run this command in your terminal:
88
86
89
87
.. code-block:: console
90
88
91
89
$ pip install --no-deps tiatoolbox
92
90
93
-
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
94
-
you through the process.
91
+
If you don't have `pip`_ installed, this `Python installation guide`_ can guide you through the process.
Please note that conda-forge installation support is limited on Windows as OpenSlide binaries are not supported on official conda channels. An alternate way to install using conda on Windows could be to install it in `WSL2 with CUDA support <https://docs.microsoft.com/en-us/windows/ai/directml/gpu-cuda-in-wsl>`_. In some cases, WSL2 runs faster on Python code, and therefore we **recommend** this option.
118
115
119
-
Please note that conda-forge installation support is limited on Windows as openslide binaries are not supported on official conda channels. An alternate way to install using conda on Windows could be to install it in `WSL2 with CUDA support <https://docs.microsoft.com/en-us/windows/ai/directml/gpu-cuda-in-wsl>`_. In some cases, WSL2 runs faster on Python codes and therefore we **recommend** this option.
120
-
121
-
From sources
116
+
From Sources
122
117
------------
123
118
124
-
The sources for TIA Toolbox can be downloaded from the `Github repo`_.
119
+
The sources for TIAToolbox can be downloaded from the `GitHub repo`_.
125
120
126
121
You can either clone the public repository:
127
122
@@ -141,69 +136,65 @@ Once you have a copy of the source, you can install it with:
To run TIA toolbox in an isolated environment, use our `Docker image <https://github.com/tissueimageanalytics/tiatoolbox-docker/pkgs/container/tiatoolbox>`_. We host different Dockerfiles in our github repository `tiatoolbox-docker <https://github.com/TissueImageAnalytics/tiatoolbox-docker>`_. Please report any issues related to the docker image in the repository `tiatoolbox-docker <https://github.com/TissueImageAnalytics/tiatoolbox-docker>`_.
145
+
To run TIAToolbox in an isolated environment, use our `Docker image <https://github.com/tissueimageanalytics/tiatoolbox-docker/pkgs/container/tiatoolbox>`_. We host different Dockerfiles in our GitHub repository `tiatoolbox-docker <https://github.com/TissueImageAnalytics/tiatoolbox-docker>`_. Please report any issues related to the Docker image in the repository `tiatoolbox-docker <https://github.com/TissueImageAnalytics/tiatoolbox-docker>`_.
152
146
153
-
After `installing Docker <https://docs.docker.com/get-docker/>`_ (or Docker Desktop), you can use our TIA toolbox image in 3 different ways.
147
+
After `installing Docker <https://docs.docker.com/get-docker/>`_ (or Docker Desktop), you can use our TIAToolbox image in three different ways.
154
148
155
149
Use the Pre-Built Docker Image
156
150
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
157
-
TIAToolbox provides pre-built docker containers which can be downloaded using the instructions below:
0 commit comments