Skip to content

Release/v1.4.0#126

Merged
garlontas merged 2 commits intomainfrom
release/v1.4.0
Apr 13, 2026
Merged

Release/v1.4.0#126
garlontas merged 2 commits intomainfrom
release/v1.4.0

Conversation

@garlontas
Copy link
Copy Markdown
Member

@garlontas garlontas commented Apr 13, 2026

Summary by Sourcery

Build:

  • Update package metadata to reflect version 1.4.0.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 13, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Bumps the project version from 1.3.0 to 1.4.0 in both the packaging metadata and the library’s exposed version constant to prepare for the v1.4.0 release.

File-Level Changes

Change Details Files
Update project version metadata to 1.4.0 for the new release.
  • Change the Poetry package version field from 1.3.0 to 1.4.0
  • Update the library’s version constant from 1.3.0 to 1.4.0 so runtime version reporting matches the release
pyproject.toml
pystreamapi/__init__.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@garlontas garlontas merged commit 8560dd6 into main Apr 13, 2026
7 checks passed
@garlontas garlontas deleted the release/v1.4.0 branch April 13, 2026 14:43
Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="pystreamapi/__init__.py" line_range="4" />
<code_context>
 from pystreamapi._streams.error.__levels import ErrorLevel

-__version__ = "1.3.0"
+__version__ = "1.4.0"
 __all__ = ["Stream", "ErrorLevel"]
</code_context>
<issue_to_address>
**suggestion:** Consider deriving __version__ from pyproject.toml (or a single source) to avoid drift between version declarations.

Having the version in both pyproject.toml and __init__.py increases the risk of mismatch. Consider reading it from a single authoritative source (e.g., importlib.metadata, a generated _version module, or a small script) so it only needs updating in one place.

Suggested implementation:

```python
from importlib import metadata

from pystreamapi.__stream import Stream
from pystreamapi._streams.error.__levels import ErrorLevel

try:
    # Derive version from package metadata (pyproject.toml / setup)
    __version__ = metadata.version("pystreamapi")
except metadata.PackageNotFoundError:
    # Fallback for editable / local usage when package metadata is unavailable
    __version__ = "0.0.0"

__all__ = ["Stream", "ErrorLevel"]

```

1. Ensure the project name in `pyproject.toml` is exactly `"pystreamapi"` so `metadata.version("pystreamapi")` matches the distribution name.
2. If you want `__version__` to be part of the public API, you may also want to add `"__version__"` to `__all__` elsewhere in your codebase, or in this file.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

from pystreamapi._streams.error.__levels import ErrorLevel

__version__ = "1.3.0"
__version__ = "1.4.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Consider deriving version from pyproject.toml (or a single source) to avoid drift between version declarations.

Having the version in both pyproject.toml and init.py increases the risk of mismatch. Consider reading it from a single authoritative source (e.g., importlib.metadata, a generated _version module, or a small script) so it only needs updating in one place.

Suggested implementation:

from importlib import metadata

from pystreamapi.__stream import Stream
from pystreamapi._streams.error.__levels import ErrorLevel

try:
    # Derive version from package metadata (pyproject.toml / setup)
    __version__ = metadata.version("pystreamapi")
except metadata.PackageNotFoundError:
    # Fallback for editable / local usage when package metadata is unavailable
    __version__ = "0.0.0"

__all__ = ["Stream", "ErrorLevel"]
  1. Ensure the project name in pyproject.toml is exactly "pystreamapi" so metadata.version("pystreamapi") matches the distribution name.
  2. If you want __version__ to be part of the public API, you may also want to add "__version__" to __all__ elsewhere in your codebase, or in this file.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant