From 266deb598b27022a059f9a375ba5ae665dfe86b4 Mon Sep 17 00:00:00 2001 From: Ben Frederickson Date: Thu, 8 Dec 2022 15:52:01 -0800 Subject: [PATCH] Exclude changelog from pre-commit spellcheck (#1083) Exclude the changelog from the pre-commit codespell check- this is to prevent CI failures after release when the changelog is updated, as suggested here https://github.com/rapidsai/cudf/pull/12097#pullrequestreview-1180342650 This also exports the `__version__` for pylibraft / raft_dask, which was missing previously Authors: - Ben Frederickson (https://github.com/benfred) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: https://github.com/rapidsai/raft/pull/1083 --- .pre-commit-config.yaml | 2 ++ python/pylibraft/pylibraft/__init__.py | 5 +++++ python/raft-dask/raft_dask/__init__.py | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1c244200d1..f48dff11cd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -97,6 +97,8 @@ repos: rev: v2.1.0 hooks: - id: codespell + exclude: (?x)^(^CHANGELOG.md$) + default_language_version: python: python3 diff --git a/python/pylibraft/pylibraft/__init__.py b/python/pylibraft/pylibraft/__init__.py index 273b4497cc..1124c64102 100644 --- a/python/pylibraft/pylibraft/__init__.py +++ b/python/pylibraft/pylibraft/__init__.py @@ -12,3 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +from pylibraft._version import get_versions + +__version__ = get_versions()["version"] +del get_versions diff --git a/python/raft-dask/raft_dask/__init__.py b/python/raft-dask/raft_dask/__init__.py index 5face05ef3..092e68670a 100644 --- a/python/raft-dask/raft_dask/__init__.py +++ b/python/raft-dask/raft_dask/__init__.py @@ -13,4 +13,9 @@ # limitations under the License. # +from raft_dask._version import get_versions + from .include_test import raft_include_test + +__version__ = get_versions()["version"] +del get_versions