Skip to content

Commit

Permalink
lint plus warnings as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCentauri committed Feb 13, 2025
1 parent 53ad7b8 commit 5101e66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/pcovr/PCovR-WHODataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
r_pcovr = Ridge(alpha=1e-4, fit_intercept=False, random_state=0).fit(
T_train_pcovr, y_train
)
yp_pcovr = r_pcovr.predict(T_test_pcovr).reshape(-1,1)
yp_pcovr = r_pcovr.predict(T_test_pcovr).reshape(-1, 1)

plt.scatter(y_scaler.inverse_transform(y_test), y_scaler.inverse_transform(yp_pcovr))
r_pcovr.score(T_test_pcovr, y_test)
Expand All @@ -128,7 +128,7 @@
T_pca = pca.transform(X)

r_pca = Ridge(alpha=1e-4, fit_intercept=False, random_state=0).fit(T_train_pca, y_train)
yp_pca = r_pca.predict(T_test_pca).reshape(-1,1)
yp_pca = r_pca.predict(T_test_pca).reshape(-1, 1)

plt.scatter(y_scaler.inverse_transform(y_test), y_scaler.inverse_transform(yp_pca))
r_pca.score(T_test_pca, y_test)
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ include_trailing_comma = true
lines_after_imports = 2
known_first_party = "skmatter"

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = ["--cov"]
filterwarnings = ["error"]

[tool.ruff]
exclude = ["docs/src/examples/"]
lint.ignore = [
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ deps =

commands =
# Run unit tests
pytest --cov {posargs}
pytest {posargs}

# Run documentation tests
pytest --doctest-modules --pyargs skmatter {posargs}
Expand Down

0 comments on commit 5101e66

Please sign in to comment.