Skip to content
Open
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
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test

on: [push, pull_request]

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: ["3.10", "3.11"]
runs-on: ${{matrix.os}}
defaults:
run:
working-directory: ${{github.workspace}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{matrix.version}}
- run: python -m pip install --upgrade pip build
- run: python -m build .
- run: python -m pip install '.[tests]'
- run: pytest test/
10 changes: 2 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,9 @@ dmypy.json

# Pyre type checker
.pyre/
docs/.DS_Store
notebooks/.DS_Store
src/spotRiver/data/.DS_Store
src/spotRiver/.DS_Store
src/spotRiver/fun/.DS_Store
test/.DS_Store
src/.DS_Store
spotRiver.code-workspace
.DS_Store
spotRiver.code-workspace
notebooks/data/opm_2001-2020.csv
notebooks/opm.csv
notebooks/opm_cat.csv
src/spotRiver/_version.py
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

31 changes: 18 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
[build-system]
requires = ["scipy",
"setuptools>=61.0",
"graphviz",
"numpy",
"scikit-learn",
"matplotlib"]
requires = [
"setuptools>=61.0",
"setuptools_scm[toml]",
]
build-backend = "setuptools.build_meta"

[project]
name = "spotRiver"
version = "0.0.10"
authors = [
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
]
Expand All @@ -21,19 +18,20 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
]
# PEP 621 dependencies declaration
# adapt to your dependencies manager
dependencies = [
"mkdocstrings-python"
"numpy",
"river >= 0.15.0",
"pytest [tests]",
"spotPython [docs] >= 0.0.2",
]
dynamic=["version"]

[project.urls]
"Homepage" = "https://www.spotseven.de"
Issues = "https://github.com/sequential-parameter-optimization/spotRiver/issues"
Repository = "https://github.com/sequential-parameter-optimization/spotRiver"

[tool.setuptools]
# ...
# By default, include-package-data is true in pyproject.toml, so you do
# NOT have to specify this line.
include-package-data = true

[tool.setuptools.packages.find]
Expand All @@ -43,3 +41,10 @@ where = ["src"]
line-length = 120
target-version = ["py310"]

[tool.setuptools_scm]
write_to = "src/spotRiver/_version.py"

[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
]
4 changes: 4 additions & 0 deletions src/spotRiver/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
try:
from ._version import __version__
except ModuleNotFoundError:
__version__ = "0.0.0dev"
Binary file removed src/spotRiver/data/synth/.DS_Store
Binary file not shown.
Empty file added src/spotRiver/fun/__init__.py
Empty file.
Empty file added src/spotRiver/utils/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions test/test_features.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from spotRiver import data
from spotPython.utils.features import get_hour_distances, get_month_distances, get_ordinal_date, get_weekday_distances
from spotRiver.utils.features import get_hour_distances, get_month_distances, get_ordinal_date, get_weekday_distances


def test_features():
Expand All @@ -13,4 +13,4 @@ def test_features():
assert(get_hour_distances(x)["0"] == 1.0)
assert(get_weekday_distances(x)["Saturday"] == 1.0)
assert(get_month_distances(x)["January"] == 1.0)
break
break