Skip to content

Commit

Permalink
Bugfix/readme error (#4)
Browse files Browse the repository at this point in the history
* test and fix readme

* try trigger pipeline in non master branch

* fix readme

* remove poetry lock file

* fix readme

* remove poetry lock file

* try a bit

* try remote testing

* try again

* add back tox

* remove tol.ini

* round up

* fix readme

* remove poetry lock file

* try a bit

* try remote testing

* try again

* add back tox

* remove tol.ini

* round up
  • Loading branch information
zhuyuecai authored Oct 31, 2021
1 parent b0f705d commit b1193d1
Show file tree
Hide file tree
Showing 7 changed files with 277 additions and 73 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@


[![pypi](https://img.shields.io/pypi/v/spiral-core.svg)](https://pypi.org/project/spiral-core/)
[![python](https://img.shields.io/pypi/pyversions/spiral-core.svg)](https://pypi.org/project/spiral-core/)
[![Build Status](https://github.com/mcgill-cpslab/spiral-core/actions/workflows/dev.yml/badge.svg)](https://github.com/mcgill-cpslab/spiral-core/actions/workflows/dev.yml)
[![codecov](https://codecov.io/gh/mcgill-cpslab/spiral-core/branch/main/graphs/badge.svg)](https://codecov.io/github/mcgill-cpslab/spiral-core)
[![python](https://img.shields.io/pypi/pyversions/spiral.svg)](https://pypi.org/project/spiral/)
[![Build Status](https://github.com/mcgill-cpslab/spiral/actions/workflows/dev.yml/badge.svg)](https://github.com/mcgill-cpslab/spiral/actions/workflows/dev.yml)
[![codecov](https://codecov.io/gh/mcgill-cpslab/spiral/branch/main/graphs/badge.svg)](https://codecov.io/github/mcgill-cpslab/spiral)



A tool to help building ML pipeline easier for non technical users.


* Documentation: <https://mcgill-cpslab.github.io/spiral-core>
* GitHub: <https://github.com/mcgill-cpslab/spiral-core>
* PyPI: <https://pypi.org/project/spiral-core/>
* Documentation: <https://mcgill-cpslab.github.io/spiral>
* GitHub: <https://github.com/mcgill-cpslab/spiral>
* PyPI: <https://pypi.org/project/spiral/>
* Free software: Apache-2.0


Expand Down
26 changes: 26 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import pathlib
import _pytest.pathlib


resolve_pkg_path_orig = _pytest.pathlib.resolve_package_path

# we consider all dirs in repo/ to be namespace packages
rootdir = pathlib.Path(__file__).parent.resolve()
namespace_pkg_dirs = [str(d) for d in rootdir.iterdir() if d.is_dir()]

# patched method
def resolve_package_path(path):
# call original lookup
result = resolve_pkg_path_orig(path)
if result is not None:
return result
# original lookup failed, check if we are subdir of a namespace package
# if yes, return the namespace package we belong to
for parent in path.parents:
if str(parent) in namespace_pkg_dirs:
return parent
return None

# apply patch
_pytest.pathlib.resolve_package_path = resolve_package_path

302 changes: 241 additions & 61 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ mkdocs-autorefs = {version = "^0.2.1", optional = true}
pre-commit = {version = "^2.12.0", optional = true}
toml = {version = "^0.10.2", optional = true}
bump2version = {version = "^1.0.1", optional = true}
torch = "^1.10.0"

[tool.poetry.extras]
test = [
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dgl
torch
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,3 @@ commands =

[options]
packages = find_namespace:
install_requires =
dgl==0.6.1
5 changes: 1 addition & 4 deletions spiral/core/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Main module."""

from dgl.nn.tensorflow import GraphConv


def func_t(a: int) -> int:
"""
Expand All @@ -13,5 +11,4 @@ def func_t(a: int) -> int:
Returns:
number: int
"""
a = GraphConv(2, 3)
return 5
return a

0 comments on commit b1193d1

Please sign in to comment.