Skip to content

Commit 467d30b

Browse files
authored
Move to src/irspack layout & always use relative import (#104)
* move to src/ layout * modify setup.py * Fix test * revert wheels.yml
1 parent f466462 commit 467d30b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+110
-114
lines changed

.github/workflows/run-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: |
2323
pip install pytest pytest-mock pytest-cov
2424
pip install lightfm jaxlib jax dm-haiku optax
25-
pytest --cov=./irspack tests/
25+
pytest --cov=./src/irspack tests/
2626
- name: Generate coverage (ubuntu)
2727
run: |
2828
coverage xml

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
types:
88
- created
99
env:
10-
cibuildwheel_version: "2.2.2"
10+
cibuildwheel_version: "2.7.0"
1111
jobs:
1212
build_sdist:
1313
name: Build source distribution

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ temp/*
88
**.log
99
**.csv
1010
**.db
11-
irspack.egg-info/*
11+
src/irspack.egg-info/*
1212
**.so
1313
.eggs/
1414
.python-version

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,14 @@ def local_scheme(version: Any) -> str:
7979
}, # https://github.com/pypa/setuptools_scm/issues/342
8080
author="Tomoki Ohtsuki",
8181
author_email="tomoki.otsuki129@gmail.com",
82-
description="Implicit feedback-based recommender system pack",
82+
description="Implicit feedback-based recommender systems, packed for practitioners.",
8383
long_description=LONG_DESCRIPTION,
8484
long_description_content_type="text/markdown",
8585
ext_modules=ext_modules,
8686
install_requires=install_requires,
8787
include_package_data=True,
8888
cmdclass={"build_ext": build_ext},
89-
packages=find_packages(),
90-
python_requires=">=3.6",
89+
packages=find_packages("src"),
90+
python_requires=">=3.7",
91+
package_dir={"": "src"},
9192
)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# package is not installed
77
pass # pragma: no cover
88

9-
from irspack.definitions import DenseScoreArray, InteractionMatrix, UserIndexArray
10-
from irspack.evaluation import *
11-
from irspack.recommenders import *
12-
from irspack.split import *
13-
from irspack.utils import *
9+
from .definitions import DenseScoreArray, InteractionMatrix, UserIndexArray
10+
from .evaluation import *
11+
from .recommenders import *
12+
from .split import *
13+
from .utils import *

0 commit comments

Comments
 (0)