Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,38 +76,39 @@ All details related to installation and logic are described in the

### Installation

#### Installation Requirements

Some of the functionalities of `atlalign` depend on the [TensorFlow implementation
of the Learned Perceptual Image Patch Similarity (LPIPS)](https://github.com/alexlee-gk/lpips-tensorflow). Unfortunately, the
package is not available on PyPI and must be installed manually as follows
for full functionality.
```shell script
pip install git+http://github.com/alexlee-gk/lpips-tensorflow.git#egg=lpips_tf
```

You can now move on to installing the actual `atlalign` package!

#### Installation from PyPI
The `atlalign` package can be easily installed from PyPI.
```shell script
pip install atlalign
```

If you need to use the functionalities depending on the [TensorFlow implementation
of the Learned Perceptual Image Patch Similarity (LPIPS)](https://github.com/alexlee-gk/lpips-tensorflow),
you should use instead:
```shell script
pip install 'atlalign[lpips]'
```

#### Installation from source
As an alternative to installing from PyPI, if you want to try the latest version
you can also install from source.
```shell script
pip install git+https://github.com/BlueBrain/atlas_alignment#egg=atlalign
pip install 'git+https://github.com/BlueBrain/atlas_alignment#egg=atlalign'
```

or, to include the LPIPS dependency:
```shell script
pip install 'git+https://github.com/BlueBrain/atlas_alignment#egg=atlalign[lpips]'
```


#### Installation for development
If you want a dev install, you should install the latest version from source with
all the extra requirements for running test and generating docs.
```shell script
git clone https://github.com/BlueBrain/atlas_alignment
cd atlas_alignment
pip install -e .[dev,docs]
pip install -e '.[dev,docs,lpips]'
```

### Examples
Expand Down
32 changes: 17 additions & 15 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@ The project is only available for **Python 3.7**. The main reason for this
restriction is an external dependency **ANTsPy** that does
not provide many precompiled wheels on PyPI.

External Dependencies
---------------------
Some of the functionalities of :code:`atlalign` depend on the
`TensorFlow implementation of the Learned Perceptual Image Patch Similarity <https://github.com/alexlee-gk/lpips-tensorflow>`_.
Unfortunately, the
package is not available on PyPI and must be installed manually as follows.

.. code-block:: bash

pip install git+http://github.com/alexlee-gk/lpips-tensorflow.git#egg=lpips_tf

You can now move on to installing the actual `atlalign` package!

Installation from PyPI
----------------------
The :code:`atlalign` package can be easily installed from PyPI.
Expand All @@ -31,14 +18,28 @@ The :code:`atlalign` package can be easily installed from PyPI.

pip install atlalign

If you need to use the functionalities depending on the
`TensorFlow implementation of the Learned Perceptual Image Patch Similarity <https://github.com/alexlee-gk/lpips-tensorflow>`_,
you should use instead:

.. code-block:: bash

pip install 'atlalign[lpips]'

Installation from source
------------------------
As an alternative to installing from PyPI, if you want to try the latest version
you can also install from source.

.. code-block:: bash

pip install git+https://github.com/BlueBrain/atlas_alignment#egg=atlalign
pip install 'git+https://github.com/BlueBrain/atlas_alignment#egg=atlalign'

or, to include the LPIPS dependency:

.. code-block:: bash

pip install 'git+https://github.com/BlueBrain/atlas_alignment#egg=atlalign[lpips]'

Development installation
------------------------
Expand All @@ -47,12 +48,13 @@ following way:

- **dev** - pytest + plugins, flake8, pydocstyle, tox
- **docs** - sphinx
- **lpips** - lpips

.. code-block:: bash

git clone https://github.com/BlueBrain/atlas_alignment
cd atlas_alignment
pip install -e .[dev,docs]
pip install -e '.[dev,docs,lpips]'


Generating documentation
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
"pytest-mock>=1.10.1",
],
"docs": ["sphinx>=1.3", "sphinx-bluebrain-theme"],
"lpips": [
"lpips_tf@git+https://github.com/alexlee-gk/lpips-tensorflow.git#egg=lpips_tf",
],
},
entry_points={"console_scripts": ["label-tool = atlalign.label.cli:main"]},
)
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ envlist =

[testenv]
download = true
deps =
lpips_tf @ git+http://github.com/alexlee-gk/lpips-tensorflow.git#egg=lpips_tf
extras =
lpips
dev
commands =
pytest {posargs:tests}
Expand Down