Skip to content

Commit

Permalink
Update package information.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkawamoto committed Jan 26, 2017
1 parent 20bbb9b commit 34b7ba8
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 24 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
[![Release](https://img.shields.io/badge/release-0.9.5-brightgreen.svg)](https://github.com/rgmining/fraud-eagle/releases/tag/v0.9.5)
[![Japanese](https://img.shields.io/badge/qiita-%E6%97%A5%E6%9C%AC%E8%AA%9E-brightgreen.svg)](http://qiita.com/jkawamoto/items/d2284316cc37cd810bfd)

[![Logo](https://rgmining.github.io/fraud-eagle/_static/image.png)](https://rgmining.github.io/fraud-eagle/)

This package provides an implementation of Fraud Eagle algorithm.
This algorithm has been introduced by Leman Akoglu, *et al.* in
[ICWSM 2013](https://www.aaai.org/ocs/index.php/ICWSM/ICWSM13/paper/viewFile/5981/6338)
Expand Down
50 changes: 50 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Fraud Eagle Algorithm
=====================

| |GPLv3|
| |Build Status|
| |wercker status|
| |Code Climate|
| |Release|
| |Japanese|
|Logo|

| This package provides an implementation of Fraud Eagle algorithm.
| This algorithm has been introduced by Leman Akoglu, *et al.* in
| `ICWSM
2013 <https://www.aaai.org/ocs/index.php/ICWSM/ICWSM13/paper/viewFile/5981/6338>`__
See `the documents <https://rgmining.github.io/fraud-eagle/>`__ for more
information.

Installation
------------

Use ``pip`` to install this package.

::

pip install --upgrade rgmining-fraud-eagle

License
-------

| This software is released under The GNU General Public License Version
3,
| see `COPYING <COPYING>`__ for more detail.
.. |GPLv3| image:: https://img.shields.io/badge/license-GPLv3-blue.svg
:target: https://www.gnu.org/copyleft/gpl.html
.. |Build Status| image:: https://travis-ci.org/rgmining/fraud-eagle.svg?branch=master
:target: https://travis-ci.org/rgmining/fraud-eagle
.. |wercker status| image:: https://app.wercker.com/status/fb1061f0043991bf7609a198a96acbaf/s/master
:target: https://app.wercker.com/project/byKey/fb1061f0043991bf7609a198a96acbaf
.. |Code Climate| image:: https://codeclimate.com/github/rgmining/fraud-eagle/badges/gpa.svg
:target: https://codeclimate.com/github/rgmining/fraud-eagle
.. |Release| image:: https://img.shields.io/badge/release-0.9.5-brightgreen.svg
:target: https://github.com/rgmining/fraud-eagle/releases/tag/v0.9.5
.. |Japanese| image:: https://img.shields.io/badge/qiita-%E6%97%A5%E6%9C%AC%E8%AA%9E-brightgreen.svg
:target: http://qiita.com/jkawamoto/items/d2284316cc37cd810bfd
.. |Logo| image:: https://rgmining.github.io/fraud-eagle/_static/image.png
:target: https://rgmining.github.io/fraud-eagle/
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
networkx
numpy
-e git+https://github.com/rgmining/common#egg=rgmining-common-master
rgmining-common
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile --output-file requirements.txt requirements.in
#
decorator>=4.0.10 # via networkx
decorator>=4.0.11 # via networkx
networkx>=1.11
numpy>=1.11.1
-e git+https://github.com/rgmining/common#egg=rgmining-common-master
numpy>=1.12.0
rgmining-common>=0.9.0
35 changes: 15 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# setup.py
#
# Copyright (c) 2016 Junpei Kawamoto
# Copyright (c) 2016-2017 Junpei Kawamoto
#
# This file is part of rgmining-fraud-eagle.
#
Expand All @@ -16,51 +16,46 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Foobar. If not, see <http://www.gnu.org/licenses/>.
# along with rgmining-fraud-eagle. If not, see <http://www.gnu.org/licenses/>.
#
# pylint: skip-file
"""Package information of fraud_eagle package for review graph mining project.
"""
from setuptools import setup, find_packages


def take_package_name(name):
"""Returns a package name.
def read(fname):
"""Read a file.
"""
if name.startswith("-e"):
return name[name.find("=")+1:name.rfind("-")]
else:
return name.strip()
return open(path.join(path.dirname(__file__), fname)).read()


def load_requires_from_file(filepath):
"""Read a package list from a given file path.
"""
with open(filepath) as fp:
return [take_package_name(pkg_name) for pkg_name in fp.readlines()]
Args:
filepath: file path of the package list.
def load_links_from_file(filepath):
"""Read a package list and returns links.
Returns:
a list of package names.
"""
res = []
with open(filepath) as fp:
for pkg_name in fp.readlines():
if pkg_name.startswith("-e"):
res.append(pkg_name.split(" ")[1])
return res
return [pkg_name.strip() for pkg_name in fp.readlines()]


setup(
name='rgmining-fraud-eagle',
version='0.9.5',
use_scm_version=True,
author="Junpei Kawamoto",
author_email="kawamoto.junpei@gmail.com",
description="An implementation of Fraud Eagle algorithm",
long_description=read("README.rst"),
url="https://github.com/rgmining/frad-eagle",
packages=find_packages(exclude=["tests"]),
setup_requires=[
"setuptools_scm"
],
install_requires=load_requires_from_file("requirements.txt"),
dependency_links=load_links_from_file("requirements.txt"),
test_suite='tests.suite',
license="GPLv3",
classifiers=[
Expand Down

0 comments on commit 34b7ba8

Please sign in to comment.