Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install package and dev dependencies
run: pip install -e ".[dev]"

- name: Run tests
run: pytest tests/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ X = np.random.rand(1000, 128)
y = np.random.randint(0, 10, (1000,))

n_splits = 3
s = SimilarityStratifiedSplit(n_splits, get_distances)
s = SimilarityStratifiedSplit(n_splits, dist_func=get_distances)

for train_index, test_index in s.split(X, y):
print(f"Train indices: {train_index}\nTest indices: {test_index}")
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
url="https://github.com/timothyckl/similarity-stratified-split",
author="timothyckl",
author_email="timothy.ckl@outlook.com",
license="",
license="MIT",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
"Operating System :: OS Independent"
],
install_requires=["numpy==1.23.5"],
extra_require={
"dev": ["pytest==7.4.3"]
install_requires=["numpy>=1.23.5"],
extras_require={
"dev": ["pytest==7.4.3", "scipy"]
},
python_require=">=3.9"
python_requires=">=3.9"
)