Skip to content

Commit

Permalink
Bump supported and testes Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCentauri committed May 3, 2024
1 parent d5d2d74 commit bd54517
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ coverage:
default:
target: 90%

comment: off
comment: false
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install tox
python-version: "3.12"

- name: install tests dependencies
run: python -m pip install tox

- name: Test build integrity
run: tox -e build
10 changes: 6 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: install dependencies
run: |
python -m pip install tox
python-version: "3.12"

- name: install tests dependencies
run: python -m pip install tox

- name: build documentation
run: tox -e docs
7 changes: 5 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install tox
python-version: "3.12"

- name: install tests dependencies
run: python -m pip install tox

- name: Lint the code
run: tox -e lint
19 changes: 5 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
python-version: "3.8"
- os: ubuntu-22.04
python-version: "3.11"
- os: macos-11
python-version: "3.8"
- os: macos-11
python-version: "3.11"
- os: windows-2019
python-version: "3.8"
- os: windows-2019
python-version: "3.11"
os: [ubuntu-22.04, macos-14, windows-2022]
python-version: ["3.9", "3.12"]

steps:
- uses: actions/checkout@v3
Expand All @@ -32,7 +21,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox

- name: install tests dependencies
run: python -m pip install tox

- name: run Python tests
run: tox -e tests
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
7 changes: 1 addition & 6 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ The rules for CHANGELOG file:

0.3.0 (XXXX/XX/XX)
------------------
- Supported Python versions are now ranging from 3.9 - 3.12.

0.2.0 (2023/08/24)
------------------

- Add this ``CHANGELOG`` file (#198)
- Update example of WHO feature selection (#212)
- Rename ``RidgeRegression2FoldCV`` -> ``Ridge2FoldCV`` (#211)
Expand All @@ -40,14 +40,12 @@ The rules for CHANGELOG file:

0.1.4 (2023/03/14)
------------------

- documentation formatting fixes for math and datasets (#161, #163)
- changing the way the distance to the convex hull is computed in the
``DirectionalConvexHull`` due to numerical issues with the old method (#165)

0.1.3 (2023/03/02)
------------------

- Refactor ``scikit-cosmo`` to ``scikit-matter`` (#157, #151)
- Deprecation warning was added to link to renamed package (#154)
- dropped Python `<3.8` support, because we are now using ``scikit-learn`` version
Expand All @@ -62,7 +60,6 @@ The rules for CHANGELOG file:

0.1.2 (2022/07/04)
------------------

- fixed a bug in the orthonormalization step of ``PCov-CUR`` (#118)
- users can now initialize ``FPS`` selecting using a list of selected points, allowing
to restart the selection in the middle (#116)
Expand All @@ -71,15 +68,13 @@ The rules for CHANGELOG file:

0.1.1 (2021/11/30)
------------------

- fixed a bug in the ``orthonormalization`` step of ``PCov-CUR`` (#118)
- users can now initialize ``FPS`` selecting using a list of selected points, allowing to
restart the selection in the middle (#116)
- KPCovR is now able to use pre-fitted regressor in the same way that ``PCovR`` can (#113)

0.1.0 (2021/05/12)
------------------

- first release out of the lab

.. inclusion-marker-changelog-end
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ authors = [
{name = "Michele Ceriotti"}
]
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {text = "BSD-3-Clause"}
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -31,10 +31,10 @@ classifiers = [
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pcovr.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def test_centering(self):
X = self.X.copy() + np.random.uniform(-1, 1, self.X.shape[1])
with warnings.catch_warnings(record=True) as w:
pcovr.fit(X, self.Y)
self.assertEquals(
self.assertEqual(
str(w[0].message),
"This class does not automatically center data, and your data mean is"
" greater than the supplied tolerance.",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sample_pcov_fps.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_no_mixing_1(self):

with self.assertRaises(ValueError) as cm:
_ = PCovFPS(n_to_select=1, mixing=1.0)
self.assertEquals(
self.assertEqual(
str(cm.exception),
"Mixing = 1.0 corresponds to traditional FPS." "Please use the FPS class.",
)
Expand Down
4 changes: 1 addition & 3 deletions tests/test_sample_simple_fps.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ def test_initialize(self):
with self.assertRaises(ValueError) as cm:
selector = FPS(n_to_select=1, initialize="bad")
selector.fit(self.X)
self.assertEquals(
str(cm.exception), "Invalid value of the initialize parameter"
)
self.assertEqual(str(cm.exception), "Invalid value of the initialize parameter")

def test_get_distances(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sparse_kernel_centerer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_new_kernel(self):
model = model.fit(Knm, Kmm)
with self.assertRaises(ValueError) as cm:
model.transform(Knm2)
self.assertEquals(
self.assertEqual(
str(cm.exception),
"The reference kernel and received kernel have different shape",
)
Expand Down
4 changes: 1 addition & 3 deletions tests/test_voronoi_fps.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ def test_initialize(self):
with self.assertRaises(ValueError) as cm:
selector = VoronoiFPS(n_to_select=1, initialize="bad")
selector.fit(self.X)
self.assertEquals(
str(cm.exception), "Invalid value of the initialize parameter"
)
self.assertEqual(str(cm.exception), "Invalid value of the initialize parameter")

def test_switching_point(self):
"""
Expand Down

0 comments on commit bd54517

Please sign in to comment.