Skip to content

Commit

Permalink
Merge pull request #260 from BCG-X-Official/dev/2.3rc0
Browse files Browse the repository at this point in the history
BUILD: release sklearndf 2.3rc0
  • Loading branch information
j-ittner authored Nov 14, 2023
2 parents 8335d8c + 50f3cc1 commit cde262d
Show file tree
Hide file tree
Showing 37 changed files with 270 additions and 247 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 22.8.0
rev: 23.10.1
hooks:
- id: black
language: python_venv
Expand Down Expand Up @@ -41,5 +41,5 @@ repos:
language: python_venv
language_version: python39
additional_dependencies:
- numpy~=1.22
- numpy~=1.24
- gamma-pytools~=2.1
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ To this end, *sklearndf* enhances scikit-learn's estimators as follows:
The following quickstart guide provides a minimal example workflow to get up and running
with *sklearndf*.
For additional tutorials and the API reference,
see the `sklearndf documentation <https://bcg-gamma.github.io/sklearndf/>`__.
see the `sklearndf documentation <https://bcg-x-official.github.io/sklearndf/>`__.
Changes and additions to new versions are summarized in the
`release notes <https://bcg-gamma.github.io/sklearndf/release_notes.html>`__.
`release notes <https://bcg-x-official.github.io/sklearndf/release_notes.html>`__.


Installation
Expand Down Expand Up @@ -243,20 +243,20 @@ Contributing

Contributions to *sklearndf* are welcome and appreciated.
For any bug reports or feature requests/enhancements please use the appropriate
`GitHub form <https://github.com/BCG-Gamma/sklearndf/issues>`_, and if you wish to do
`GitHub form <https://github.com/BCG-X-Official/sklearndf/issues>`_, and if you wish to do
so, please open a PR addressing the issue.

We do ask that for any major changes please discuss these with us first via an issue.

For further information on contributing please see our
`contribution guide <https://bcg-gamma.github.io/sklearndf/contribution_guide.html>`__.
`contribution guide <https://bcg-x-official.github.io/sklearndf/contribution_guide.html>`__.


License
-------

*sklearndf* is licensed under Apache 2.0 as described in the
`LICENSE <https://github.com/BCG-Gamma/sklearndf/blob/develop/LICENSE>`_ file.
`LICENSE <https://github.com/BCG-X-Official/sklearndf/blob/develop/LICENSE>`_ file.


Acknowledgements
Expand Down Expand Up @@ -284,7 +284,7 @@ or have a look at
.. |pypi| image:: https://badge.fury.io/py/sklearndf.svg
:target: https://pypi.org/project/sklearndf/

.. |azure_build| image:: https://dev.azure.com/gamma-facet/facet/_apis/build/status/BCG-Gamma.sklearndf?repoName=BCG-Gamma%2Fsklearndf&branchName=develop
.. |azure_build| image:: https://dev.azure.com/gamma-facet/facet/_apis/build/status/BCG-X-Official.sklearndf?repoName=BCG-X-Official%2Fsklearndf&branchName=develop
:target: https://dev.azure.com/gamma-facet/facet/_build?definitionId=8&_a=summary

.. |azure_code_cov| image:: https://img.shields.io/azure-devops/coverage/gamma-facet/facet/8/2.1.x
Expand All @@ -297,7 +297,7 @@ or have a look at
:target: https://github.com/psf/black

.. |made_with_sphinx_doc| image:: https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg
:target: https://bcg-gamma.github.io/sklearndf/index.html
:target: https://bcg-x-official.github.io/sklearndf/index.html

.. |license_badge| image:: https://img.shields.io/badge/License-Apache%202.0-olivegreen.svg
:target: https://opensource.org/licenses/Apache-2.0
Expand Down
16 changes: 16 additions & 0 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ Release Notes
.. |nbsp| unicode:: 0xA0
:trim:

*sklearndf* 2.3
---------------


2.3.0
~~~~~

*sklearndf* 2.3 adds support for
`scikit-learn 1.3 <https://scikit-learn.org/1.3>`_
and drops support for *scikit-learn* |nbsp| 0.24.

- API: add DF wrapper classe :class:`.HDBSCANDF` for native estimator
:class:`~sklearn.cluster.HDBSCAN`
- API: add DF wrapper class :class:`.TargetEncoderDF` for native estimator
:class:`~sklearn.preprocessing.TargetEncoder`


*sklearndf* 2.2
---------------
Expand Down
12 changes: 7 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
trigger:
- 2.2.x
- 2.3.x
- release/*

pr:
- 2.2.x
- 2.3.x
- release/*

pool:
Expand All @@ -24,8 +24,8 @@ resources:
repositories:
- repository: pytools
type: github
endpoint: BCG-Gamma
name: BCG-Gamma/pytools
endpoint: BCG-X-Official
name: BCG-X-Official/pytools
ref: 2.1.x

variables:
Expand Down Expand Up @@ -65,7 +65,7 @@ stages:
versionSpec: '3.9'
displayName: 'use Python 3.9'
- script: |
python -m pip install black~=22.8
python -m pip install black~=23.10.1
python -m black --check .
displayName: 'Run black'
- job:
Expand Down Expand Up @@ -655,6 +655,7 @@ stages:
cd $(System.DefaultWorkingDirectory)
echo "Checking out github-pages"
git fetch origin github-pages --depth=1
git checkout --track origin/github-pages
# make sure we have a docs directory
Expand All @@ -676,6 +677,7 @@ stages:
cd $(System.DefaultWorkingDirectory)
echo "Checking out $(branchName)"
git fetch origin $(branchName) --depth=1
git checkout $(branchName)
# install micromamba
Expand Down
8 changes: 4 additions & 4 deletions condabuild/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ test:
- pytest -vs test

about:
home: https://github.com/BCG-Gamma/sklearndf
home: https://github.com/BCG-X-Official/sklearndf
license: Apache Software License v2.0
license_file: LICENSE
description: |
sklearndf is an open source library designed to address a common need with
scikit-learn: the outputs of transformers are numpy arrays, even when the input
is a data frame. However, to inspect a model it is essential to keep track of
the feature names.
dev_url: https://github.com/BCG-Gamma/sklearndf
doc_url: https://bcg-gamma.github.io/sklearndf/
doc_source_url: https://github.com/BCG-Gamma/sklearndf/blob/develop/README.rst
dev_url: https://github.com/BCG-X-Official/sklearndf
doc_url: https://bcg-x-official.github.io/sklearndf/
doc_source_url: https://github.com/BCG-X-Official/sklearndf/blob/develop/README.rst
12 changes: 6 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ dependencies:
- matplotlib ~= 3.7
- numpy ~= 1.24
- pandas ~= 2.0
- pip ~= 23.0
- pip ~= 23.3
- python ~= 3.9
- scikit-learn ~= 1.2.0
- scipy ~= 1.10
- scipy ~= 1.11
- xgboost ~= 1.7
- pip:
- arfs ~= 1.1
Expand All @@ -27,8 +27,8 @@ dependencies:
- sphinx-autodoc-typehints ~= 1.19.2
- pydata-sphinx-theme ~= 0.8.1
# notebooks
- ipywidgets ~= 8.0
- jupyterlab ~= 3.5
- openpyxl ~= 3.0
- seaborn ~= 0.12
- ipywidgets ~= 8.1
- jupyterlab ~= 3.6
- openpyxl ~= 3.1
- seaborn ~= 0.13
- tableone ~= 0.7
4 changes: 2 additions & 2 deletions pypi_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ License
---------------------------

*sklearndf* is licensed under Apache 2.0 as described in the
`LICENSE <https://github.com/BCG-Gamma/sklearndf/blob/develop/LICENSE>`_ file.
`LICENSE <https://github.com/BCG-X-Official/sklearndf/blob/develop/LICENSE>`_ file.

.. Begin-Badges
Expand All @@ -40,7 +40,7 @@ License
:target: https://github.com/psf/black

.. |made_with_sphinx_doc| image:: https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg
:target: https://bcg-gamma.github.io/sklearndf/index.html
:target: https://bcg-x-official.github.io/sklearndf/index.html

.. |license_badge| image:: https://img.shields.io/badge/License-Apache%202.0-olivegreen.svg
:target: https://opensource.org/licenses/Apache-2.0
Expand Down
28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ exclude = [".idea", "tmp", "dist", ".tox", ".pytest_cache"]
[tool.flit.metadata]
module = "sklearndf"
author = "Boston Consulting Group (BCG)"
home-page = "https://github.com/BCG-Gamma/sklearndf"
home-page = "https://github.com/BCG-X-Official/sklearndf"
description-file = "pypi_description.rst"
dist-name = "sklearndf"
license = "Apache Software License v2.0"

requires = [
"gamma-pytools ~=2.1",
"numpy >=1.21", # cannot use ~= due to conda bug
"numpy >=1.21,<2a", # cannot use ~= due to conda bug
"packaging >=20",
"pandas >=1",
"scikit-learn >=0.24,<1.3a",
"scipy ~=1.4",
"scikit-learn >=1,<1.4a",
"scipy ~=1.6",
]

requires-python = ">=3.7,<4a"
Expand Down Expand Up @@ -61,8 +61,8 @@ docs = [
]

[tool.flit.metadata.urls]
Documentation = "https://bcg-gamma.github.io/sklearndf/"
Repository = "https://github.com/BCG-Gamma/sklearndf"
Documentation = "https://bcg-x-official.github.io/sklearndf/"
Repository = "https://github.com/BCG-X-Official/sklearndf"

[build]
# comma-separated list of packages to be built from source in pip min builds
Expand All @@ -73,12 +73,12 @@ no-binary.min = ["matplotlib"]
boruta = "~=0.3.0"
gamma-pytools = "~=2.1.0"
lightgbm = "~=3.0.0"
numpy = "==1.21.6" # cannot use ~= due to conda bug
numpy = "==1.21.6" # cannot use ~= due to conda bug
packaging = "~=20.9"
pandas = "~=1.1.5"
python = ">=3.7.12,<3.8a" # cannot use ~= due to conda bug
scipy = "~=1.4.1"
scikit-learn = "~=0.24.2"
python = ">=3.7.12,<3.8a" # cannot use ~= due to conda bug
scipy = "~=1.6.3"
scikit-learn = "~=1.0.2"
xgboost = "~=1.0.2"
# additional minimum requirements of gamma-pytools
joblib = "~=0.14.1"
Expand All @@ -90,12 +90,12 @@ typing_inspect = "~=0.4.0"
arfs = "~=1.1"
gamma-pytools = "~=2.1"
lightgbm = "~=3.3"
numpy = ">=1.23" # cannot use ~= due to conda bug
numpy = ">=1.24,<2a" # cannot use ~= due to conda bug
packaging = ">=20"
pandas = "~=2.0"
python = ">=3.9,<3.11a" # cannot use ~= due to conda bug; arfs <=1.0.7 does not support python >=3.11
scikit-learn = "~=1.1,<1.3a" # todo: replace with ~=1.2.0 once it is released
scipy = "~=1.8"
python = ">=3.11,<3.12a" # cannot use ~= due to conda bug
scikit-learn = "~=1.3.2"
scipy = "~=1.11"
xgboost = "~=1.5"
# additional maximum requirements of gamma-pytools
joblib = "~=1.1"
Expand Down
3 changes: 1 addition & 2 deletions sphinx/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@


if __name__ == "__main__":

# noinspection PyUnusedLocal
def run_make(branch: str, working_directory: str) -> None:
"""Stub, overwritten by bootstrap.py"""

# run the common make file available in the pytools repo
with request.urlopen(
f"https://raw.githubusercontent.com/BCG-Gamma/pytools/{BRANCH}"
f"https://raw.githubusercontent.com/BCG-X-Official/pytools/{BRANCH}"
f"/sphinx/base/bootstrap.py"
) as response:
exec(response.read().decode("utf-8"), globals())
Expand Down
2 changes: 1 addition & 1 deletion sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
html_logo=os.path.join("_images", "gamma_sklearndf_logo.png"),
intersphinx_mapping={
"lightgbm": ("https://lightgbm.readthedocs.io/en/latest/", None),
"pytools": ("https://bcg-gamma.github.io/pytools/", None),
"pytools": ("https://bcg-x-official.github.io/pytools/", None),
"sklearn": ("https://scikit-learn.org/stable", None),
"xgboost": ("https://xgboost.readthedocs.io/en/latest/", None),
},
Expand Down
4 changes: 2 additions & 2 deletions sphinx/source/contribution_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ The ``sphinx/source`` folder contains:


The two key scripts are ``make.py`` and ``conf.py``. The base configuration for the
these scripts can be found in `pytools/sphinx <https://github.com/BCG-Gamma/pytools/tree/develop/sphinx/base>`_.
these scripts can be found in `pytools/sphinx <https://github.com/BCG-X-Official/pytools/tree/develop/sphinx/base>`_.
The reason for this is to minimise code given the standardization of the documentation
build across multiple packages.

Expand Down Expand Up @@ -358,7 +358,7 @@ The build process for the PyPI and conda distributions uses the following key
files:

- ``make.py``: generic Python script for package builds. Most configuration is imported
from pytools `make.py <https://github.com/BCG-Gamma/pytools/blob/develop/make.py>`__
from pytools `make.py <https://github.com/BCG-X-Official/pytools/blob/develop/make.py>`__
which is a build script that wraps the package build, as well as exposing the matrix
dependency definitions specified in the ``pyproject.toml`` as environment variables
- ``pyproject.toml``: metadata for PyPI, build settings and package dependencies
Expand Down
2 changes: 1 addition & 1 deletion sphinx/source/faqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on `stackoverflow <https://stackoverflow.com/>`_.
1. **What if I find a bug or have an idea for a new feature?**

For bug reports or feature requests please use our
`GitHub issue tracker <https://github.com/BCG-Gamma/sklearndf/issues>`_.
`GitHub issue tracker <https://github.com/BCG-X-Official/sklearndf/issues>`_.
For any other enquiries please feel free to contact us at [email protected].

2. **How can I contribute?**
Expand Down
2 changes: 1 addition & 1 deletion src/sklearndf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
from ._sklearn_version import *
from ._sklearndf import *

__version__ = "2.2.1"
__version__ = "2.3rc0"
6 changes: 1 addition & 5 deletions src/sklearndf/_sklearn_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@

__all__ = [
"__sklearn_version__",
"__sklearn_0_24__",
"__sklearn_1_0__",
"__sklearn_1_1__",
"__sklearn_1_2__",
"__sklearn_1_3__",
"__sklearn_1_4__",
]

__sklearn_version__ = Version(sklearn_version)
__sklearn_0_24__ = Version("0.24")
__sklearn_1_0__ = Version("1.0")
__sklearn_1_1__ = Version("1.1")
__sklearn_1_2__ = Version("1.2dev")
__sklearn_1_2__ = Version("1.2")
__sklearn_1_3__ = Version("1.3")
__sklearn_1_4__ = Version("1.4")
5 changes: 1 addition & 4 deletions src/sklearndf/classification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
Extended versions of all `scikit-learn` classifiers with enhanced support for data
frames.
"""
from .. import __sklearn_1_0__, __sklearn_version__
from ._classification import *
from ._classification_v0_22 import *
from ._classification_v0_23 import *

if __sklearn_version__ >= __sklearn_1_0__:
from ._classification_v1_0 import *
from ._classification_v1_0 import *
1 change: 0 additions & 1 deletion src/sklearndf/classification/wrapper/_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ def _prediction_with_class_labels(
],
classes: Optional[Sequence[Any]] = None,
) -> Union[pd.Series, pd.DataFrame, List[pd.DataFrame]]:

# if we have a multi-output classifier, prediction of probabilities
# yields a list of NumPy arrays
if not isinstance(prediction, list):
Expand Down
5 changes: 4 additions & 1 deletion src/sklearndf/clustering/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
frames.
"""

from .. import __sklearn_1_1__, __sklearn_version__
from .. import __sklearn_1_1__, __sklearn_1_3__, __sklearn_version__
from ._clustering import *

if __sklearn_version__ >= __sklearn_1_1__:
from ._clustering_v1_1 import *

if __sklearn_version__ >= __sklearn_1_3__:
from ._clustering_v1_3 import *
Loading

0 comments on commit cde262d

Please sign in to comment.