From 251e28f399fd2c9f17a0fee8b2b421c2191b1502 Mon Sep 17 00:00:00 2001 From: oriyalperin Date: Thu, 2 Nov 2023 10:37:26 +0200 Subject: [PATCH] Update settings --- .github/workflows/test.yml | 4 +- networkz/__init__.py | 5 +- pyproject.toml | 104 +++++++++++++++++++++++++++++++++++-- requirements/default.txt | 3 +- 4 files changed, 108 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d78ee93..ebb5036 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,7 @@ jobs: - name: Test NetworkZ run: | - pytest --durations=10 + pytest --durations=10 --pyargs networkz default: runs-on: ${{ matrix.os }}-latest @@ -128,7 +128,7 @@ jobs: os: [ubuntu, macos] python-version: ["3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: diff --git a/networkz/__init__.py b/networkz/__init__.py index 0c3469b..c4dc96e 100644 --- a/networkz/__init__.py +++ b/networkz/__init__.py @@ -1,6 +1,8 @@ from networkx import * import os +__version__ = "1.0.6" + # Get the current directory of the __init__.py file current_directory = os.path.dirname(__file__) @@ -8,5 +10,4 @@ __path__.append(os.path.join(current_directory, 'algorithms')) from networkz import algorithms -from networkz.algorithms import * - +from networkz.algorithms import * \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 10d94d0..608c566 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,104 @@ requires = ["setuptools>=46.4.0", "wheel"] build-backend = "setuptools.build_meta" -[tool.pytest.ini_options] -minversion = "6.0" -addopts = "--doctest-modules " \ No newline at end of file +[project] +name = 'networkz' +description = 'Extended Graph-Algorithms Library on Top of NetworkX' +readme = 'README.MD' +requires-python = '>=3.8' +dynamic = ['version'] +keywords = [ + 'Networks', + 'Graph Theory', + 'Mathematics', + 'network', + 'graph', + 'discrete mathematics', + 'math', +] + +dependencies = [ + "networkx", +] + +[[project.authors]] +name = 'Ariel University' +email = 'networkz@csariel.xyz' + +[[project.maintainers]] +name = 'NetworkZ Developers' +email = 'networkz-discuss@googlegroups.com' + +[project.urls] +"Source Code" = 'https://github.com/ariel-research/networkz' + +[project.optional-dependencies] +default = [ + 'networkx', + 'numpy>=1.22', + 'scipy>=1.9,!=1.11.0,!=1.11.1', +] +developer = [ + 'changelist==0.4', + 'pre-commit>=3.2', + 'mypy>=1.1', + 'rtoml', +] +extra = [ + 'lxml>=4.6', + 'pygraphviz>=1.11', + 'pydot>=1.4.2', + 'sympy>=1.10', +] +test = [ + 'pytest>=7.2', + 'pytest-cov>=4.0', +] + +[tool.setuptools] +zip-safe = false +include-package-data = false +packages = [ + 'networkz', + 'networkz.algorithms', + 'networkz.algorithms.bipartite', + 'networkz.algorithms.approximation', + 'networkz.classes', + 'networkz.generators', + 'networkz.drawing', + 'networkz.linalg', + 'networkz.readwrite', + 'networkz.tests', + 'networkz.utils', +] +platforms = [ + 'Linux', + 'Mac OSX', + 'Windows', + 'Unix', +] + +[tool.setuptools.dynamic.version] +attr = 'networkz.__version__' + + +[tool.setuptools.package-data] +networkz = ['tests/*.py'] +"networkz.algorithms" = ['tests/*.py'] +"networkz.algorithms.bipartite" = ['tests/*.py'] +"networkz.algorithms.approximation" = ['tests/*.py'] + +[tool.ruff] +line-length = 88 +target-version = 'py39' +select = [ + 'I', +] + +[tool.ruff.per-file-ignores] +"__init__.py" = ['I'] + + +[tool.mypy] +ignore_missing_imports = true +exclude = 'subgraphviews|reportviews' diff --git a/requirements/default.txt b/requirements/default.txt index 95257cb..205c33f 100644 --- a/requirements/default.txt +++ b/requirements/default.txt @@ -1,2 +1,3 @@ networkx - +numpy>=1.22 +scipy>=1.9,!=1.11.0,!=1.11.1