Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the packaging to use pyproject.toml #6

Merged
merged 3 commits into from
May 3, 2024
Merged
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
13 changes: 13 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#########################
# Flake8 Configuration #
# (.flake8) #
#########################
[flake8]
ignore =
# line too long
E501
# line break before binary operator
W503
# whitespace before ':'
E203
max-line-length = 90
2 changes: 1 addition & 1 deletion dev
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def cli(*args: Any, **kwargs: Any) -> Callable[[T], T]:

# Commands

PYTHON_ROOTS = ["kg_topology_toolbox", "tests", "dev", "setup.py"]
PYTHON_ROOTS = ["src/kg_topology_toolbox", "tests", "dev"]


@cli("-k", "--filter")
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
sys.path.insert(0, os.path.abspath("../../src/"))

# Configuration file for the Sphinx documentation builder.
#
Expand Down
84 changes: 84 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "kg-topology-toolbox"
version = "0.1.0"
authors = [
{name = "Alberto Cattaneo"},
{name = "Daniel Justus"},
{name = "Thomas Martynec"},
{name = "Stephen Bonner"},
]
description = "A Python toolbox for Knowledge Graph topology metrics."
readme = "README.md"
license = {text = "MIT License"}
requires-python = ">=3.8"
dependencies = [
'numpy >= 1.24.4',
'pandas >= 2.0.3',
'scipy >= 1.10.1',
]

[project.optional-dependencies]
dev = [
'black',
'flake8',
'isort',
'mypy',
'pandas-stubs >= 2.0.3.230814',
'pytest >= 8.1.1',
'pytest-cov',
'sphinx >= 7.1.2',
'sphinx_rtd_theme',
'sphinx_autodoc_typehints',
'sphinx-automodapi',
'myst-parser',
]

[project.urls]
repository = "https://github.com/graphcore-research/kg-topology-toolbox"

[tool.setuptools.packages.find]
where = ["src"]
exclude = ["tests"]
namespaces = true

[tool.black]
target-version = ["py38", "py39", "py310", "py311"]

[tool.isort]
profile = "black"

[tool.mypy]
pretty = true
show_error_codes = true
strict = true
check_untyped_defs = true
plugins = ["numpy.typing.mypy_plugin"]

[[tool.mypy.overrides]]
module = "scipy.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "setuptools.*"
ignore_missing_imports = true

[tool.pytest]
addopts = ["--no-cov-on-fail"]

[tool.pytest.ini_options]
pythonpath = [
"src"
]

[tool.coverage.report]
skip_covered = true
show_missing = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"assert False",
]
35 changes: 0 additions & 35 deletions setup.cfg

This file was deleted.

13 changes: 0 additions & 13 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
Loading