Skip to content

Conversation

@jkebinger
Copy link
Collaborator

@jkebinger jkebinger commented Oct 16, 2025

Summary

  • Rename MissingApiKeyException to MissingSdkKeyException with updated error message
  • Rename InvalidApiKeyException to InvalidSdkKeyException with updated error message
  • Update all test names and imports to reference SDK key instead of API key
  • Bump version from 1.0.0 to 1.0.1 in both pyproject.toml and sdk_reforge/VERSION
  • Remove importlib.metadata dependency for version lookup
  • Add _get_version() helper that reads from sdk_reforge/VERSION file directly
  • Cache version string in memory after first read for better performance

This change improves clarity by using "SDK key" consistently throughout the codebase, which better reflects the actual terminology used in the service.

The version lookup fix resolves PackageNotFoundError issues when package metadata is unavailable (e.g., in development environments) and works consistently in both installed and development modes.

Test plan

  • All existing tests pass with updated exception names
  • Pre-commit hooks (black, ruff, prettier, mypy) all pass
  • Error messages now correctly reference "SDK key" instead of "API key"
  • Version lookup works in both development and installed environments
  • No dependency on importlib.metadata

🤖 Generated with Claude Code

jkebinger and others added 3 commits October 16, 2025 12:57
- Rename MissingApiKeyException to MissingSdkKeyException
- Rename InvalidApiKeyException to InvalidSdkKeyException
- Update error messages to reference SDK key instead of API key
- Update test names and imports accordingly
- Bump version from 1.0.0 to 1.0.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…adata

- Remove importlib.metadata dependency which was looking up wrong package name
- Add _get_version() helper that reads directly from sdk_reforge/VERSION file
- This works in both installed and development environments
- Fixes PackageNotFoundError when package metadata is unavailable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add __version_cache module-level variable
- Read VERSION file only once, cache result for subsequent calls
- Improves performance by avoiding repeated file I/O

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@jdwyah jdwyah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@jkebinger jkebinger merged commit 0004420 into main Oct 16, 2025
7 checks passed
@jkebinger jkebinger deleted the api-key-to-sdk-key-1.0.1 branch October 16, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants