Skip to content

Commit

Permalink
Remove setup.py in favor of pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
rafguns committed Nov 29, 2024
2 parents 40bf8c8 + 6dec2c6 commit bf92268
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 56 deletions.
14 changes: 6 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ Linkpred

While some predictors are fairly straightforward (e.g., if two people have a large number of mutual friends, it seems likely that eventually they will meet and become friends), others are more involved.

.. image:: https://img.shields.io/github/actions/workflow/status/rafguns/linkpred/tox.yml
.. image:: https://img.shields.io/codecov/c/github/rafguns/linkpred/master

Linkpred can both be used as a command-line tool and as a Python library in your own code.
.. image:: https://codecov.io/gh/rafguns/linkpred/branch/master/graph/badge.svg?token=JVZIVHWJXY
:target: https://codecov.io/gh/rafguns/linkpred
**linkpred** can both be used as a command-line tool and as a Python library in your own code.


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

The latest release version of Linkpred (v0.5.1) works under Python 3.6, 3.7, and 3.8. Current master branch supports Python versions 3.8 to 3.11.

Linkpred depends on:
**linkpred** (v0.6 and later) works under Python 3.8 to 3.11.
It depends on:

- matplotlib
- networkx
Expand All @@ -33,7 +31,7 @@ You should be able to install Linkpred and its dependencies using pip (``pip ins
If you do not yet have Python installed, I recommend starting with `Anaconda <https://www.continuum.io/downloads>`_,
which includes optimized versions of packages like numpy.
If you want to use the Community predictor, which relies on community structure of the network,
make sure you also have the `python-louvain <https://github.com/taynaud/python-louvain>`_ package by installing with ``pip install linkpred[all]``.
make sure you also have the `python-louvain <https://github.com/taynaud/python-louvain>`_ package by installing with ``pip install linkpred[community]``.


Example usage as command-line tool
Expand Down
4 changes: 2 additions & 2 deletions linkpred/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""linkpred, a Python module for link prediction"""
"""linkpred, a Python package for link prediction"""
from .linkpred import *

__version__ = "0.2"
__version__ = "0.6"
47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "linkpred"
authors = [{name = "Raf Guns", email = "raf.guns@uantwerpen.be"}]
readme = "README.rst"
dynamic = ["version", "description"]
classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Development Status :: 4 - Beta",
"Natural Language :: English",
"Operating System :: OS Independent",
]
requires-python=">=3.8"
dependencies = [
"matplotlib>=3.5",
"networkx>=3.0",
"numpy>=1.23",
"pyyaml>=3.0",
"scipy>=1.10",
"smokesignal>=0.7",
]

[project.scripts]
linkpred = "linkpred.cli:main"

[project.optional-dependencies]
dev = ["pytest >=7.1", "pytest-cov", "tox>=4.4"]
community = ["python-louvain"]
all = ["pytest >=7.1", "pytest-cov", "tox>=4.4", "python-louvain"]

[project.urls]
Home = "https://github.com/rafguns/linkpred/"

[tool.flit.module]
name = "linkpred"

[tool.ruff]
target-version = "py38"
# See https://beta.ruff.rs/docs/rules/
Expand Down
46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

0 comments on commit bf92268

Please sign in to comment.