From 6d59d10b035659505a9068c73e41dbb6aaa757d8 Mon Sep 17 00:00:00 2001 From: altissimo Date: Tue, 15 Sep 2026 13:32:40 -0400 Subject: [PATCH] Add __version__, wire mypy into pre-commit, fix boilerplate description - Add __version__ to src/altissimo/slack/__init__.py per the fleet's standard version pattern (reads installed package metadata, with a hardcoded fallback for editable/uninstalled dev environments) - Write a real, specific description in pyproject.toml and README.md describing what the client actually does, replacing the scaffolded boilerplate - Add a local mypy hook to .pre-commit-config.yaml so the strict mypy config that was already declared actually runs - Remove the leftover scaffold test tests/test_placeholder.py now that the real suite lives in tests/test_slack.py Co-Authored-By: Claude Sonnet 5 --- .pre-commit-config.yaml | 9 +++++++++ README.md | 2 +- pyproject.toml | 2 +- src/altissimo/slack/__init__.py | 8 ++++++++ tests/test_placeholder.py | 6 ------ 5 files changed, 19 insertions(+), 8 deletions(-) delete mode 100644 tests/test_placeholder.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f2ba00..2255507 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,15 @@ repos: - id: ruff args: ['--fix'] - id: ruff-format + - repo: local + hooks: + - id: mypy + name: mypy + entry: mypy + language: system + types: [python] + pass_filenames: false + args: ["src"] - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.44.0 hooks: diff --git a/README.md b/README.md index 7f1cea6..87499e3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # slack-python -Altissimo Python client for slack-python. +Slack client with chat-message posting, environment-aware channel routing, and Block Kit builder helpers. diff --git a/pyproject.toml b/pyproject.toml index 47aac20..2c8196d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "slack-python" version = "0.1.0" -description = "Altissimo Python client for slack-python" +description = "Slack client with chat-message posting, environment-aware channel routing, and Block Kit builder helpers" readme = "README.md" license = "Apache-2.0" requires-python = ">=3.11" diff --git a/src/altissimo/slack/__init__.py b/src/altissimo/slack/__init__.py index 194583f..4b1137c 100644 --- a/src/altissimo/slack/__init__.py +++ b/src/altissimo/slack/__init__.py @@ -2,6 +2,8 @@ from __future__ import annotations +from importlib.metadata import PackageNotFoundError, version + from .blocks import ( actions_block, button_element, @@ -11,11 +13,17 @@ from .client import SlackClient, SlackSettings from .service import SlackClientProtocol, SlackService +try: + __version__ = version("slack-python") +except PackageNotFoundError: # pragma: no cover — editable install without metadata + __version__ = "0.1.0" + __all__ = [ "SlackClient", "SlackClientProtocol", "SlackService", "SlackSettings", + "__version__", "actions_block", "button_element", "context_block", diff --git a/tests/test_placeholder.py b/tests/test_placeholder.py deleted file mode 100644 index eb83382..0000000 --- a/tests/test_placeholder.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Placeholder tests.""" - - -def test_placeholder() -> None: - """A placeholder test so pytest does not fail.""" - assert True