Skip to content

Commit

Permalink
Made package installable
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentStimper committed Jan 28, 2020
1 parent f0c2dae commit 7d0e56e
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 2 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include README.md
include requirements.txt
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# normalizing-flows
Pytorch implementation of normalizing flows
# Variational Inference with Normalizing Flows

## Introduction

This is a Pytorch implementation of normalizing flows.


## Installation

You can install `normflow` directly using pip:
```
pip install --upgrade git+https://github.com/VincentStimper/normalizing-flows.git
```
Alternatively, you can first download or clone the repository on your computer via
```
git clone https://github.com/VincentStimper/normalizing-flows.git
```
then navigate into the folder and install it via
```
pip install --upgrade .
```
or run
```
python setup.py install
```
6 changes: 6 additions & 0 deletions normflow/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-

from .core import *

__version__ = '0.1'
2 changes: 2 additions & 0 deletions normflow/core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test():
print('Works!')
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
numpy
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[bdist_wheel]
universal=1

[metadata]
description-file=README.md
40 changes: 40 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from setuptools import setup, find_packages
from codecs import open
from os import path

__version__ = '0.1'

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

# get the dependencies and installs
with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
all_reqs = f.read().split('\n')

install_requires = [x.strip() for x in all_reqs if 'git+' not in x]
dependency_links = [x.strip().replace('git+', '') for x in all_reqs if x.startswith('git+')]

setup(
name='normflow',
version=__version__,
description='Pytorch implementation of normalizing flows',
long_description=long_description,
url='https://github.com/VincentStimper/normflow',
download_url='https://github.com/VincentStimper/normflow/tarball/' + __version__,
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
],
keywords='',
packages=find_packages(exclude=['docs', 'tests*']),
include_package_data=True,
author=['Vincent Stimper', 'Lukas Ryll', 'David'],
install_requires=install_requires,
dependency_links=dependency_links,
author_email=''
)

0 comments on commit 7d0e56e

Please sign in to comment.