Skip to content

Commit a875548

Browse files
authored
Merge pull request #8 from thunderock/ashutosh/fix_repo_setup
trying to induce new life to this repo
2 parents 8b56c6d + f38ceb4 commit a875548

File tree

18 files changed

+47
-18
lines changed

18 files changed

+47
-18
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ repos:
1919
hooks:
2020
- id: ruff
2121
args: [ --fix ]
22+
23+
- repo: https://github.com/pre-commit/mirrors-isort
24+
rev: v5.10.1
25+
hooks:
26+
- id: isort

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"ms-python.mypy-type-checker",
1010
"eamodio.gitlens",
1111
"ms-vscode.makefile-tools",
12+
"ms-python.isort",
1213
]
1314
}

.vscode/settings.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242

4343
// ==== Linting ===
4444
// linter
45-
"flake8.enabled" : false,
4645
"isort.enabled" : false,
4746
"ruff.enable": true,
4847
"ruff.lint.args": [
@@ -66,14 +65,12 @@
6665

6766
// === Integrated terminal ====
6867
"terminal.integrated.profiles.linux": {
69-
// Ensure the default integrated terminal (bash) respects .bash_profile
70-
// https://superuser.com/questions/1209366/win10-vs-code-integrated-bash-not-loading-bash-profile
7168
"bash": {
7269
"path": "bash",
7370
"args": ["--init-file", "${workspaceFolder}/.vscode/start-terminal.sh"],
7471
},
7572
},
76-
73+
"terminal.integrated.defaultProfile.linux": "bash",
7774
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
7875
"python.envFile": "${workspaceFolder}/.env",
7976

.vscode/start-terminal.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
echo "Init vscode integrated terminal"
44

55
ENV_FILE=".env"
6-
VENV_DIR=".venv/bin/activate"
6+
VENV_DIR="./.venv/bin/activate"
77

88
if test -f ~/.bash_profile; then
99
echo "Running ~/.bash_profile"

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ endif
2727
format:
2828
@echo "formatting..."
2929
@poetry install
30+
# add isort
31+
@poetry run isort .
3032
@poetry run black .
31-
# ruff fix
3233
@poetry run pre-commit run --all-files --config .pre-commit-config.yaml
3334

3435
.PHONY: run_tests

graph_ml/_ext/Trie.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# distutils: language = c++
22

3-
from libcpp.string cimport string
43
from libcpp.list cimport list
4+
from libcpp.string cimport string
55

66

77
cdef extern from "Trie.cpp":

graph_ml/_ext/cytrie.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from Trie cimport Trie
44

5+
56
cdef class CyTrie:
67
cdef Trie c_trie;
78

graph_ml/datasets/polbooks.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import pandas as pd
21
import networkx as nx
2+
import pandas as pd
33
from torch_geometric.data import extract_zip
44

5-
65
from ..datasets import dataset
76

87

graph_ml/models/torch_node2vec.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import numpy as np
2-
from torch_geometric.nn import Node2Vec as PyGNode2Vec
32
import torch
3+
from torch_geometric.nn import Node2Vec as PyGNode2Vec
4+
45
from ..models.node2vec import Node2Vec
56

67

graph_ml/transformations/sampler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import random
12
from typing import Optional
3+
24
import numpy as np
35
import pytorch_lightning as pl
4-
import random
6+
57
from ..utils import utils
68

79

0 commit comments

Comments
 (0)