Skip to content

Commit abf77fb

Browse files
authored
Cleanup configs (#58)
* Move flake8 config into tox.ini * Remove W503 ignore as it is defaulted to be set * Fix tox.ini typo, create pyproject.toml * Remove reorder-python-imports
1 parent 9a43e81 commit abf77fb

File tree

7 files changed

+22
-31
lines changed

7 files changed

+22
-31
lines changed

.flake8

-21
This file was deleted.

.pre-commit-config.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
repos:
2-
- repo: https://github.com/asottile/reorder_python_imports
3-
rev: v2.6.0
4-
hooks:
5-
- id: reorder-python-imports
6-
72
- repo: https://github.com/pre-commit/pre-commit-hooks
83
rev: v4.0.1
94
hooks:

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=42.0", "wheel"]
3+
build-backend = "setuptools.build_meta"

src/pecanpy/pecanpy.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Different strategies for generating node2vec walks."""
2-
32
import numpy as np
43
from gensim.models import Word2Vec
54
from numba import njit, prange

src/pecanpy/rw/dense_rw.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Dense Graph object equipped with random walk computation."""
2-
32
import numpy as np
43
from numba import njit
54
from pecanpy.graph import DenseGraph
@@ -96,7 +95,8 @@ def get_extended_normalized_probs(
9695
# print("NUM INOUT: ", inout_ind.sum(), "\n")
9796

9897
t = prev_nbrs_weight[inout_ind] / average_weight_ary[inout_ind]
99-
# b = 1; t = b * t / (1 - (b - 1) * t) # optional nonlinear parameterization
98+
# optional nonlinear parameterization
99+
# b = 1; t = b * t / (1 - (b - 1) * t)
100100

101101
# compute out biases
102102
alpha = 1 / q + (1 - 1 / q) * t

src/pecanpy/rw/sparse_rw.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Sparse Graph equipped with random walk computation."""
2-
32
import numpy as np
43
from numba import boolean, njit
54
from pecanpy.graph import SparseGraph

tox.ini

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
minversion = 3.8.0
33
envlist = python3.8, python3.9, flake8
4-
isolated_buiold = true
4+
isolated_build = true
55

66
[gh-actions]
77
python =
@@ -39,3 +39,19 @@ description = Run the flake8 tool with several plugins (bandit, docstrings, impo
3939
[flake8]
4040
max-line-length = 88
4141
extend-ignore = E203
42+
exclude =
43+
.tox,
44+
.git,
45+
__pycache__,
46+
build,
47+
dist,
48+
*.pyc,
49+
*.egg-info,
50+
.cache,
51+
.eggs
52+
import-order-style = pycharm
53+
application-import-names =
54+
pybel
55+
bel_resources
56+
tests
57+
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s

0 commit comments

Comments
 (0)