Skip to content

Commit

Permalink
Merge branch 'main' into new_from_clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
psobolewskiPhD authored Jan 13, 2024
2 parents 829cc34 + 27671ea commit e4e919f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 34 deletions.
15 changes: 11 additions & 4 deletions docs/developers/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,22 @@ from unit tests to integration and functional tests.

All of `napari` tests are located in folders named `_tests`. We keep our unit
tests located in the individual folders with the modules or functions they are
testing (e.g. the tests for the `Image` layer are located in a `_tests` folder
alongside the `image.py` file). Our integration and functional tests are located in
testing (e.g. the tests for the `Image` layer are located in
`/napari/layers/image/_tests` alongside the `Image` layer code). Our integration and
functional tests are located in
the `napari/_tests` folder at the top of the repository.

We also strive to unit test as much of our model file and utils code independently of
our GUI code. These tests are located in the `napari/layers`, `napari/components`,
and `napari/utils` folders. Our GUI code is tests in the `napari/_tests`,
`napari/_qt`, `napari/_vispy` folders. The `napari/plugins` folder contains a mix
of tests.
`napari/_qt`, `napari/_vispy` folders. The tests in these three folders are ignored
when we run them in the subset of our
[continuous integration](https://en.wikipedia.org/wiki/Continuous_integration)
workflows that run in a headless environment (without a Qt backend).
When we are testing "non-GUI" code in a way that requires a GUI backend, they are
placed here. The `napari/plugins` folder contains a mix of tests.

Pytest fixtures that are available globally to aid testing live in `napari/conftest.py`.

## Running tests

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/magicgui.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function is called:
```{code-cell} python
:tags: [remove-output]
@magicgui(call_button='Make Points', n_points={'maximum': 200})
@magicgui(call_button='Make Points', n_points={'max': 200})
def make_points(n_points=40) -> napari.types.LayerDataTuple:
data = 500 * np.random.rand(n_points, 2)
return (data, {'name': 'My Points'}, 'points')
Expand Down
58 changes: 29 additions & 29 deletions docs/tutorials/fundamentals/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,9 @@ up a Python {{ python_version }} environment with `conda`:

Choose one of the options below to install napari as a Python package.

````{admonition} **1. From pip**
:class: dropdown
::::::{tab-set}

napari can be installed on most macOS (Intel x86), Linux, and Windows systems with Python
{{ python_version_range }} using pip:
```sh
python -m pip install "napari[all]"
```
You can then upgrade napari to a new version using:
```sh
python -m pip install "napari[all]" --upgrade
```
*(See [Choosing a different Qt backend](#choosing-a-different-qt-backend) below for an explanation of the `[all]`
notation.)*
*(See [Using constraints file](#using-constraints-files) for help installing older versions of napari)*
````


````{admonition} **2. From conda-forge**
:class: dropdown
:::::{tab-item} From conda-forge using conda

If you prefer to manage packages with conda, napari is available on the
conda-forge channel. We also recommend this path for users of arm64 macOS machines
Expand All @@ -100,7 +78,6 @@ If you want to install napari with PySide2 as the backend you need to install it
```sh
conda install -c conda-forge napari pyside2
```
````

````{note}
In some cases, `conda`'s default solver can struggle to find out which packages need to be
Expand Down Expand Up @@ -129,16 +106,39 @@ mamba install napari
````

:::::

````{admonition} **3. From the main branch on Github**
:class: dropdown
:::::{tab-item} From PyPI using pip

To install the latest version with yet to be released features from github via pip, call
napari can be installed from PyPI on most macOS (Intel x86), Linux, and Windows systems with Python
{{ python_version_range }} using pip:

```sh
python -m pip install "napari[all]"
```
You can then upgrade napari to a new version using:

```sh
python -m pip install "napari[all]" --upgrade
```

*(See [Choosing a different Qt backend](#choosing-a-different-qt-backend) below for an explanation of the `[all]`
notation.)*

*(See [Using constraints file](#using-constraints-files) for help installing older versions of napari)*

:::::

:::::{tab-item} From the main branch on Github

To install the latest version with yet to be released features from Github you can use pip:

```sh
python -m pip install "git+https://github.com/napari/napari.git#egg=napari[all]"
```
````
:::::
::::::


<!-- #region -->
### Checking it worked
Expand Down

0 comments on commit e4e919f

Please sign in to comment.