Skip to content

Commit

Permalink
make ready for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
imagirom committed Nov 11, 2019
1 parent d70c5f8 commit 4bab5fd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Documentation Status](https://readthedocs.org/projects/firelight/badge/?version=latest)](https://firelight.readthedocs.io/en/latest/?badge=latest)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/firelight.svg)](https://anaconda.org/conda-forge/firelight)
[![PyPI version](https://badge.fury.io/py/firelight.svg)](https://badge.fury.io/py/firelight)

Firelight is a visualization library for pytorch.
Its core object is a **visualizer**, which can be called passing some states (such as `inputs`, `target`,
Expand All @@ -20,7 +21,7 @@ Why you will keep using firelight:

## Installation

### From source (recommended to get the newest version)
### From source (to get the most recent version)
On python 3.6+:

```bash
Expand All @@ -30,13 +31,20 @@ cd firelight/
# Install
python setup.py install
```
### From conda
### Using conda

Firelight is available on conda-forge for python > 3.6 and all operating systems:
```bash
conda install -c pytorch -c conda-forge firelight
```

### Using pip

In an environment with [scikit-learn](https://scikit-learn.org/stable/install.html) installed:
```bash
pip install firelight
```

## Example

- Run the example `firelight/examples/example_data.py`
Expand Down Expand Up @@ -111,7 +119,7 @@ plt.imsave('visualizations/example_visualization.jpg', image_grid.numpy())

Resulting visualization:

![Example Image Grid](examples/example_visualization.png)
![Example Image Grid](https://raw.githubusercontent.com/inferno-pytorch/firelight/master/examples/example_visualization.png)

Many more visualizers are available. Have a look at [visualizers.py](/firelight/visualizers/visualizers.py ) and [container_visualizers.py](/firelight/visualizers/container_visualizers.py) or, for a more condensed list, the imports in [config_parsing.py](/firelight/config_parsing.py).

Expand Down
2 changes: 1 addition & 1 deletion firelight/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .config_parsing import get_visualizer

__version__ = '0.2.0'
__version__ = '0.2.1'
16 changes: 14 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
"""

import setuptools
import os

def read_file(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()

setuptools.setup(
name="firelight",
author="Roman Remme",
author_email="[email protected]",
description="A visualization library for PyTorch tensors.",
version="0.2.0",
long_description=read_file('README.md'),
long_description_content_type='text/markdown',
url='https://github.com/inferno-pytorch/firelight',
version="0.2.1",
install_requires=[
"pyyaml>=3.12",
"matplotlib",
Expand All @@ -20,8 +27,13 @@
"torch",
],
extras_requires={
'umap': ['umap-learn>=0.3.8'],
'umap': ['umap-learn>=0.3.8'],
},
license="Apache Software License 2.0",
packages=setuptools.find_packages(),
classifiers=[
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
]
)

0 comments on commit 4bab5fd

Please sign in to comment.